alchemy-chimera 0.5.3 → 1.0.1

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.
Files changed (128) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/assets/scripts/chimera/chimera.js +13 -288
  3. package/assets/stylesheets/chimera/chimera.scss +273 -0
  4. package/bootstrap.js +6 -302
  5. package/config/routes.js +53 -5
  6. package/controller/00-chimera_controller.js +16 -0
  7. package/controller/chimera_editor_controller.js +161 -615
  8. package/controller/chimera_static_controller.js +102 -9
  9. package/lib/chimera_config.js +107 -163
  10. package/model/model.js +1 -1
  11. package/package.json +8 -12
  12. package/view/chimera/dashboard.hwk +8 -0
  13. package/view/chimera/editor/index.hwk +20 -0
  14. package/view/chimera/sidebar.hwk +4 -0
  15. package/view/chimera/widgets.hwk +8 -0
  16. package/view/layouts/chimera_base.hwk +15 -0
  17. package/view/layouts/chimera_basics.hwk +15 -0
  18. package/view/layouts/chimera_body.hwk +24 -0
  19. package/assets/scripts/chimera/assoc_field.js +0 -311
  20. package/assets/scripts/chimera/boolean_field.js +0 -53
  21. package/assets/scripts/chimera/chimera_field.js +0 -617
  22. package/assets/scripts/chimera/chimera_field_wrapper.js +0 -557
  23. package/assets/scripts/chimera/date_field.js +0 -170
  24. package/assets/scripts/chimera/geopoint_field.js +0 -147
  25. package/assets/scripts/chimera/medium-button.js +0 -6
  26. package/assets/scripts/chimera/object_field.js +0 -51
  27. package/assets/scripts/chimera/page-editor.js +0 -3
  28. package/assets/scripts/chimera/password_field.js +0 -54
  29. package/assets/scripts/chimera/schema_field.js +0 -300
  30. package/assets/scripts/chimera/text_field.js +0 -119
  31. package/assets/scripts/rome/rome.js +0 -4978
  32. package/assets/scripts/vex/vex.dialog.js +0 -151
  33. package/assets/scripts/vex/vex.js +0 -193
  34. package/assets/stylesheets/chimera/chimera.less +0 -1075
  35. package/assets/stylesheets/chimera_old/chimera.less +0 -351
  36. package/assets/stylesheets/chimera_old/core.less +0 -315
  37. package/assets/stylesheets/chimera_old/font.less +0 -38
  38. package/assets/stylesheets/chimera_old/mixins.less +0 -35
  39. package/assets/stylesheets/chimera_old/page-editor.less +0 -23
  40. package/assets/stylesheets/rome/rome.less +0 -130
  41. package/assets/stylesheets/vex/vex-theme-bottom-right-corner.less +0 -613
  42. package/assets/stylesheets/vex/vex.default.less +0 -501
  43. package/assets/stylesheets/vex/vex.flat.less +0 -443
  44. package/assets/stylesheets/vex/vex.less +0 -320
  45. package/controller/chimera_page_controller.js +0 -14
  46. package/controller/chimera_settings_controller.js +0 -129
  47. package/controller/tasks_chimera_controller.js +0 -106
  48. package/helper/chimera_helper.js +0 -202
  49. package/lib/chimera_action_fields.js +0 -292
  50. package/lib/chimera_field/belongsto_chimera_field.js +0 -155
  51. package/lib/chimera_field/boolean_chimera_field.js +0 -19
  52. package/lib/chimera_field/date_chimera_field.js +0 -20
  53. package/lib/chimera_field/datetime_chimera_field.js +0 -20
  54. package/lib/chimera_field/enum_chimera_field.js +0 -131
  55. package/lib/chimera_field/geopoint_chimera_field.js +0 -20
  56. package/lib/chimera_field/habtm_chimera_field.js +0 -55
  57. package/lib/chimera_field/hasoneparent_chimera_field.js +0 -18
  58. package/lib/chimera_field/html_chimera_field.js +0 -20
  59. package/lib/chimera_field/object_chimera_field.js +0 -18
  60. package/lib/chimera_field/password_chimera_field.js +0 -18
  61. package/lib/chimera_field/schema_chimera_field.js +0 -149
  62. package/lib/chimera_field/text_chimera_field.js +0 -20
  63. package/lib/chimera_field/time_chimera_field.js +0 -18
  64. package/lib/chimera_field.js +0 -208
  65. package/model/setting_model.js +0 -51
  66. package/public/chimera/codedor.svg +0 -28
  67. package/view/chimera/dashboard.ejs +0 -5
  68. package/view/chimera/editor/add.ejs +0 -32
  69. package/view/chimera/editor/edit.ejs +0 -33
  70. package/view/chimera/editor/index.ejs +0 -87
  71. package/view/chimera/editor/remove.ejs +0 -23
  72. package/view/chimera/editor/view.ejs +0 -54
  73. package/view/chimera/elements/editor_actions.ejs +0 -4
  74. package/view/chimera/elements/empty +0 -0
  75. package/view/chimera/field_wrappers/_entries.ejs +0 -91
  76. package/view/chimera/field_wrappers/_wrapper.ejs +0 -78
  77. package/view/chimera/field_wrappers/date_edit.ejs +0 -23
  78. package/view/chimera/field_wrappers/date_list.ejs +0 -3
  79. package/view/chimera/field_wrappers/date_view.ejs +0 -16
  80. package/view/chimera/field_wrappers/default_edit.ejs +0 -22
  81. package/view/chimera/field_wrappers/default_list.ejs +0 -3
  82. package/view/chimera/field_wrappers/default_peek.ejs +0 -3
  83. package/view/chimera/field_wrappers/default_view.ejs +0 -14
  84. package/view/chimera/field_wrappers/geopoint_edit.ejs +0 -25
  85. package/view/chimera/field_wrappers/geopoint_list.ejs +0 -5
  86. package/view/chimera/field_wrappers/geopoint_view.ejs +0 -18
  87. package/view/chimera/field_wrappers/schema_edit.ejs +0 -19
  88. package/view/chimera/field_wrappers/text_edit.ejs +0 -22
  89. package/view/chimera/field_wrappers/text_list.ejs +0 -1
  90. package/view/chimera/fields/belongsto_edit.ejs +0 -4
  91. package/view/chimera/fields/belongsto_list.ejs +0 -1
  92. package/view/chimera/fields/belongsto_peek.ejs +0 -1
  93. package/view/chimera/fields/boolean_edit.ejs +0 -17
  94. package/view/chimera/fields/boolean_list.ejs +0 -3
  95. package/view/chimera/fields/boolean_view.ejs +0 -3
  96. package/view/chimera/fields/date_edit.ejs +0 -14
  97. package/view/chimera/fields/date_list.ejs +0 -9
  98. package/view/chimera/fields/date_peek.ejs +0 -9
  99. package/view/chimera/fields/date_view.ejs +0 -9
  100. package/view/chimera/fields/datetime_edit.ejs +0 -24
  101. package/view/chimera/fields/datetime_list.ejs +0 -9
  102. package/view/chimera/fields/datetime_view.ejs +0 -10
  103. package/view/chimera/fields/default_edit.ejs +0 -10
  104. package/view/chimera/fields/default_list.ejs +0 -15
  105. package/view/chimera/fields/default_view.ejs +0 -1
  106. package/view/chimera/fields/enum_edit.ejs +0 -10
  107. package/view/chimera/fields/geopoint_edit.ejs +0 -10
  108. package/view/chimera/fields/geopoint_list.ejs +0 -9
  109. package/view/chimera/fields/geopoint_view.ejs +0 -9
  110. package/view/chimera/fields/habtm_edit.ejs +0 -5
  111. package/view/chimera/fields/hasoneparent_edit.ejs +0 -6
  112. package/view/chimera/fields/hasoneparent_list.ejs +0 -1
  113. package/view/chimera/fields/object_edit.ejs +0 -8
  114. package/view/chimera/fields/password_edit.ejs +0 -11
  115. package/view/chimera/fields/schema_edit.ejs +0 -14
  116. package/view/chimera/fields/text_edit.ejs +0 -5
  117. package/view/chimera/fields/text_list.ejs +0 -9
  118. package/view/chimera/fields/text_view.ejs +0 -3
  119. package/view/chimera/fields/time_edit.ejs +0 -15
  120. package/view/chimera/fields/time_list.ejs +0 -9
  121. package/view/chimera/fields/time_view.ejs +0 -9
  122. package/view/chimera/page/edit.ejs +0 -18
  123. package/view/chimera/page_editor.ejs +0 -5
  124. package/view/chimera/sidebar.ejs +0 -40
  125. package/view/chimera/tasks/index.ejs +0 -114
  126. package/view/layouts/chimera.ejs +0 -12
  127. package/view/layouts/chimera_base.ejs +0 -11
  128. package/view/layouts/chimera_body.ejs +0 -43
