Commit e4e13d8a authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add the automaton field to the category store.

parent 5d792430
......@@ -17,6 +17,14 @@ Ext.define('Trp.wizard.Harvester', {
url: 'wizards/harvester',
// private properties for internationalisation
textArticle: "article",
textNote: "note",
textPreprint: "preprint",
textProceeding: "proceeding",
textReport: "report",
textTalk: "talk",
textThesis: "thesis",
textCategory: [
"<h4> 3/7 category</h4>",
"<p>Select the <i>category of publication</i> you are looking for:</p>"
......@@ -195,30 +203,41 @@ Ext.define('Trp.wizard.Harvester', {
if (selectedStore === "cds.cern.ch") {
storeCategory.loadData([{
category: "article"
automaton: "articles",
category: me.textArticle
}, {
category: "note"
automaton: "notes",
category: me.textNote
}, {
category: "preprint"
automaton: "preprints",
category: me.textPreprint
}, {
category: "proceeding"
automaton: "proceedings",
category: me.textProceeding
}, {
category: "report"
automaton: "reports",
category: me.textReport
}, {
category: "talk"
automaton: "talks",
category: me.textTalk
}, {
category: "thesis"
automaton: "theses",
category: me.textThesis
}]);
} else if (selectedStore === "inspirehep.net") {
storeCategory.loadData([{
category: "article"
automaton: "articles",
category: me.textArticle
}, {
category: "proceeding"
automaton: "proceedings",
category: me.textProceeding
}]);
}
storeCategory.sort();
// wizard pages depends on the selected store
if (selectedStore === "cds.cern.ch") {
......@@ -275,7 +294,7 @@ Ext.define('Trp.wizard.Harvester', {
cfg;
categories = Ext.create('Ext.data.ArrayStore', {
fields: ['category']
fields: ['category', 'automaton']
});
cfg = {
......@@ -292,7 +311,7 @@ Ext.define('Trp.wizard.Harvester', {
name: 'category',
selectFirst: true,
store: categories,
valueField: 'category',
valueField: 'automaton',
xtype: 'xcombobox'
}]
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment