Commit dbd7ca4b authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

972: Fix some minor UI glitches

Task-Url: https://pm.winseda.de/issues/972
parent 9d08de5c
......@@ -61,8 +61,13 @@ CustomSearchEditor.prototype.showCustomSearches = function(data) {
}
});
var firstCs;
for (var i=0; i<data.length; i++) {
var uc = data[i].entity;
if (i==0) {
firstCs = uc.id;
}
var element = '<li class="source-select-ucId" id="source-select-ucId-' + uc.id + '">' +
'<a href="javascript:void(0)" onclick="editor.setActiveSearch(\'' + uc.id + '\'); editor.refresh(); return false;">' +
......@@ -97,6 +102,10 @@ CustomSearchEditor.prototype.showCustomSearches = function(data) {
$("#source-select-ucIds").append(element);
}
if (firstCs!==undefined) {
this.setActiveSearch(firstCs);
}
};
CustomSearchEditor.prototype.setActiveSearch = function(ucId) {
......
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