зеркало из https://github.com/mozilla/FlightDeck.git
Merge branch 'bug-666848-checkbox_named_revisions_list'
This commit is contained in:
Коммит
ab9f7bda95
|
@ -1,11 +1,11 @@
|
|||
{% load jetpack_extras %}
|
||||
<div id='display-package-revisions'>
|
||||
<div id="display-package-revisions">
|
||||
<h3>{% if current %}{{ current.full_name}}
|
||||
{% else %}{{ package.full_name }}{% endif %} - Revisions</h3>
|
||||
<div class="UI_Modal_Section">
|
||||
<ul class="UI_Revisions">
|
||||
{% for revision in revisions %}
|
||||
<li{% ifequal revision current %} class="current"{% endifequal %}>
|
||||
<li class="{% ifequal revision current %}current{% endifequal %} {% if revision.version_name %} version{% endif %}">
|
||||
<em class="date">{{ revision.created_at|date:"Y-m-d" }}</em>
|
||||
<a href="{{ revision.get_absolute_url }}">{{ revision.get_version_name }}</a>
|
||||
{% if revision.commit_message %}<span class='commit_message'>{{ revision.commit_message }}</span>{% endif %}
|
||||
|
@ -15,6 +15,15 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="UI_Modal_Actions">
|
||||
<ul><li><input type="reset" value="Close" class="closeModal"/></li></ul>
|
||||
<ul>
|
||||
<li><input type="reset" value="Close" class="closeModal"/></li>
|
||||
<li class="UI_Boolean_Action">
|
||||
<label>
|
||||
<input type="checkbox" value="1" id="versions_only" name="versions_only" />
|
||||
Show only named versions
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -77,6 +77,10 @@ authors:
|
|||
width: 90px;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.UI_Modal.boolean-on .UI_Modal_Section .UI_Revisions li:not(.version) {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.UI_Modal .UI_Modal_Section p:first-child {
|
||||
padding-top: 0px;
|
||||
|
@ -176,6 +180,37 @@ authors:
|
|||
border-top: solid 1px transparent;
|
||||
color: #6D7880;
|
||||
}
|
||||
|
||||
.UI_Modal .UI_Modal_Actions .UI_Boolean_Action {
|
||||
float:left;
|
||||
margin:0;
|
||||
text-shadow:1px 0 1px #fff;
|
||||
}
|
||||
|
||||
.UI_Modal.boolean-on .UI_Modal_Actions .UI_Boolean_Action {
|
||||
background:#555;
|
||||
color:#fff;
|
||||
text-shadow:1px 0 1px #000;
|
||||
}
|
||||
|
||||
.UI_Modal .UI_Modal_Actions .UI_Boolean_Action:hover {
|
||||
background:#fff;
|
||||
color:#4D5860;
|
||||
text-shadow:1px 0 1px #fff;
|
||||
}
|
||||
|
||||
.UI_Modal .UI_Modal_Actions .UI_Boolean_Action label {
|
||||
cursor:pointer;
|
||||
display:block;
|
||||
padding:8px;
|
||||
}
|
||||
|
||||
.UI_Modal .UI_Modal_Actions .UI_Boolean_Action label input {
|
||||
float:left;
|
||||
margin:2px 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.UI_Modal .UI_Modal_Section input {
|
||||
border:1px solid #bbb;
|
||||
|
|
|
@ -303,7 +303,21 @@ var Package = new Class({
|
|||
},
|
||||
url: that.options.revisions_list_html_url.substitute(that.options),
|
||||
onSuccess: function(html) {
|
||||
fd.displayModal(html);
|
||||
var modal = fd.displayModal(html),
|
||||
modalEl = $(modal).getElement('.UI_Modal'),
|
||||
showVersionsEl = modalEl.getElement('#versions_only');
|
||||
//setup handler for "Show versions only" checkbox
|
||||
function toggleVersionsOnly() {
|
||||
if (showVersionsEl.checked) {
|
||||
modalEl.addClass('boolean-on');
|
||||
} else {
|
||||
modalEl.removeClass('boolean-on');
|
||||
}
|
||||
}
|
||||
showVersionsEl.addEvent('change', function(e) {
|
||||
toggleVersionsOnly()
|
||||
});
|
||||
toggleVersionsOnly();
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче