Permalink
Browse files

更新周りのinterface変更& color picker追加

  • Loading branch information...
1 parent f8b1f86 commit 3c37b606934b88581d455846da003d04c1c69f59 @kazeburo committed Feb 23, 2012
Showing with 1,692 additions and 369 deletions.
  1. +9 −3 lib/GrowthForecast/Web.pm
  2. +1,366 −0 public/js/html5jp/cpick.js
  3. +38 −45 views/add_complex.tx
  4. +88 −70 views/base.tx
  5. +153 −0 views/edit.tx
  6. +37 −44 views/edit_complex.tx
  7. +0 −4 views/list.tx
  8. +1 −199 views/view.tx
  9. +0 −4 views/view_graph.tx
View
@@ -90,7 +90,7 @@ get '/edit_complex/:complex_id' => [qw/get_complex/] => sub {
$c->render('edit_complex.tx',{ graphs => $graphs });
};
-post '/remove_complex/:complex_id' => [qw/get_complex/] => sub {
+post '/delete_complex/:complex_id' => [qw/get_complex/] => sub {
my ( $self, $c ) = @_;
$self->data->remove_complex($c->stash->{complex}->{id});
$c->render_json({
@@ -590,7 +590,12 @@ get '/{method:(?:xport|graph|summary)}/:service_name/:section_name/:graph_name'
return $c->res;
};
-post '/graph/:service_name/:section_name/:graph_name' => [qw/get_graph/] => sub {
+get '/edit/:service_name/:section_name/:graph_name' => [qw/get_graph/] => sub {
+ my ( $self, $c ) = @_;
+ $c->render('edit.tx',{graph=>$c->stash->{graph}});
+};
+
+post '/edit/:service_name/:section_name/:graph_name' => [qw/get_graph/] => sub {
my ( $self, $c ) = @_;
my $check_uniq = sub {
my ($req,$val) = @_;
@@ -716,10 +721,11 @@ post '/graph/:service_name/:section_name/:graph_name' => [qw/get_graph/] => sub
$c->render_json({
error => 0,
+ location => $c->req->uri_for( sprintf '/list/%s/%s', $result->valid('service_name'), $result->valid('section_name') )->as_string
});
};
-post '/graph/:service_name/:section_name/:graph_name/delete' => [qw/get_graph/] => sub {
+post '/delete/:service_name/:section_name/:graph_name' => [qw/get_graph/] => sub {
my ( $self, $c ) = @_;
$self->data->remove($c->stash->{graph}->{id});
Oops, something went wrong.

0 comments on commit 3c37b60

Please sign in to comment.