Revert "Remove zamboni/global.js from devhub" (bug 844105)
This reverts commit f4952b1ca6
.
This commit is contained in:
Родитель
62c2297f5c
Коммит
a50f81ca30
|
@ -6,8 +6,12 @@
|
|||
line-height: 1.3;
|
||||
}
|
||||
|
||||
#author-roles-help dl {
|
||||
margin-top: 2em;
|
||||
#author-roles-help {
|
||||
/* Popup! */
|
||||
display: none;
|
||||
li + li {
|
||||
margin-top: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
#what-are-roles {
|
||||
|
|
|
@ -266,6 +266,17 @@ $(document).ready(function() {
|
|||
$(document).ready(function() {
|
||||
$.ajaxSetup({cache: false});
|
||||
|
||||
$('.more-actions-popup').each(function() {
|
||||
var el = $(this);
|
||||
el.popup(el.closest('li').find('.more-actions'), {
|
||||
width: 'inherit',
|
||||
offset: {x: 15},
|
||||
callback: function(obj) {
|
||||
return {pointTo: $(obj.click_target)};
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.modal-delete').each(function() {
|
||||
var el = $(this);
|
||||
el.modal(el.closest('li').find('.delete-addon'), {
|
||||
|
@ -930,14 +941,7 @@ function initLicenseFields() {
|
|||
|
||||
function initAuthorFields() {
|
||||
// Add the help line after the blank author row.
|
||||
$('#what-are-roles').on('click', _pd(function() {
|
||||
var overlay = makeOrGetOverlay({});
|
||||
overlay.html($('#author-roles-help-template').html())
|
||||
.addClass('show');
|
||||
overlay.on('click', '.close', _pd(function() {
|
||||
overlay.trigger('overlay_dismissed')
|
||||
}));
|
||||
}))
|
||||
$('#author-roles-help').popup('#what-are-roles', {pointTo: $('#what-are-roles') });
|
||||
|
||||
if (z.noEdit) return;
|
||||
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
jQuery.fn.tooltip = function(tip_el) {
|
||||
var $tip = $(tip_el),
|
||||
$msg = $('span', $tip),
|
||||
$targets = this,
|
||||
timeout = false,
|
||||
$tgt, $title, delay;
|
||||
|
||||
function setTip() {
|
||||
if (!$tgt) return;
|
||||
var pos = $tgt.offset(),
|
||||
title = $title.attr('title'),
|
||||
html = $title.attr('data-tooltip-html');
|
||||
|
||||
delay = $title.is('[data-delay]') ? $title.attr('data-delay') : 300;
|
||||
|
||||
if (!html && title.indexOf('::') > 0) {
|
||||
var title_split = title.split('::');
|
||||
$msg.text("");
|
||||
$msg.append($("<strong>", {'text': title_split[0].trim()}));
|
||||
$msg.append($("<span>", {'text': title_split[1].trim()}));
|
||||
} else {
|
||||
$msg[html ? 'html' : 'text'](title);
|
||||
}
|
||||
|
||||
$title.attr('data-oldtitle', title).attr('title', '');
|
||||
|
||||
var tw = $tip.outerWidth(false) / 2,
|
||||
th = $tip.outerHeight(false),
|
||||
toX = pos.left + $tgt.innerWidth() / 2 - tw - 1,
|
||||
toY = pos.top - $tgt.innerHeight() - th - 2;
|
||||
|
||||
timeout = setTimeout(function () {
|
||||
$tip.css({
|
||||
left: toX + "px",
|
||||
top: toY + "px"
|
||||
}).show();
|
||||
}, delay);
|
||||
}
|
||||
|
||||
$(document.body).bind("tooltip_change", setTip);
|
||||
|
||||
function mouseover(e) {
|
||||
$tgt = $(this);
|
||||
if ($tgt.hasClass("formerror")) $tip.addClass("error");
|
||||
$title = $tgt.attr('title') ? $tgt : $("[title]", $tgt).first();
|
||||
if ($title.length) {
|
||||
setTip();
|
||||
}
|
||||
}
|
||||
|
||||
function mouseout(e) {
|
||||
clearTimeout(timeout);
|
||||
$tip.hide()
|
||||
.removeClass("error");
|
||||
if ($title && $title.length) {
|
||||
$tgt = $(this);
|
||||
$title.attr('title', $title.attr('data-oldtitle'))
|
||||
.attr('data-oldtitle', '');
|
||||
}
|
||||
}
|
||||
|
||||
if (parseFloat(jQuery.fn.jquery) < 1.7) {
|
||||
// TODO: Upgrade to jQuery 1.9 on AMO (bug 841819).
|
||||
$targets.live('mouseover', mouseover)
|
||||
.live('mouseout', mouseout);
|
||||
} else {
|
||||
$targets.on('mouseover', mouseover)
|
||||
.on('mouseout', mouseout);
|
||||
}
|
||||
};
|
||||
|
||||
// Setting up site tooltips.
|
||||
$(document).ready(function() {
|
||||
$(".tooltip").tooltip("#tooltip");
|
||||
});
|
|
@ -178,8 +178,6 @@ JS = {
|
|||
'js/amo2009/addons.js',
|
||||
'js/mkt/tracking.js',
|
||||
'js/devreg/init.js', # This one excludes buttons initialization, etc.
|
||||
'js/devreg/tooltip.js',
|
||||
'js/mkt/modal.js',
|
||||
'js/mkt/capabilities.js',
|
||||
'js/lib/format.js',
|
||||
'js/lib/jquery.cookie.js',
|
||||
|
@ -194,6 +192,7 @@ JS = {
|
|||
'js/lib/truncate.js',
|
||||
'js/zamboni/truncation.js',
|
||||
'js/zamboni/helpers.js',
|
||||
'js/zamboni/global.js',
|
||||
'js/zamboni/l10n.js',
|
||||
'js/zamboni/debouncer.js',
|
||||
|
||||
|
|
|
@ -52,30 +52,45 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a class="action-link status-link" href="{{ addon.get_dev_url('versions') }}">
|
||||
{{ _('Manage Status & Versions') if addon.is_packaged else _('Manage Status') }}</a>
|
||||
</li>
|
||||
{% set manage_urls = [(addon.get_dev_url('versions'), _('Manage Status'))] %}
|
||||
{% if addon.is_webapp() and addon.premium_type in amo.ADDON_INAPPS
|
||||
and waffle.switch('in-app-payments') %}
|
||||
{% do manage_urls.insert(1,
|
||||
(addon.get_dev_url('in_app_config'), _('Manage In-App Payments'))
|
||||
) %}
|
||||
{% endif %}
|
||||
|
||||
{% if waffle.switch('disabled-payments') or manage_urls|length == 1 %}
|
||||
<li>
|
||||
<a class="action-link status-link" href="{{ addon.get_dev_url('versions') }}">
|
||||
{{ _('Manage Status & Versions') if addon.is_packaged else _('Manage Status') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a class="action-link" href="{{ addon.get_url_path() }}">{{ _('View Listing') }}</a>
|
||||
</li>
|
||||
{% if waffle.switch('app-stats') %}
|
||||
<li>
|
||||
<a class="action-link" href="{{ addon.get_stats_url() }}">{{ _('Statistics') }}</a>
|
||||
<a class="action-link" href="{{ addon.get_stats_url() }}">{{ _('View Statistics') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if waffle.switch('view-transactions') %}
|
||||
<li>
|
||||
<a class="action-link" href="{{ url('mkt.developers.transactions')|urlparams(app=addon.id) }}">
|
||||
{{ _('Transactions') }}
|
||||
{{ _('View Transactions') }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if addon.premium_type in amo.ADDON_INAPPS and waffle.switch('in-app-payments') %}
|
||||
{% if not waffle.switch('disabled-payments') and manage_urls|length > 1 %}
|
||||
<li>
|
||||
<a class="action-link" href="{{ addon.get_dev_url('in_app_config') }}">
|
||||
{{ _('Manage In-App Payments') }}
|
||||
</a>
|
||||
<a href="#" class="more-actions">{{ _('More') }}</a>
|
||||
<div class="more-actions-popup popup hidden">
|
||||
<ul>
|
||||
{% for url, title in manage_urls %}
|
||||
<li><a href="{{ url }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
@ -68,25 +68,32 @@
|
|||
</section>
|
||||
{% include 'developers/includes/addons_edit_nav.html' %}
|
||||
|
||||
<script type="text/template" id="author-roles-help-template" class="overlay">
|
||||
<section id="author-roles-help">
|
||||
<header>
|
||||
<a class="close" title="{{ _('close') }}">×</a>
|
||||
<h2>{{ _('About Team Member Roles') }}</h2>
|
||||
</header>
|
||||
<div id="author-roles-help" class="popup">
|
||||
<p>{{ _('Apps can have any number of team members with 4 possible roles:') }}</p>
|
||||
<dl>
|
||||
<dt>{{ _('Owner') }}</dt>
|
||||
<dd>{{ _("Can manage all aspects of the app's listing, including
|
||||
adding and removing other team members") }}</dd>
|
||||
<dt>{{ _('Developer') }}</dt>
|
||||
<dd>{{ _("Can manage all aspects of the app's listing, except
|
||||
for adding and removing other team members and managing payments") }}</dd>
|
||||
<dt>{{ _('Viewer') }}</dt>
|
||||
<dd>{{ _("Can view the app's settings but cannot make any changes") }}</dd>
|
||||
<dt>{{ _('Support') }}</dt>
|
||||
<dd>{{ _("Can view the app's settings and manage refund requests") }}</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</script>
|
||||
<ul>
|
||||
<li>
|
||||
{% trans %}
|
||||
<b>Owner:</b> Can manage all aspects of the app's listing, including
|
||||
adding and removing other team members
|
||||
{% endtrans %}
|
||||
</li>
|
||||
<li>
|
||||
{% trans %}
|
||||
<b>Developer:</b> Can manage all aspects of the app's listing, except
|
||||
for adding and removing other team members and managing payments
|
||||
{% endtrans %}
|
||||
</li>
|
||||
<li>
|
||||
{% trans %}
|
||||
<b>Viewer:</b> Can view the app's settings but cannot make any changes
|
||||
{% endtrans %}
|
||||
</li>
|
||||
<li>
|
||||
{% trans %}
|
||||
<b>Support:</b> Can view the app's settings and manage refund requests
|
||||
{% endtrans %}
|
||||
</li>
|
||||
</ul>
|
||||
<p><a href="#" class="cancel close">{{ _('Close') }}</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Загрузка…
Ссылка в новой задаче