alchemymvc 1.2.5 → 1.2.6
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/LICENSE +0 -0
- package/README.md +0 -0
- package/lib/app/assets/scripts/.gitkeep +0 -0
- package/lib/app/assets/stylesheets/alchemy-info.less +0 -0
- package/lib/app/behaviour/publishable_behaviour.js +0 -0
- package/lib/app/behaviour/revision_behaviour.js +0 -0
- package/lib/app/behaviour/sluggable_behaviour.js +0 -0
- package/lib/app/component/.gitkeep +0 -0
- package/lib/app/conduit/electron_conduit.js +0 -0
- package/lib/app/conduit/http_conduit.js +173 -173
- package/lib/app/conduit/socket_conduit.js +620 -620
- package/lib/app/controller/alchemy_info_controller.js +0 -0
- package/lib/app/datasource/mongo_datasource.js +0 -0
- package/lib/app/helper/client_collection.js +0 -0
- package/lib/app/helper/pagination_helper.js +0 -0
- package/lib/app/helper/router_helper.js +0 -0
- package/lib/app/helper/socket_helper.js +613 -613
- package/lib/app/helper_component/paginate_component.js +0 -0
- package/lib/app/helper_controller/component.js +0 -0
- package/lib/app/helper_controller/conduit.js +0 -0
- package/lib/app/helper_controller/controller.js +0 -0
- package/lib/app/helper_datasource/00-nosql_datasource.js +0 -0
- package/lib/app/helper_datasource/05-fallback_datasource.js +0 -0
- package/lib/app/helper_datasource/idb_datasource.js +0 -0
- package/lib/app/helper_datasource/indexed_db.js +0 -0
- package/lib/app/helper_field/00-objectid_field.js +0 -0
- package/lib/app/helper_field/06-text_field.js +0 -0
- package/lib/app/helper_field/10-number_field.js +0 -0
- package/lib/app/helper_field/boolean_field.js +0 -0
- package/lib/app/helper_field/date_field.js +0 -0
- package/lib/app/helper_field/datetime_field.js +0 -0
- package/lib/app/helper_field/enum_field.js +0 -0
- package/lib/app/helper_field/geopoint_field.js +0 -0
- package/lib/app/helper_field/habtm_field.js +0 -0
- package/lib/app/helper_field/hasoneparent_field.js +0 -0
- package/lib/app/helper_field/html_field.js +0 -0
- package/lib/app/helper_field/integer_field.js +0 -0
- package/lib/app/helper_field/object_field.js +0 -0
- package/lib/app/helper_field/regexp_field.js +0 -0
- package/lib/app/helper_field/schema_field.js +23 -2
- package/lib/app/helper_field/time_field.js +0 -0
- package/lib/app/helper_field/url_field.js +0 -0
- package/lib/app/helper_model/criteria.js +0 -0
- package/lib/app/helper_model/db_query.js +0 -0
- package/lib/app/helper_model/document_list.js +0 -0
- package/lib/app/model/alchemy_task_model.js +0 -0
- package/lib/app/routes.js +0 -0
- package/lib/app/view/alchemy/info.ejs +0 -0
- package/lib/app/view/error/unknown.ejs +0 -0
- package/lib/app/view/paginate/navlist.ejs +0 -0
- package/lib/bootstrap.js +0 -0
- package/lib/class/behaviour.js +0 -0
- package/lib/class/component.js +0 -0
- package/lib/class/conduit.js +2555 -2552
- package/lib/class/controller.js +4 -1
- package/lib/class/document_list.js +0 -0
- package/lib/class/helper.js +0 -0
- package/lib/class/inode.js +0 -0
- package/lib/class/inode_dir.js +0 -0
- package/lib/class/inode_file.js +112 -112
- package/lib/class/inode_list.js +0 -0
- package/lib/class/model.js +1772 -1769
- package/lib/class/path_definition.js +0 -0
- package/lib/class/route.js +0 -0
- package/lib/class/session.js +0 -0
- package/lib/class/task.js +0 -0
- package/lib/core/base.js +50 -9
- package/lib/core/discovery.js +0 -0
- package/lib/core/routing.js +0 -0
- package/lib/core/socket.js +159 -159
- package/lib/init/alchemy.js +1823 -1823
- package/lib/init/constants.js +0 -0
- package/lib/init/functions.js +8 -4
- package/lib/init/load_functions.js +0 -0
- package/lib/init/requirements.js +101 -101
- package/package.json +74 -74
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -364,7 +364,7 @@ SchemaField.setMethod(function _toApp(query, options, value, callback) {
|
|
|
364
364
|
*
|
|
365
365
|
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
366
366
|
* @since 1.1.4
|
|
367
|
-
* @version 1.
|
|
367
|
+
* @version 1.2.6
|
|
368
368
|
*/
|
|
369
369
|
SchemaField.setMethod(function translateRecord(prefixes, record, allow_empty) {
|
|
370
370
|
|
|
@@ -373,11 +373,18 @@ SchemaField.setMethod(function translateRecord(prefixes, record, allow_empty) {
|
|
|
373
373
|
translateRecord.super.call(this, prefixes, record, allow_empty);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
+
if (!record.$translated_fields) {
|
|
377
|
+
record.$translated_fields = {};
|
|
378
|
+
}
|
|
379
|
+
|
|
376
380
|
// Turn it into an array, some already are (is_array fields)
|
|
377
381
|
let subject = Array.cast(record[this.name]),
|
|
378
|
-
schema_record
|
|
382
|
+
schema_record,
|
|
383
|
+
count = -1;
|
|
379
384
|
|
|
380
385
|
for (schema_record of subject) {
|
|
386
|
+
count++;
|
|
387
|
+
|
|
381
388
|
if (this.field_schema.hasTranslations && schema_record) {
|
|
382
389
|
|
|
383
390
|
let field_name,
|
|
@@ -386,6 +393,20 @@ SchemaField.setMethod(function translateRecord(prefixes, record, allow_empty) {
|
|
|
386
393
|
for (field_name in this.field_schema.translatableFields) {
|
|
387
394
|
field = this.field_schema.translatableFields[field_name];
|
|
388
395
|
field.translateRecord(prefixes, schema_record, allow_empty);
|
|
396
|
+
|
|
397
|
+
if (schema_record.$translated_fields) {
|
|
398
|
+
for (let key in schema_record.$translated_fields) {
|
|
399
|
+
let path = this.name;
|
|
400
|
+
|
|
401
|
+
if (this.is_array) {
|
|
402
|
+
path += '.' + count;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
path += '.' + key;
|
|
406
|
+
|
|
407
|
+
record.$translated_fields[path] = schema_record.$translated_fields[key];
|
|
408
|
+
}
|
|
409
|
+
}
|
|
389
410
|
}
|
|
390
411
|
}
|
|
391
412
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/app/routes.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/bootstrap.js
CHANGED
|
File without changes
|
package/lib/class/behaviour.js
CHANGED
|
File without changes
|
package/lib/class/component.js
CHANGED
|
File without changes
|