Skip to content

Commit

Permalink
project config for Porto experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishokamp committed Dec 29, 2016
1 parent 33665d2 commit 213d02b
Show file tree
Hide file tree
Showing 6 changed files with 361 additions and 137 deletions.
308 changes: 252 additions & 56 deletions app/scripts/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ handyCATconfig.constant('glossaryURL', glossaryURL);
var loggerURL = 'logger';
handyCATconfig.constant('loggerURL', loggerURL);

// this is the default configuration -- projects can override this config
// TODO: raw textarea component (no typeahead)
// this is the default global configuration -- projects can override this config
handyCATconfig.constant('projectCreationConfiguration',
{
showFileCreation: false,
showRawTextCreation: false,
showExperiment: true
});

handyCATconfig.constant('widgetConfiguration',
{
'segmentControls': {
Expand All @@ -88,8 +96,6 @@ handyCATconfig.constant('widgetConfiguration',
activeComponent: 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
// a list of the available components
// TODO: raw textarea component (no typeahead)
// TODO: key which indicates whether the component is available
components: [
{
'directiveName': 'typeaheadEditor',
Expand All @@ -110,104 +116,294 @@ handyCATconfig.constant('widgetConfiguration',
// allow experiment configuration via handyCAT config
var experimentGroups = [
{
name: 'Group One',
name : 'Demo',
sampleFiles: [
{
name: 'Mobile Phone Instructions - Post Editor',
url: 'data/porto_experiments/matecat/Project_1_-_Mobile_phone_instructions.doc.xlf',
name : 'Session 0 - Project 0 - Post Editor',
internalName : 'Mobile Phone Instructions - Post Editor',
url : 'data/porto_experiments/matecat/Project_1_-_Mobile_phone_instructions.doc.xlf',
configuration: {
target :{
activeComponent: 'postEditor',
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components: [
components : [
{
directiveName: 'postEditor',
textName: 'Post Editor'
textName : 'Post Editor'
}
]
}
},
},
{
name: 'Mobile Phone Instructions - Autocomplete',
url: 'data/porto_experiments/matecat/Project_1_-_Mobile_phone_instructions.doc.xlf',
name : 'Session 0 - Project 0 - Autocomplete',
internalName : 'Mobile Phone Instructions - Autocomplete',
url : 'data/porto_experiments/matecat/Project_1_-_Mobile_phone_instructions.doc.xlf',
configuration: {
target :{
activeComponent: 'typeaheadEditor',
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components: [
components : [
{
directiveName: 'typeaheadEditor',
textName: 'Autocomplete'
textName : 'Autocomplete'
}
]
}
},
}
]
},
{
name : 'Group 1',
sampleFiles: [
{
name : 'Group 1 - Session 1',
internalName : 'Marketing Questionnaire - Autocomplete',
url : 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
configuration: {
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components : [
{
directiveName: 'typeaheadEditor',
textName : 'Autocomplete'
}
]
}
},
},
{name: 'Marketing Questionnaire', url: 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
},
{name: 'Product Catalog - Office Supplies', url: 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
{
name : 'Group 1 - Session 2',
internalName : 'Product Catalog - Office Supplies - postEditor',
url : 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
configuration: {
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components : [
{
directiveName: 'postEditor',
textName : 'Post Editor'
}
]
}
},
},
{name: 'User Manual: Industrial Equipment', url: 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
{
name : 'Group 1 - Session 3',
internalName : 'User Manual - Industrial Equipment - Autocomplete',
url : 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
configuration: {
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components : [
{
directiveName: 'typeaheadEditor',
textName : 'Autocomplete'
}
]
}
},
},
//{name: 'en-es-sentences_1', url: 'data/malaga_experiments/en-es_sentences_1.xlf',
// configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
//},
//{name: 'en-es-sentences_4', url: 'data/malaga_experiments/en-es_sentences_2.xlf',
// configuration: {'target': {'widgets': {'defaultLMAutocomplete': true}}}
//},
{
name : 'Group 1 - Session 4',
internalName : '',
url : 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
configuration: {
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components : [
{
directiveName: 'postEditor',
textName : 'Post Editor'
}
]
}
}
}
]
},
{
name: 'Group N',
name : 'Group 2',
sampleFiles: [
{
name: 'Mobile Phone Instructions',
url: 'data/porto_experiments/matecat/Project_1_-_Mobile_phone_instructions.doc.xlf',
name : 'Group 2 - Session 1',
internalName : 'Product Catalog - Office Supplies - Autocomplete',
url : 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
configuration: {
target :{
components: [
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components : [
{
directiveName: 'typeaheadEditor',
textName : 'Autocomplete'
}
]
}
},
},
{
name : 'Group 2 - Session 2',
internalName : 'User Manual - Industrial Equipment - Post Editor',
url : 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
configuration: {
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components : [
{
directiveName: 'postEditor',
textName: 'postEditor'
// directiveName: 'typeaheadEditor',
// textName: 'typeaheadEditor'
textName : 'Post Editor'
}
]
}
}
},
{
name : 'Group 2 - Session 3',
internalName : 'Marketing Questionnaire - Autocomplete',
url : 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
configuration: {
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components : [
{
directiveName: 'typeaheadEditor',
textName : 'Autocomplete'
}
]
}
},
},
{name: 'Marketing Questionnaire', url: 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
{
name : 'Group 2 - Session 4',
internalName : 'Marketing Questionnaire - Post Editor',
url : 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
configuration: {
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components : [
{
directiveName: 'postEditor',
textName : 'Post Editor'
}
]
}
},
}
]
},
{
name : 'Group 3',
sampleFiles: [
{
name : 'Group 3 - Session 1',
internalName : 'User Manual - Industrial Equipment - Autocomplete',
url : 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
configuration: {
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components : [
{
directiveName: 'typeaheadEditor',
textName : 'Autocomplete'
}
]
}
}
},
{
name : 'Group 3 - Session 2',
internalName : 'Marketing Questionnaire - Post Editor',
url : 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
configuration: {
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components : [
{
directiveName: 'postEditor',
textName : 'Post Editor'
}
]
}
},
},
{name: 'Product Catalog - Office Supplies', url: 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
{
name : 'Group 3 - Session 3',
internalName : 'Product Catalog - Office Supplies - Autocomplete',
url : 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
configuration: {
target: {
activeComponent : 'typeaheadEditor',
defaultComponent: 'typeaheadEditor',
components : [
{
directiveName: 'typeaheadEditor',
textName : 'Autocomplete'
}
]
}
},
},
{name: 'User Manual: Industrial Equipment', url: 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
{
name : 'Group 3 - Session 4',
internalName : 'Product Catalog - Office Supplies - Post Editor',
url : 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
configuration: {
target: {
activeComponent : 'postEditor',
defaultComponent: 'postEditor',
components : [
{
directiveName: 'postEditor',
textName : 'Post Editor'
}
]
}
},
},
//{name: 'en-es-sentences_1', url: 'data/malaga_experiments/en-es_sentences_1.xlf',
// configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
//},
//{name: 'en-es-sentences_4', url: 'data/malaga_experiments/en-es_sentences_2.xlf',
// configuration: {'target': {'widgets': {'defaultLMAutocomplete': true}}}
//},
]
},
}
// TODO: add a separate constant for sample files
// {
// name: 'Group Two',
// name: 'Group N',
// sampleFiles: [
// {name: 'en-es-sentences_2', url: 'data/malaga_experiments/en-es_sentences_2.xlf',
// {
// name: 'Mobile Phone Instructions',
// url: 'data/porto_experiments/matecat/Project_1_-_Mobile_phone_instructions.doc.xlf',
// configuration: {
// target :{
// components: [
// {
// directiveName: 'postEditor',
// textName: 'postEditor'
// // directiveName: 'typeaheadEditor',
// // textName: 'typeaheadEditor'
// }
// ]
// }
// },
// },
// {name: 'Marketing Questionnaire', url: 'data/porto_experiments/matecat/Project_2_-_Marketing_questionnaire.doc.xlf',
// configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
// },
// {name: 'Product Catalog - Office Supplies', url: 'data/porto_experiments/matecat/Project_3_-_Product_catalog_-_Office_supplies.doc.xlf',
// configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
// },
// {name: 'User Manual: Industrial Equipment', url: 'data/porto_experiments/matecat/Project_4_-_User_manual_-_industrial_equipment.doc.xlf',
// configuration: {'target': {'widgets': {'constrainedLMAutocomplete': true}}}
// },
// {name: 'en-es-sentences_3', url: 'data/malaga_experiments/en-es_sentences_1.xlf',
// configuration: {'target': {'widgets': {'defaultLMAutocomplete': true}}}
// }
// ]
// }
// },
]

handyCATconfig.constant('experimentGroups', experimentGroups)
Expand Down
Loading

0 comments on commit 213d02b

Please sign in to comment.