From: Dobrica Pavlinusic Date: Sat, 11 Aug 2012 12:30:57 +0000 (+0200) Subject: restore save to storable file on table change X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=commitdiff_plain;h=bccfa39efb5c58bfe00e2c422662f900f14a93f9;hp=0015bcd48cc0f11ec1e4f3f73f12395adb121bd6 restore save to storable file on table change --- diff --git a/public/edit_table.js b/public/edit_table.js index 3fc390f..d3422eb 100644 --- a/public/edit_table.js +++ b/public/edit_table.js @@ -32,8 +32,7 @@ var cell_blur = function() { if ( ! data ) { data = new_content; // fallback to submited data for 304 } else { - if ( $('a.save_actions').length == 0 ) - $('a.actions').before('save') + $('span.save_actions').show(); } var vals = data.split('¶'); data = vals.join('¶'); diff --git a/public/mojo_facets.css b/public/mojo_facets.css index d254856..10ec588 100644 --- a/public/mojo_facets.css +++ b/public/mojo_facets.css @@ -258,3 +258,7 @@ span.count span#column_selection { position: absolute; left: 15em; } + +.hide { + display: none; +} diff --git a/templates/admin.html.ep b/templates/admin.html.ep index e76d655..0cfb378 100644 --- a/templates/admin.html.ep +++ b/templates/admin.html.ep @@ -59,11 +59,13 @@ items: changes actions -% if ( session('modified') ) { -% my $path = session('path'); +% my $visible_class = session('modified') ? '' : 'hide'; +% my $path = session('path'); + · -save -% } +save + +