Try adding this to the end of template.js - it should target all ranking questions.
Code:
$(document).ready(function() {
var lang = $('body').attr('class').split(' lang-')[1].split(' ')[0];
// The ranking interface text strings - Add/edit as required
rankingTranslations = {
en: {
choice: 'Your choices',
rank: 'Your ranking',
help: 'Double-click or drag-and-drop items in the left list to move them to the right - your highest ranking item should be on the top right, moving through to your lowest ranking item.'
},
de: {
choice: 'Ihre Auswahl',
rank: 'Ihre Rangfolge',
help: 'Ordnen Sie die Elemente in die rechte Liste ein (höchste Bewertung oben). Die Elemente können mit der Maus verschoben werden. Doppelklick verschiebt ein Element in die andere Liste.'
}
};
aRankingTranslations = {
choicetitle: rankingTranslations[lang]['choice'],
ranktitle: rankingTranslations[lang]['rank'],
rankhelp: rankingTranslations[lang]['help']
};
// Loop through all ranking questions
$('.question-container.ranking').each(function(e) {
// Apply the drag-drop ranking interface
var thisQID = $(thisQuestion).attr('id').replace(/question/, '');
doDragDropRank(thisQID, 1,1,1);
});
});
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Thank you. Unfortunately it does not work. I edited the template.js, have chosen the template and removed the code in the question. No luck. Any suggestions about that?
Thanks!
$(document).ready(function() {
var lang = $('body').attr('class').split(' lang-')[1].split(' ')[0];
// The ranking interface text strings - Add/edit as required
rankingTranslations = {
en: {
choice: 'Your choices',
rank: 'Your ranking',
help: 'Double-click or drag-and-drop items in the left list to move them to the right - your highest ranking item should be on the top right, moving through to your lowest ranking item.'
},
de: {
choice: 'Ihre Auswahl',
rank: 'Ihre Rangfolge',
help: 'Ordnen Sie die Elemente in die rechte Liste ein (höchste Bewertung oben). Die Elemente können mit der Maus verschoben werden. Doppelklick verschiebt ein Element in die andere Liste.'
}
};
aRankingTranslations = {
choicetitle: rankingTranslations[lang]['choice'],
ranktitle: rankingTranslations[lang]['rank'],
rankhelp: rankingTranslations[lang]['help']
};
// Loop through all ranking questions
$('.question-container.ranking').each(function(e) {
// Apply the drag-drop ranking interface
var thisQID = $(this).attr('id').replace(/question/, '');
doDragDropRank(thisQID, 1,1,1);
});
});
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.