Finalize FA5 fixes
This commit is contained in:
parent
3d6743dd14
commit
061322e53a
|
@ -1,6 +1,7 @@
|
||||||
import { categoryLinkHTML } from "discourse/helpers/category-link";
|
import { categoryLinkHTML } from "discourse/helpers/category-link";
|
||||||
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
|
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
|
||||||
import { bufferedRender } from "discourse-common/lib/buffered-render";
|
import { bufferedRender } from "discourse-common/lib/buffered-render";
|
||||||
|
import { iconHTML, convertIconClass } from "discourse-common/lib/icon-library";
|
||||||
|
|
||||||
function icon_or_image_replacement(str, ctx) {
|
function icon_or_image_replacement(str, ctx) {
|
||||||
str = Ember.get(ctx.contexts[0], str);
|
str = Ember.get(ctx.contexts[0], str);
|
||||||
|
@ -8,8 +9,9 @@ function icon_or_image_replacement(str, ctx) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.indexOf("fa-") === 0) {
|
if (str.indexOf("fa-") > -1) {
|
||||||
return new Handlebars.SafeString("<i class='fa " + str + "'></i>");
|
const icon = iconHTML(convertIconClass(str));
|
||||||
|
return new Handlebars.SafeString(icon);
|
||||||
} else {
|
} else {
|
||||||
return new Handlebars.SafeString("<img src='" + str + "'>");
|
return new Handlebars.SafeString("<img src='" + str + "'>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
{{#if othersDirty}}
|
{{#if othersDirty}}
|
||||||
<div class="warning">
|
<div class="warning">
|
||||||
{{fa-icon "warning"}}
|
{{d-icon "warning"}}
|
||||||
{{i18n "explorer.others_dirty"}}
|
{{i18n "explorer.others_dirty"}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="schema-table-name">
|
<div class="schema-table-name">
|
||||||
{{#if table.open}}
|
{{#if table.open}}
|
||||||
<i class="fa fa-caret-down"></i>
|
{{d-icon "caret-down"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="fa fa-caret-right"></i>
|
{{d-icon "caret-right"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{table.name}}
|
{{table.name}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<div>
|
<div>
|
||||||
<dt class="{{if col.sensitive "sensitive"}}" title="{{if col.sensitive (i18n "explorer.schema.sensitive")}}">
|
<dt class="{{if col.sensitive "sensitive"}}" title="{{if col.sensitive (i18n "explorer.schema.sensitive")}}">
|
||||||
{{#if col.sensitive}}
|
{{#if col.sensitive}}
|
||||||
<i class="fa fa-warning"></i>
|
{{d-icon "warning"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{col.column_name}}
|
{{col.column_name}}
|
||||||
</dt>
|
</dt>
|
||||||
|
@ -22,14 +22,15 @@
|
||||||
{{#if col.havetypeinfo}}
|
{{#if col.havetypeinfo}}
|
||||||
<br>
|
<br>
|
||||||
{{#if col.havepopup}}
|
{{#if col.havepopup}}
|
||||||
<i class="fa fa-info popup-info">
|
<div class="popup-info">
|
||||||
|
{{d-icon "info"}}
|
||||||
<div class="popup">
|
<div class="popup">
|
||||||
{{col.column_desc}}
|
{{col.column_desc}}
|
||||||
{{#if col.enum}}
|
{{#if col.enum}}
|
||||||
{{explorer-schema-enuminfo col=col}}
|
{{explorer-schema-enuminfo col=col}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</i>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<span class="schema-typenotes">
|
<span class="schema-typenotes">
|
||||||
{{col.notes}}
|
{{col.notes}}
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
<div class="jsfu-paste">
|
<div class="jsfu-paste">
|
||||||
{{textarea value=value}}
|
{{textarea value=value}}
|
||||||
</div>
|
</div>
|
||||||
<div class="jsfu-shade {{if hover '' 'hidden'}}"><span class="text">{{fa-icon "upload"}}</span></div>
|
<div class="jsfu-shade {{if hover '' 'hidden'}}"><span class="text">{{d-icon "upload"}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<aside class="quote" data-post="{{post.post_number}}" data-topic="{{post.topic_id}}">
|
<aside class="quote" data-post="{{post.post_number}}" data-topic="{{post.topic_id}}">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="quote-controls">
|
<div class="quote-controls">
|
||||||
{{!<i class="fa fa-chevron-down" title="expand/collapse"></i>}}
|
|
||||||
<a href="/t/via-quote/{{post.topic_id}}/{{post.post_number}}"
|
<a href="/t/via-quote/{{post.topic_id}}/{{post.post_number}}"
|
||||||
title="go to the quoted post"
|
title="go to the quoted post"
|
||||||
class="quote-other-topic">
|
class="quote-other-topic">
|
||||||
|
|
11
plugin.rb
11
plugin.rb
|
@ -7,8 +7,15 @@
|
||||||
enabled_site_setting :data_explorer_enabled
|
enabled_site_setting :data_explorer_enabled
|
||||||
register_asset 'stylesheets/explorer.scss'
|
register_asset 'stylesheets/explorer.scss'
|
||||||
|
|
||||||
register_svg_icon "upload" if respond_to?(:register_svg_icon)
|
if respond_to?(:register_svg_icon)
|
||||||
register_svg_icon "chevron-left" if respond_to?(:register_svg_icon)
|
register_svg_icon "caret-down"
|
||||||
|
register_svg_icon "caret-right"
|
||||||
|
register_svg_icon "chevron-left"
|
||||||
|
register_svg_icon "exclamation-circle"
|
||||||
|
register_svg_icon "info"
|
||||||
|
register_svg_icon "pencil-alt"
|
||||||
|
register_svg_icon "upload"
|
||||||
|
end
|
||||||
|
|
||||||
# route: /admin/plugins/explorer
|
# route: /admin/plugins/explorer
|
||||||
add_admin_route 'explorer.title', 'explorer'
|
add_admin_route 'explorer.title', 'explorer'
|
||||||
|
|
Loading…
Reference in New Issue