@@ -1,617 +0,0 @@
1
- /**
2
- * The client side base ChimeraField class
3
- *
4
- * @constructor
5
- *
6
- * @author Jelle De Loecker <jelle@kipdola.be>
7
- * @since 0.2.0
8
- * @version 0.3.0
9
- *
10
- * @param {Object} options
11
- * @param {ChimeraFieldWrapper} options.parent
12
- * @param {DOMElement} options.container
13
- * @param {Object} options.variables
14
- * @param {Mixed} options.value
15
- * @param {String} options.prefix
16
- * @param {Number} options.original_index
17
- */
18
- var ChimeraField = Function.inherits('Informer', function ChimeraField(options) {
19
-
20
- var that = this,
21
- action;
22
-
23
- if (!options) {
24
- throw new Error('ChimeraField can\'t be created without options');
25
- }
26
-
27
- // The parent wrapper
28
- this.parent = options.parent;
29
-
30
- // Make the instance self-register in the parent
31
- this.parent.fields.push(this);
32
-
33
- // The container element, with the 'chimeraField-container' CSS class
34
- this.container = options.container || this.parent.container;
35
-
36
- // The variables passed to the rendering element
37
- this.variables = options.variables || this.parent.variables;
38
-
39
- // Field value
40
- this.value = options.value;
41
-
42
- // The original value
43
- this.originalValue = this.value;
44
-
45
- // The original value index
46
- this.original_index = options.original_index;
47
-
48
- // Identify local-added fields (by clicking + button)
49
- this.is_local_add = options.local_add || this.original_index == null;
50
-
51
- // Field data
52
- this.field = this.parent.field;
53
-
54
- // The prefix of the field
55
- this.prefix = options.prefix;
56
-
57
- this.readOnly = this.parent.readOnly;
58
- this.isArray = this.parent.isArray;
59
- this.isTranslatable = this.parent.isTranslatable;
60
-
61
- action = Blast.Bound.String.classify(String(this.parent.action));
62
-
63
- this.actionType = action;
64
-
65
- __Protoblast.setImmediate(function() {
66
-
67
- // @TODO: render only needs to happen when new values are added
68
- if (that.is_local_add) {
69
- that.render(function done(err) {
70
- if (err) {
71
- throw err;
72
- }
73
-
74
- that.doInit();
75
- });
76
- } else {
77
- that.doInit();
78
- }
79
- });
80
- });
81
-
82
- /**
83
- * Each ChimeraField handles a single value by default
84
- *
85
- * @type {Boolean}
86
- */
87
- ChimeraField.setStaticProperty('multipleValues', false);
88
-
89
- /**
90
- * The index of this value inside the array.
91
- * Is always false if it isn't an arrayable field
92
- */
93
- ChimeraField.setProperty(function index() {
94
-
95
- if (!this.parent.isArray) {
96
- return false;
97
- }
98
-
99
- return this.parent.fields.indexOf(this);
100
- });
101
-
102
- /**
103
- * Get the input element
104
- *
105
- * @author Jelle De Loecker <jelle@develry.be>
106
- * @since 0.3.0
107
- * @version 0.3.0
108
- *
109
- */
110
- ChimeraField.setProperty(function input() {
111
-
112
- if (!this._input && this.entry) {
113
- this._input = this.entry.querySelector('.chimeraField-prime');
114
-
115
- if (!this._input) {
116
- this._input = this.entry.querySelector('.chimeraEditor-input');
117
- }
118
- }
119
-
120
- return this._input;
121
- }, function setInput(element) {
122
- this._input = element;
123
- });
124
-
125
- /**
126
- * Get the entry element
127
- *
128
- * @author Jelle De Loecker <jelle@develry.be>
129
- * @since 0.3.0
130
- * @version 0.3.0
131
- *
132
- */
133
- ChimeraField.setProperty(function entry() {
134
-
135
- var element,
136
- i;
137
-
138
- if (this._entry != null) {
139
- return this._entry;
140
- }
141
-
142
- if (this.is_local_add) {
143
- this._entry = false;
144
- } else if (!this.parent.isTranslatable) {
145
- this._entry = this.parent.entries[this.original_index];
146
- } else {
147
- for (i = 0; i < this.parent.entries.length; i++) {
148
- element = this.parent.entries[i];
149
-
150
- if (element.dataset.oid == this.original_index && element.parentElement.dataset.prefix == this.prefix) {
151
- this._entry = element;
152
- break;
153
- }
154
- }
155
- }
156
-
157
- return this._entry;
158
- }, function set_entry(val) {
159
- this._entry = val;
160
- return val;
161
- });
162
-
163
- /**
164
- * The path of this value
165
- */
166
- ChimeraField.setProperty(function path() {
167
-
168
- var result = this.field.path;
169
-
170
- if (this.index !== false) {
171
- result += '.' + this.index;
172
- }
173
-
174
- if (this.prefix) {
175
- result += '.' + this.prefix;
176
- }
177
-
178
- return result;
179
- });
180
-
181
- /**
182
- * Return the nested path
183
- *
184
- * @author Jelle De Loecker <jelle@develry.be>
185
- * @since 0.2.0
186
- * @version 0.2.0
187
- */
188
- ChimeraField.setProperty(function nested_path() {
189
- return this.getNestedPath();
190
- });
191
-
192
- /**
193
- * Get the path of the value it's nested in
194
- *
195
- * @author Jelle De Loecker <jelle@develry.be>
196
- * @since 0.2.0
197
- * @version 0.2.0
198
- */
199
- ChimeraField.setMethod(function getNestedPath() {
200
- return this.parent.getNestedPath();
201
- });
202
-
203
- /**
204
- * Get the full path of this value
205
- *
206
- * @author Jelle De Loecker <jelle@develry.be>
207
- * @since 0.4.0
208
- * @version 0.4.0
209
- */
210
- ChimeraField.setMethod(function getFullPath() {
211
-
212
- var nested = this.getNestedPath();
213
-
214
- if (nested) {
215
- return nested + '.' + this.path;
216
- }
217
-
218
- return this.path;
219
- });
220
-
221
- /**
222
- * Get a text representation
223
- *
224
- * @author Jelle De Loecker <jelle@kipdola.be>
225
- * @since 0.2.1
226
- * @version 0.2.1
227
- */
228
- ChimeraField.setMethod(function getText(mixed) {
229
-
230
- var result;
231
-
232
- // See if mixed is not an object (and not null)
233
- if (typeof mixed != 'object') {
234
- result = mixed;
235
- } else if (mixed) {
236
- // Mixed is an object, but not null
237
- // @TODO: show translations?
238
- result = Object.first(mixed);
239
- } else {
240
- result = mixed;
241
- }
242
-
243
- return String(result);
244
- });
245
-
246
- /**
247
- * Get the value to store in the database
248
- *
249
- * @author Jelle De Loecker <jelle@kipdola.be>
250
- * @since 0.2.0
251
- * @version 0.2.0
252
- */
253
- ChimeraField.setMethod(function getData() {
254
- return this.value;
255
- });
256
-
257
- /**
258
- * Add element to the wrapper
259
- *
260
- * @author Jelle De Loecker <jelle@kipdola.be>
261
- * @since 0.2.0
262
- * @version 0.2.0
263
- *
264
- * @param {Element} element
265
- */
266
- ChimeraField.setMethod(function addElement(element) {
267
-
268
- var arr,
269
- i;
270
-
271
- if (typeof element == 'string') {
272
- element = Blast.parseHTML(element);
273
- }
274
-
275
- arr = Array.cast(element);
276
-
277
- for (i = 0; i < arr.length; i++) {
278
- this.entry.appendChild(arr[i]);
279
- }
280
-
281
- return arr[0];
282
- });
283
-
284
- /**
285
- * Set the main element
286
- *
287
- * @author Jelle De Loecker <jelle@kipdola.be>
288
- * @since 0.2.0
289
- * @version 0.2.0
290
- *
291
- * @param {Element} element
292
- */
293
- ChimeraField.setMethod(function setMainElement(element) {
294
-
295
- var elements;
296
-
297
- if (typeof element == 'string') {
298
- element = Blast.parseHTML(element);
299
- }
300
-
301
- // If there already is a main element, remove it now!
302
- if (this.input) {
303
- this.input.remove();
304
- }
305
-
306
- elements = Array.cast(element);
307
- element = elements[0];
308
-
309
- // Store the main element under the input property
310
- this.input = element;
311
- this.$input = $(element);
312
-
313
- this.input.classList.add('chimeraField-prime');
314
-
315
- // And add it to the wrapper
316
- this.addElement(element);
317
-
318
- if (elements[1]) {
319
- this.addElement(elements[1]);
320
- }
321
-
322
- return element;
323
- });
324
-
325
- /**
326
- * Render the element
327
- *
328
- * @author Jelle De Loecker <jelle@kipdola.be>
329
- * @since 0.2.0
330
- * @version 0.3.0
331
- */
332
- ChimeraField.setMethod(function render(callback) {
333
-
334
- var that = this,
335
- render_function,
336
- placeholder;
337
-
338
- // Construct the expected render function name
339
- render_function = 'render' + this.actionType;
340
-
341
- // If there is a custom render function, execute that
342
- // For exaple: renderEdit, renderList, renderPeek, renderView, ...
343
- if (typeof this[render_function] == 'function') {
344
- return this[render_function](callback);
345
- }
346
-
347
- // Print the field, get the placeholder
348
- placeholder = hawkejs.scene.helpers.Chimera.printField({field: this.field, value: this.value}, {print_wrapper: false});
349
-
350
- // Resolve the placeholder
351
- placeholder.getContent(function gotContent(err, html) {
352
-
353
- var entries;
354
-
355
- if (err) {
356
- return callback(err);
357
- }
358
-
359
- // Still not done: we only want the entries block
360
- entries = placeholder.parent.blocks.entries;
361
-
362
- // Get the html
363
- entries.joinBuffer(function gotResult(err, html) {
364
-
365
- var entry_element;
366
-
367
- if (err) {
368
- return callback(err);
369
- }
370
-
371
- // Get the new entry element
372
- entry_element = Array.cast(Blast.parseHTML(html))[0];
373
-
374
- // Set it
375
- that.entry = entry_element;
376
-
377
- that.parent.addEntry(that);
378
-
379
- callback(null);
380
- });
381
- });
382
- });
383
-
384
- /**
385
- * Add extra buttons
386
- *
387
- * @author Jelle De Loecker <jelle@develry.be>
388
- * @since 0.2.0
389
- * @version 0.3.0
390
- */
391
- ChimeraField.setMethod(function addButtons() {
392
-
393
- var that = this,
394
- elements,
395
- el;
396
-
397
- if (this.isArray) {
398
-
399
- // Get the remove button
400
- elements = this.entry.querySelectorAll('.chimeraField-remove-entry');
401
-
402
- // Get the LAST ONE,
403
- // all the others could bu sub-array-field remove buttons
404
- el = elements[elements.length - 1];
405
-
406
- if (el) {
407
- el.addEventListener('click', function onClickRemoveEntry(e) {
408
- that.remove();
409
- });
410
- }
411
- }
412
- });
413
-
414
- /**
415
- * Create the edit input element
416
- *
417
- * @author Jelle De Loecker <jelle@kipdola.be>
418
- * @since 0.2.0
419
- * @version 0.2.0
420
- *
421
- * @param {Function} callback
422
- */
423
- ChimeraField.setMethod(function _renderEdit(callback) {
424
- var html = '<input class="chimeraField-string" type="text">';
425
-
426
- this.setMainElement(html);
427
- });
428
-
429
- /**
430
- * Create the view input element
431
- *
432
- * @author Jelle De Loecker <jelle@kipdola.be>
433
- * @since 0.2.0
434
- * @version 0.2.0
435
- *
436
- * @param {Function} callback
437
- */
438
- ChimeraField.setMethod(function _renderView() {
439
- return this.renderEdit();
440
- });
441
-
442
- /**
443
- * Create the list input element
444
- *
445
- * @author Jelle De Loecker <jelle@kipdola.be>
446
- * @since 0.2.0
447
- * @version 0.2.0
448
- *
449
- * @param {Function} callback
450
- */
451
- ChimeraField.setMethod(function _renderList() {
452
- var html = '<div>' + this.value + '</div>';
453
- this.setMainElement(html);
454
- });
455
-
456
- /**
457
- * Render the element
458
- *
459
- * @author Jelle De Loecker <jelle@kipdola.be>
460
- * @since 0.2.0
461
- * @version 0.2.0
462
- *
463
- * @param {Function} callback
464
- */
465
- ChimeraField.setMethod(function _render(callback) {
466
-
467
- var that = this,
468
- fieldElement,
469
-
470
- fieldElement = [
471
- // The expected element to use
472
- 'chimera/fields/' + this.parent.viewname + '_' + this.parent.action,
473
- // The fallback element
474
- 'chimera/fields/default_' + this.parent.action
475
- ];
476
-
477
- hawkejs.render(fieldElement, {value: this.value}, callback);
478
- });
479
-
480
- /**
481
- * Remove this value (from an array field)
482
- *
483
- * @author Jelle De Loecker <jelle@kipdola.be>
484
- * @since 0.2.0
485
- * @version 0.2.0
486
- *
487
- * @param {Boolean} force Delete, even if it's not an array
488
- */
489
- ChimeraField.setMethod(function remove(force) {
490
-
491
- if (!this.isArray && !force) {
492
- return;
493
- }
494
-
495
- // Remove the element
496
- this.entry.remove();
497
-
498
- // Remove the instance from the parent
499
- this.parent.removeFromArray(this, force);
500
- });
501
-
502
- /**
503
- * Set the new value for this field.
504
- * Only new values will be sent to the server on save.
505
- *
506
- * @author Jelle De Loecker <jelle@kipdola.be>
507
- * @since 0.2.0
508
- * @version 0.4.0
509
- *
510
- * @param {Mixed} value
511
- */
512
- ChimeraField.setMethod(function setValue(value, emit_change) {
513
- this.value = value;
514
-
515
- if (emit_change == null || emit_change) {
516
- this.emit('change', value);
517
- this.parent.emit('change');
518
- }
519
- });
520
-
521
- /**
522
- * Start the appropriate initialization
523
- *
524
- * @author Jelle De Loecker <jelle@develry.be>
525
- * @since 0.3.0
526
- * @version 0.3.0
527
- */
528
- ChimeraField.setMethod(function doInit() {
529
-
530
- var init_action;
531
-
532
- // Add optional buttons (language prefixes)
533
- this.addButtons();
534
-
535
- // Construct the expected init name
536
- init_action = 'init' + this.actionType;
537
-
538
- if (typeof this[init_action] == 'function') {
539
- this[init_action]();
540
- }
541
-
542
- if (this.readOnly) {
543
- this.setReadOnly(true);
544
- }
545
- });
546
-
547
- /**
548
- * Initialize the field in the edit action
549
- *
550
- * @author Jelle De Loecker <jelle@develry.be>
551
- * @since 0.2.0
552
- * @version 0.5.0
553
- *
554
- * @param {Mixed} value Optional value to override
555
- */
556
- ChimeraField.setMethod(function initEdit(value) {
557
-
558
- var that = this;
559
-
560
- // Override the value if given
561
- if (typeof value !== 'undefined') {
562
- this.input.value = value;
563
- }
564
-
565
- //console.log('Listening to change on', this);
566
-
567
- // Add change listener
568
- if (this.input) {
569
- this.input.addEventListener('change', function onChange() {
570
- that.setValue(that.input.value);
571
- });
572
- } else if (!(this.field && this.field.fieldType && this.field.fieldType.name == '_id')) {
573
- console.warn('Field', this, 'has no input! Changes will not be saved');
574
- }
575
- });
576
-
577
- /**
578
- * Initialize the field in the add action
579
- *
580
- * @author Jelle De Loecker <jelle@develry.be>
581
- * @since 0.2.0
582
- * @version 0.3.0
583
- *
584
- * @param {Mixed} value
585
- */
586
- ChimeraField.setMethod(function initAdd(value) {
587
- return this.initEdit(value);
588
- });
589
-
590
- /**
591
- * Initialize the field in the list action
592
- *
593
- * @author Jelle De Loecker <jelle@develry.be>
594
- * @since 0.2.0
595
- * @version 0.2.0
596
- */
597
- ChimeraField.setMethod(function initList() {
598
- return;
599
- });
600
-
601
- /**
602
- * Set the new value for this field.
603
- * Only new values will be sent to the server on save.
604
- *
605
- * @param {Mixed} value
606
- */
607
- ChimeraField.setMethod(function setReadOnly(value) {
608
-
609
- var $prime = this.$input;
610
- $prime.attr('disabled', value);
611
-
612
- if (value) {
613
- $prime.addClass('chimera-read-only');
614
- } else {
615
- $prime.removeClass('chimera-read-only');
616
- }
617
- });