Merge branch 'master' of git@github.com:gorn/tracks

This commit is contained in:
Jakub A.Tesinsky 2008-12-02 02:24:08 +01:00
commit 8aa573a73e
106 changed files with 2221 additions and 585 deletions

View file

@ -25,7 +25,9 @@
<% end -%>
<% if source_view_is :context %>
<span class="in_place_editor_field" id="context_name_in_place_editor"><%= context.name %></span>
<%= in_place_editor 'context_name_in_place_editor', { :url => { :controller => 'contexts', :action => 'update', :id => context.id, :field => 'name', :wants_render => false, :escape => false} , :options=>"{method:'put'}" } %>
<%= in_place_editor 'context_name_in_place_editor', {
:url => { :controller => 'contexts', :action => 'update', :id => context.id, :field => 'name', :update_context_name => true, :escape => false},
:options=>"{method:'put'}", :script => true } %>
<% else %>
<%= link_to_context( context ) %>
<% end %>

View file

@ -53,4 +53,9 @@
</div>
<%
sortable_element 'list-contexts', get_listing_sortable_options
-%>
-%>
<script type="text/javascript">
window.onload=function(){
Nifty("div#context_new_container","normal");
}
</script>

View file

@ -0,0 +1,10 @@
page['context_name_in_place_editor'].replace_html @context.name
page['default_context_name_id'].value = @context.name
page['todo_context_name'].value = @context.name
# renew context auto complete array
page << "contextAutoCompleter.options.array = #{context_names_for_autocomplete}; contextAutoCompleter.changed = true"
status_message = "Name of context was changed"
page.notify :notice, status_message, 5.0