[Bps-public-commit] r9430 - in SVKUI: .
clsung at bestpractical.com
clsung at bestpractical.com
Wed Oct 24 02:23:05 EDT 2007
Author: clsung
Date: Wed Oct 24 02:23:04 2007
New Revision: 9430
Modified:
SVKUI/ (props changed)
SVKUI/trunk/lib/SVKUI/View.pm
Log:
r9431 at going04: clsung | 2007-10-24 12:46:21 +0800
- record subscription id
Modified: SVKUI/trunk/lib/SVKUI/View.pm
==============================================================================
--- SVKUI/trunk/lib/SVKUI/View.pm (original)
+++ SVKUI/trunk/lib/SVKUI/View.pm Wed Oct 24 02:23:04 2007
@@ -100,7 +100,7 @@
div {
{ id is 'jifty-result-popup' }
};
- Jifty->subs->add(
+ my $sid = Jifty->subs->add(
class => 'Notification',
mode => 'Top',
region => "message",
@@ -113,7 +113,7 @@
# XXX: show () will not have the same arguments passing when click
render_region (name => 'svksync2',
force_path => '/svksync2',
- force_arguments => { project_name => $project->name, dosync => 0 });
+ force_arguments => { project_name => $project->name, dosync => 0, sid => $sid });
};
template 'svksync2' => sub { # TD implementation of share/web/templates/svksync
@@ -124,6 +124,7 @@
redirect '/';
}
my $dosync = get('dosync');
+ my $sid = get('sid');
my $message;
if ($dosync > 0) {
h3 { "Syncing project $p_name ..." };
@@ -134,7 +135,7 @@
if ($project->synced == 1) {
dt { Jifty->web->link( label => "Project synced", url => '/project/'.$p_name ); }
} elsif ($dosync == 0) {
- dt { Jifty->web->link( label => "Sync $p_name", onclick => { args => { project_name => $p_name, dosync => 1 } }); }
+ dt { Jifty->web->link( label => "Sync $p_name", onclick => { args => { project_name => $p_name, dosync => 1, sid => $sid } }); }
};
}; # dl
if ($project->id and $dosync) {
@@ -143,6 +144,8 @@
} else {
$message = 'success';
};
+ warn "Canceling $sid";
+ Jifty->subs->cancel($sid) if $sid;
}
div { $message };
};
More information about the Bps-public-commit
mailing list