Bug 605678, added another truncated field
This commit is contained in:
Родитель
08c8efe686
Коммит
a2ebf037dc
|
@ -29,7 +29,7 @@
|
|||
{{ form.developer_comments.errors|safe }}
|
||||
{% else %}
|
||||
{% call empty_unless(addon.developer_comments) %}
|
||||
{{ addon.developer_comments|nl2br }}
|
||||
<div id="developer_comments">{{ addon.developer_comments|nl2br }}</div>
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
|
|
@ -150,7 +150,8 @@
|
|||
width: 250px;
|
||||
}
|
||||
|
||||
#addon_description {
|
||||
#addon_description,
|
||||
#developer_comments {
|
||||
max-height: 6.4em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
//Ownership
|
||||
if ($("#author_list").length) {
|
||||
initAuthorFields();
|
||||
}
|
||||
|
||||
//Payments
|
||||
if ($('.payments').length) {
|
||||
initPayments();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".more-actions-view-dropdown").popup(".more-actions-view", {
|
||||
width: 'inherit',
|
||||
|
@ -28,18 +42,26 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
function truncateFields() {
|
||||
var originalHTML = $("#addon_description").html();
|
||||
$("#addon_description").delegate("a.truncate_expand", "click", function(e) {
|
||||
e.preventDefault();
|
||||
$("#addon_description").html(originalHTML).css('max-height','none');
|
||||
|
||||
})
|
||||
.vtruncate({
|
||||
truncText: format("… <a href='#' class='truncate_expand'>{0}</a>",[gettext("More")])
|
||||
function truncateFields() {
|
||||
var els = [
|
||||
"#addon_description",
|
||||
"#developer_comments"
|
||||
];
|
||||
$(els.join(', ')).each(function(i,el) {
|
||||
var $el = $(el),
|
||||
originalHTML = $el.html();
|
||||
$el.delegate("a.truncate_expand", "click", function(e) {
|
||||
e.preventDefault();
|
||||
$el.html(originalHTML).css('max-height','none');
|
||||
})
|
||||
.vtruncate({
|
||||
truncText: format("… <a href='#' class='truncate_expand'>{0}</a>",[gettext("More")])
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function addonFormSubmit() {
|
||||
parent_div = $(this);
|
||||
|
||||
|
@ -55,21 +77,10 @@ function addonFormSubmit() {
|
|||
})(parent_div);
|
||||
}
|
||||
|
||||
|
||||
$("#user-form-template .email-autocomplete")
|
||||
.attr("placeholder", gettext("Enter a new author's email address"));
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
//Ownership
|
||||
if ($("#author_list").length) {
|
||||
initAuthorFields();
|
||||
}
|
||||
|
||||
//Payments
|
||||
if ($('.payments').length) {
|
||||
initPayments();
|
||||
}
|
||||
});
|
||||
|
||||
function initPayments() {
|
||||
var previews = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче