diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-27 23:33:45 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-27 23:33:45 -0400 |
commit | 832adab4342c407db2b17e93eda60dcaaf4a97dd (patch) | |
tree | c680120a6c688218900885c16063397e7bed0fcc /data/assets/js | |
parent | 911d4fa9eb9f42e65facfa63e46ffcba660766ad (diff) | |
download | guff-832adab4342c407db2b17e93eda60dcaaf4a97dd.tar.bz2 guff-832adab4342c407db2b17e93eda60dcaaf4a97dd.zip |
refactor post types so icons and names aren't in 3 places
Diffstat (limited to 'data/assets/js')
-rw-r--r-- | data/assets/js/admin/tabs/posts.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/data/assets/js/admin/tabs/posts.js b/data/assets/js/admin/tabs/posts.js index 1cabc31..96d3a3c 100644 --- a/data/assets/js/admin/tabs/posts.js +++ b/data/assets/js/admin/tabs/posts.js @@ -85,12 +85,7 @@ jQuery(function($) { ], }); - var POST_TYPE_ICONS = { - blog: 'fa-sticky-note-o', - page: 'fa-bookmark-o', - project: 'fa-cube', - }; - + // FIXME: move this to DATA as well? var POST_STATES = { draft: { css: 'bg-warning', @@ -154,7 +149,7 @@ jQuery(function($) { return TEMPLATES.run('post', $.extend(row, { css: css, label: label, - icon: POST_TYPE_ICONS[row.post_type], + icon: DATA.post_types[row.post_type].icon, post_url: post_url, })); }).join('')); |