some ui improvements

This commit is contained in:
Manuel Simon Hirsig
2016-08-06 16:07:31 +02:00
parent 135ebbd536
commit b94cabfc08
22 changed files with 379 additions and 318 deletions
+13 -13
View File
@@ -543,12 +543,12 @@ function public.indented_post_query_string(components)
if component[1] == 'operator' and component[2] then
no_line_break = component[2] == 'not'
str = str..'|cffffff00'..component[2]..(tonumber(component[3]) or '')..'|r'
str = str..'|cffffff00'..component[2]..(tonumber(component[3]) or '')..FONT_COLOR_CODE_CLOSE
tinsert(stack, component[3] or '*')
elseif component[1] == 'filter' then
str = str..'|cffffff00'..component[2]..'|r'
str = str..'|cffffff00'..component[2]..FONT_COLOR_CODE_CLOSE
if component[3] then
str = str..': '..'|cffff9218'..component[3]..'|r'
str = str..': '..'|cffff9218'..component[3]..FONT_COLOR_CODE_CLOSE
end
while getn(stack) > 0 and stack[getn(stack)] ~= '*' do
local top = tremove(stack)
@@ -570,29 +570,29 @@ function private.prettified_query_string(components)
for _, filter in components.blizzard do
blizzard_filters[filter[1]] = filter[2] or true
if filter[1] == 'exact' then
prettified.prepend(aux.info.display_name(aux.cache.item_id(m.unquote(blizzard_filters.name))) or aux.gui.inline_color({216, 225, 211, 1})..'['..m.unquote(blizzard_filters.name)..']|r')
prettified.prepend(aux.info.display_name(aux.cache.item_id(m.unquote(blizzard_filters.name))) or aux.gui.inline_color.label.enabled..'['..m.unquote(blizzard_filters.name)..']|r')
elseif filter[1] ~= 'name' then
prettified.append(aux.gui.inline_color({216, 225, 211, 1})..(filter[2] or filter[1])..'|r')
prettified.append(aux.gui.inline_color.label.enabled..(filter[2] or filter[1])..FONT_COLOR_CODE_CLOSE)
end
end
if blizzard_filters.name and not blizzard_filters.exact then
if m.unquote(blizzard_filters.name) == '' then
prettified.prepend('|cffff0000'..'No Filter'..'|r')
prettified.prepend(RED_FONT_COLOR_CODE..'No Filter'..FONT_COLOR_CODE_CLOSE)
else
prettified.prepend(aux.gui.inline_color({216, 225, 211, 1})..m.unquote(blizzard_filters.name)..'|r')
prettified.prepend(aux.gui.inline_color.label.enabled..m.unquote(blizzard_filters.name)..FONT_COLOR_CODE_CLOSE)
end
end
for _, component in components.post do
if component[1] == 'operator' then
prettified.append('|cffffff00'..component[2]..(tonumber(component[3]) or '')..'|r')
prettified.append('|cffffff00'..component[2]..(tonumber(component[3]) or '')..FONT_COLOR_CODE_CLOSE)
elseif component[1] == 'filter' then
if component[2] ~= 'tooltip' then
prettified.append('|cffffff00'..component[2]..'|r')
prettified.append('|cffffff00'..component[2]..FONT_COLOR_CODE_CLOSE)
end
if component[3] then
prettified.append('|cffff9218'..component[3]..'|r')
prettified.append('|cffff9218'..component[3]..FONT_COLOR_CODE_CLOSE)
end
end
end
@@ -676,15 +676,15 @@ function private.validator(components)
if name == 'not' then
tinsert(stack, not args[1])
elseif name == 'and' then
tinsert(stack, aux.util.all(args, aux.util.id))
tinsert(stack, aux.util.all(args))
elseif name == 'or' then
tinsert(stack, aux.util.any(args, aux.util.id))
tinsert(stack, aux.util.any(args))
end
elseif type == 'filter' then
tinsert(stack, validators[i](record) and true or false)
end
end
return aux.util.all(stack, aux.util.id)
return aux.util.all(stack)
end
end