This commit is contained in:
Alexey Golubev 2019-07-09 19:18:09 +03:00
commit 55253c4d75
4 changed files with 14 additions and 14 deletions

View file

@ -101,7 +101,7 @@
mode : urlParams["mode"] || 'edit', mode : urlParams["mode"] || 'edit',
lang : urlParams["lang"] || 'en', lang : urlParams["lang"] || 'en',
user: { user: {
id: urlParams["userid"] || 'uid-901', name: urlParams["username"] || 'Chuk.Gek' id: urlParams["userid"] || urlParams["username"] || 'uid-901', name: urlParams["username"] || 'Chuk.Gek'
} }
}; };
} }

View file

@ -304,7 +304,7 @@ define([
} else if (index === 0) { } else if (index === 0) {
menuRoot.prepend(item.render().el); menuRoot.prepend(item.render().el);
} else { } else {
$('li:nth-child(' + (index+1) + ')', menuRoot).before(item.render().el); menuRoot.children('li:nth-child(' + (index+1) + ')').before(item.render().el);
} }
item.on('click', _.bind(me.onItemClick, me)); item.on('click', _.bind(me.onItemClick, me));

View file

@ -815,19 +815,19 @@ define([
if (arr.length > 0) { if (arr.length > 0) {
if (isParagraph) { if (isParagraph) {
_.each(arr, function(variant){ _.each(arr, function(variant, index){
me.textMenu.insertItem(0, variant); me.textMenu.insertItem(index, variant);
}) })
} else { } else {
_.each(arr, function(variant){ _.each(arr, function(variant, index){
me.menuSpellCheckTable.menu.insertItem(0, variant); me.menuSpellCheckTable.menu.insertItem(index, variant);
}) })
} }
} }
if (arrMore.length > 0) { if (arrMore.length > 0) {
_.each(arrMore, function(variant){ _.each(arrMore, function(variant, index){
moreMenu.menu.insertItem(0, variant); moreMenu.menu.addItem(variant);
}); });
} }

View file

@ -766,19 +766,19 @@ define([
if (arr.length > 0) { if (arr.length > 0) {
if (isParagraph) { if (isParagraph) {
_.each(arr, function(variant){ _.each(arr, function(variant, index){
me.textMenu.insertItem(0, variant); me.textMenu.insertItem(index, variant);
}) })
} else { } else {
_.each(arr, function(variant){ _.each(arr, function(variant, index){
me.menuSpellCheckTable.menu.insertItem(0, variant); me.menuSpellCheckTable.menu.insertItem(index, variant);
}) })
} }
} }
if (arrMore.length > 0) { if (arrMore.length > 0) {
_.each(arrMore, function(variant){ _.each(arrMore, function(variant, index){
moreMenu.menu.insertItem(0, variant); moreMenu.menu.addItem(variant);
}); });
} }