35
22
<h1 tal:content="view/label">Package differences between ...</h1>
38
26
<div class="top-portlet" metal:fill-slot="main"
39
27
tal:define="differences view/cached_differences;
40
28
series_name context/displayname;
41
29
can_perform_sync view/canPerformSync;">
44
<img src="/@@/beta" alt="[BETA]" />
47
30
<p><tal:replace replace="structure view/explanation/escapedtext" /></p>
49
<metal:package_filter_form
50
use-macro="context/@@+macros/distroseries-localdiff-search-form" />
32
<tal:distroseries_localdiff_search_form
33
tal:condition="view/has_differences">
34
<metal:package_filter_form
35
use-macro="context/@@+macros/distroseries-localdiff-search-form" />
36
</tal:distroseries_localdiff_search_form>
52
39
<div metal:use-macro="context/@@launchpad_form/form">
54
<span tal:replace="nothing">
55
We override the 'buttons' slot because we want the syc button to be
56
disabled by default. The Javascript code running on top of this will
57
enable the button and open a confirmation popup when the button is
58
clicked. This is done because syncing packages is too dangerous without
61
<div metal:fill-slot="buttons">
62
<script type="text/javascript">
64
'node', 'event', 'lp.registry.distroseriesdifferences_details',
65
'lp.app.confirmationoverlay',function(Y) {
66
Y.on('domready', function() {
67
var dsd_details = Y.lp.registry.distroseriesdifferences_details;
68
Y.all('input[name=field.actions.sync]').each(function(button) {
69
// Cleanup the button's title which says the button is disabled if
70
// Javascript is disabled.
71
button.set('title', '');
72
// Create a function to bypass the display of the Confirmation
73
// Overlay if no package has been selected.
74
var has_synced_packages = function() {
75
return (dsd_details.get_number_of_packages() !== 0);
77
// Create the Confirmation Overlay.
78
new Y.lp.app.confirmationoverlay.ConfirmationOverlay({
80
display_confirmation_fn: has_synced_packages,
81
form_content_fn: dsd_details.get_packages_summary,
82
header_content_fn: dsd_details.get_confirmation_header_number_of_packages
88
<div id="launchpad-form-actions" class="actions"
89
tal:define="sync view/actions/byname/field.actions.sync|nothing;
90
upgrade view/actions/byname/field.actions.upgrade|nothing">
91
<input class="button" type="submit" disabled="true"
92
title="Please use a Javascript-enabled browser to sync packages."
93
tal:condition="python:sync and sync.available()"
94
tal:attributes="value sync/label;
97
<input class="button" type="submit"
98
tal:condition="python: upgrade and upgrade.available()"
99
tal:attributes="value upgrade/label;
100
name upgrade/__name__;
101
id upgrade/__name__;" />
105
41
<div metal:fill-slot="widgets">
106
42
<tal:navigation_top
107
43
replace="structure differences/@@+navigation-links-upper" />
288
224
<script type="text/javascript">
289
225
LPS.use('lp.registry.distroseriesdifferences_details', function(Y) {
290
Y.on('domready', function() {
291
Y.lp.registry.distroseriesdifferences_details.setup();
226
diff_module = Y.lp.registry.distroseriesdifferences_details
228
Y.on('domready', diff_module.setup_expandable_rows);
295
231
<script type="text/javascript">