use MASTER enviroment variable contains url of another instance
of mojo_facets, and user interface shows checkbox which allow
replication to master instance.
});
$('a.view').live( 'click', function() {
- console.debug(this
- , this.href
- );
+ console.debug(this.href);
$(this).parent().load( this.href + ' form' ).css({ 'border': '3px dashed #f84' });
return false;
});
+
+ $('form input[name=_master]').live( 'click', function(){
+ var master = this.value;
+ console.debug('replication master', master);
+
+ $(this).closest('form').attr('action', function() {
+ return master + this.action;
+ }).css({ 'background': '#ffe' });
+ });
+
});
</script>
% $action = url_for( controller => 'data', action => $action );
<form method=post action=<%= $action %>>
<input type=submit value="<%= $action %>">
+% if ( my $master = $ENV{'MASTER'} ) {
+<input class=replication type=checkbox name="_master" value="<%= $master %>" title="replicate to <%= $master %>">
+% }
% my $params = $change->{params};
<ul>
% while ( @$params ) {