diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-29 17:45:17 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-29 17:45:17 -0400 |
commit | 7d0f835f1da22ae6a0afcbae0db2bebe72ec1426 (patch) | |
tree | ed9ed63f8bba2f09c8d3be8d35dbfc1c60d212b3 /data | |
parent | 400a618843467ff7a2b6133711201d858451557b (diff) | |
download | guff-7d0f835f1da22ae6a0afcbae0db2bebe72ec1426.tar.bz2 guff-7d0f835f1da22ae6a0afcbae0db2bebe72ec1426.zip |
make upload a dropdown, add consistent button divider
Diffstat (limited to 'data')
-rw-r--r-- | data/assets/js/admin/tabs/files.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/data/assets/js/admin/tabs/files.js b/data/assets/js/admin/tabs/files.js index 1c01476..d378b46 100644 --- a/data/assets/js/admin/tabs/files.js +++ b/data/assets/js/admin/tabs/files.js @@ -96,8 +96,18 @@ jQuery(function($) { "</a>", "</li>", ], + + divider: [ + "<div class='btn-group btn-group-sm'>", + "<span> </span>", + "</div>", + ], }); + // cache templates + var NO_FILES = TEMPLATES.run('no_files'), + DIVIDER = TEMPLATES.run('divider'); + function get_selected_site() { var site_id = $('#files').data('site_id'); @@ -134,8 +144,6 @@ jQuery(function($) { return r; } - var NO_FILES = TEMPLATES.run('no_files'); - function reload() { var btns = $('#files-reload, #files-crumbs .btn'), list = $('#files'); @@ -159,7 +167,8 @@ jQuery(function($) { // draw crumbs var crumbs = get_crumbs($('#files').data('path')); $('#files-crumbs').html([ - make_site_dropdown() + make_site_dropdown(), + // DIVIDER, ].concat($.map(crumbs, function(crumb) { return TEMPLATES.run('crumb', { path: crumb, @@ -292,7 +301,10 @@ jQuery(function($) { return false; }); - $('#files-upload').click(function() { + $('#files-upload').on('click', 'a', function() { + // hide dropdown + $('body').trigger('click'); + alert('TODO: upload'); // stop event |