Allow empty board list.
This commit is contained in:
parent
9e03194f7d
commit
d41c9d9ee6
@ -1077,6 +1077,11 @@
|
|||||||
},
|
},
|
||||||
generateBoardList: function(text) {
|
generateBoardList: function(text) {
|
||||||
var as, list, nodes;
|
var as, list, nodes;
|
||||||
|
list = $('#custom-board-list', Header.bar);
|
||||||
|
list.innerHTML = null;
|
||||||
|
if (!text) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
as = $$('#full-board-list a', Header.bar).slice(0, -2);
|
as = $$('#full-board-list a', Header.bar).slice(0, -2);
|
||||||
nodes = text.match(/[\w@]+(-(all|title|full|text:"[^"]+"))?|[^\w@]+/g).map(function(t) {
|
nodes = text.match(/[\w@]+(-(all|title|full|text:"[^"]+"))?|[^\w@]+/g).map(function(t) {
|
||||||
var a, board, m, _i, _len;
|
var a, board, m, _i, _len;
|
||||||
@ -1112,8 +1117,6 @@
|
|||||||
}
|
}
|
||||||
return $.tn(t);
|
return $.tn(t);
|
||||||
});
|
});
|
||||||
list = $('#custom-board-list', Header.bar);
|
|
||||||
list.innerHTML = null;
|
|
||||||
return $.add(list, nodes);
|
return $.add(list, nodes);
|
||||||
},
|
},
|
||||||
toggleBoardList: function() {
|
toggleBoardList: function() {
|
||||||
|
|||||||
@ -59,6 +59,9 @@ Header =
|
|||||||
Header.setCatalogLinks Conf['Header catalog links']
|
Header.setCatalogLinks Conf['Header catalog links']
|
||||||
|
|
||||||
generateBoardList: (text) ->
|
generateBoardList: (text) ->
|
||||||
|
list = $ '#custom-board-list', Header.bar
|
||||||
|
list.innerHTML = null
|
||||||
|
return unless text
|
||||||
as = $$('#full-board-list a', Header.bar)[0...-2] # ignore the Settings and Home links
|
as = $$('#full-board-list a', Header.bar)[0...-2] # ignore the Settings and Home links
|
||||||
nodes = text.match(/[\w@]+(-(all|title|full|text:"[^"]+"))?|[^\w@]+/g).map (t) ->
|
nodes = text.match(/[\w@]+(-(all|title|full|text:"[^"]+"))?|[^\w@]+/g).map (t) ->
|
||||||
if /^[^\w@]/.test t
|
if /^[^\w@]/.test t
|
||||||
@ -87,8 +90,6 @@ Header =
|
|||||||
$.log t, t.match /-text:"(.+)"$/
|
$.log t, t.match /-text:"(.+)"$/
|
||||||
return a
|
return a
|
||||||
$.tn t
|
$.tn t
|
||||||
list = $ '#custom-board-list', Header.bar
|
|
||||||
list.innerHTML = null
|
|
||||||
$.add list, nodes
|
$.add list, nodes
|
||||||
|
|
||||||
toggleBoardList: ->
|
toggleBoardList: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user