Refactor default and bobcat theme re: "context menu" styles

finally, we have that hugging the top right corner, without float!
This commit is contained in:
Lance Edgar 2018-11-29 12:04:29 -06:00
parent c88e1cca68
commit 291128b96f
8 changed files with 182 additions and 60 deletions

View file

@ -81,12 +81,12 @@ ${h.csrf_token(request)}
% elif not readonly and (buttons is Undefined or (buttons is not None and buttons is not False)):
<div class="buttons">
## ${h.submit('create', form.create_label if form.creating else form.update_label)}
${h.submit('save', getattr(form, 'submit_label', getattr(form, 'save_label', "Submit")))}
${h.submit('save', getattr(form, 'submit_label', getattr(form, 'save_label', "Submit")), class_='button is-primary')}
## % if form.creating and form.allow_successive_creates:
## ${h.submit('create_and_continue', form.successive_create_label)}
## % endif
% if getattr(form, 'show_reset', False):
<input type="reset" value="Reset" />
<input type="reset" value="Reset" class="button" />
% endif
% if getattr(form, 'show_cancel', True):
% if form.mobile:

View file

@ -69,13 +69,17 @@
% endif
</%def>
<ul id="context-menu">
${self.context_menu_items()}
</ul>
<div style="display: flex; justify-content: space-between;">
<div class="form-wrapper">
${form.render()|n}
</div><!-- form-wrapper -->
<div class="form-wrapper">
${form.render()|n}
</div><!-- form-wrapper -->
<ul id="context-menu">
${self.context_menu_items()}
</ul>
</div>
% if master.has_rows:
${rows_grid|n}

View file

@ -105,10 +105,14 @@
## Theme Picker
% if expose_theme_picker and request.has_perm('common.change_app_theme'):
<div class="level-item">
${h.form(url('change_theme'), name="theme_changer", method="post")}
${h.form(url('change_theme'), method="post")}
${h.csrf_token(request)}
Theme:
${h.select('theme', theme, options=theme_picker_options, id='theme-picker')}
<div class="theme-picker">
<div class="select">
${h.select('theme', theme, options=theme_picker_options, id='theme-picker')}
</div>
</div>
${h.end_form()}
</div>
% endif
@ -122,7 +126,7 @@
## Feedback Button
<div class="level-item">
<button type="button" id="feedback">Feedback</button>
<button type="button" class="button is-primary" id="feedback">Feedback</button>
</div>
</div><!-- level-right -->
@ -137,13 +141,13 @@
</section>
## Page Body
<section>
<section id="page-body">
% if request.session.peek_flash('error'):
% for error in request.session.pop_flash('error'):
<div class="notification is-warning">
<button class="delete"></button>
${error|n}
<!-- <button class="delete"></button> -->
${error}
</div>
% endfor
% endif
@ -151,8 +155,8 @@
% if request.session.peek_flash():
% for msg in request.session.pop_flash():
<div class="notification is-info">
<button class="delete"></button>
${msg|n}
<!-- <button class="delete"></button> -->
${msg}
</div>
% endfor
% endif
@ -200,7 +204,6 @@
<%def name="core_javascript()">
${self.jquery()}
${h.javascript_link(request.static_url('tailbone:static/js/lib/jquery.ui.menubar.js'))}
${h.javascript_link(request.static_url('tailbone:static/js/lib/jquery.loadmask.min.js'))}
${h.javascript_link(request.static_url('tailbone:static/js/lib/jquery.ui.timepicker.js'))}
<script type="text/javascript">
@ -214,16 +217,6 @@
});
});
% endif
## TODO: replace this with bulma menu!
$(function() {
$('ul.menubar').menubar({
buttons: true,
menuIcon: true,
autoExpand: true
});
});
</script>
${h.javascript_link(request.static_url('tailbone:static/js/tailbone.js') + '?ver={}'.format(tailbone.__version__))}
${h.javascript_link(request.static_url('tailbone:static/js/tailbone.feedback.js') + '?ver={}'.format(tailbone.__version__))}
@ -242,7 +235,6 @@
${h.stylesheet_link('https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css')}
${self.jquery_theme()}
${h.stylesheet_link(request.static_url('tailbone:static/css/jquery.ui.menubar.css'))}
${h.stylesheet_link(request.static_url('tailbone:static/css/jquery.loadmask.css'))}
${h.stylesheet_link(request.static_url('tailbone:static/css/jquery.ui.timepicker.css'))}
${h.stylesheet_link(request.static_url('tailbone:static/css/jquery.ui.tailbone.css') + '?ver={}'.format(tailbone.__version__))}
@ -251,7 +243,7 @@
${h.stylesheet_link(request.static_url('tailbone:static/themes/bobcat/css/layout.css') + '?ver={}'.format(tailbone.__version__))}
${h.stylesheet_link(request.static_url('tailbone:static/css/grids.css') + '?ver={}'.format(tailbone.__version__))}
${h.stylesheet_link(request.static_url('tailbone:static/css/filters.css') + '?ver={}'.format(tailbone.__version__))}
${h.stylesheet_link(request.static_url('tailbone:static/css/forms.css') + '?ver={}'.format(tailbone.__version__))}
${h.stylesheet_link(request.static_url('tailbone:static/themes/bobcat/css/forms.css') + '?ver={}'.format(tailbone.__version__))}
${h.stylesheet_link(request.static_url('tailbone:static/css/diffs.css') + '?ver={}'.format(tailbone.__version__))}
</%def>