Skip to content

Commit

Permalink
Use button-group class from foundation-6
Browse files Browse the repository at this point in the history
  • Loading branch information
mpasternak committed Mar 7, 2018
1 parent 99b2d4b commit b705c6c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
18 changes: 11 additions & 7 deletions multiseek/static/multiseek/js/multiseek.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,16 @@ $.widget("multiseek.multiseekFrame", $.multiseek.multiseekBase, {
.attr("id", "prev-op-placeholder");

var fieldset = $("<fieldset />")
.addClass("multiseek-fieldset large-11 small-10 cell")
.append([
.addClass("multiseek-fieldset large-11 small-10 cell")
.append([

$("<div/>")
.attr("id", "field-list")
.addClass("cell"),
$("<div/>")
.attr("id", "field-list")
.addClass("cell"),

$("<div/>")
.addClass("button-group")
.append([

$("<button/>")
.attr("id", "add_field")
Expand All @@ -514,7 +518,6 @@ $.widget("multiseek.multiseekFrame", $.multiseek.multiseekBase, {
gettext("Add field")
])
,
" ",
$("<button/>")
.attr("id", "add_frame")
.attr("type", "button")
Expand All @@ -531,7 +534,8 @@ $.widget("multiseek.multiseekFrame", $.multiseek.multiseekBase, {
" ",
gettext("Add frame")
])
]);
])
]);

if (!multiseek.frame_counter) {
div = "";
Expand Down
50 changes: 28 additions & 22 deletions multiseek/templates/multiseek/multiseek_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,24 @@
{% block buttons %}
<div class="grid-x">
<div class="large-6 cell">
<button type="button" class="button" onclick="submitEvent(this); return false;" id="sendQueryButton">
{% trans "Send query" %}
</button>

<button type="button" class="button alert" onclick="resetForm(this); return false;" id="resetFormButton">
{% trans "Reset form" %}
</button>
<div class="button-group">
<button type="button" class="button" onclick="submitEvent(this); return false;" id="sendQueryButton">
{% trans "Send query" %}
</button>

{% if user_allowed_to_save_forms %}
<button type="button"
class="button warning"
onclick="saveForm(this);return false;" id="saveFormButton">
{% trans "Save form" %}
<button type="button" class="button alert" onclick="resetForm(this); return false;"
id="resetFormButton">
{% trans "Reset form" %}
</button>
{% else %}
{% url "admin:index" as admin_index %}
<br/>
{% blocktrans %}
Please go to <a href="{{ admin_index }}">admin page</a>
to log in, then come back. You will be able to save created
forms.
{% endblocktrans %}
<br/>
{% endif %}

{% if user_allowed_to_save_forms %}
<button type="button"
class="button warning"
onclick="saveForm(this);return false;" id="saveFormButton">
{% trans "Save form" %}
</button>
{% endif %}
</div>
</div>
<div class="large-6 cell">
<select name="load" onchange="loadForm(this);" id="formsSelector">
Expand All @@ -37,4 +31,16 @@
</select>
</div>
</div>
<p>
{% if not user_allowed_to_save_forms %}
{% url "admin:index" as admin_index %}
{% blocktrans %}
Please go to <a href="{{ admin_index }}">admin page</a>
to log in, then come back. You will be able to save created
forms.
{% endblocktrans %}
<br/>
{% endif %}

</p>
{% endblock %}

0 comments on commit b705c6c

Please sign in to comment.