diff --git a/app/views/contexts/index.html.erb b/app/views/contexts/index.html.erb index 9d7ed3c2..edfcc710 100644 --- a/app/views/contexts/index.html.erb +++ b/app/views/contexts/index.html.erb @@ -42,8 +42,3 @@ sortable_element 'list-contexts-active', get_listing_sortable_options sortable_element 'list-contexts-hidden', get_listing_sortable_options -%> - diff --git a/app/views/data/index.html.erb b/app/views/data/index.html.erb index f4f8688d..414526a1 100644 --- a/app/views/data/index.html.erb +++ b/app/views/data/index.html.erb @@ -34,9 +34,3 @@ - - diff --git a/app/views/data/yaml_form.html.erb b/app/views/data/yaml_form.html.erb index edc13098..1b89a9db 100644 --- a/app/views/data/yaml_form.html.erb +++ b/app/views/data/yaml_form.html.erb @@ -15,9 +15,3 @@

- - diff --git a/app/views/feedlist/index.html.erb b/app/views/feedlist/index.html.erb index 74a45880..bb417c7e 100644 --- a/app/views/feedlist/index.html.erb +++ b/app/views/feedlist/index.html.erb @@ -125,11 +125,3 @@
<%= render :file => "sidebar/sidebar.html.erb" %>
- - diff --git a/app/views/layouts/standard.html.erb b/app/views/layouts/standard.html.erb index 0f15ab66..0d7e34e8 100644 --- a/app/views/layouts/standard.html.erb +++ b/app/views/layouts/standard.html.erb @@ -105,35 +105,5 @@ <%= render :partial => "shared/footer" %> - - diff --git a/app/views/notes/_notes.rhtml b/app/views/notes/_notes.rhtml index 2bc12211..a41796a4 100644 --- a/app/views/notes/_notes.rhtml +++ b/app/views/notes/_notes.rhtml @@ -12,13 +12,13 @@ :id => "delete_note_"+note.id.to_s), {:update => dom_id(note), :loading => visual_effect(:fade, dom_id(note, 'container')), - :complete => "Element.remove('#{dom_id(note, 'container')}');", + :complete => "$('#{dom_id(note, 'container')}').remove();", :url => note_path(note), :method => :delete, :confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?" }, { :class => 'delete_note' }) -%>  <%= link_to_function(image_tag( "blank.png", :title => "Edit item", :class=>"edit_item"), - "Element.toggle('#{dom_id(note)}'); Element.toggle('#{dom_id(note, 'edit')}'); Effect.Appear('#{dom_id(note, 'edit')}'); Form.focusFirstElement('#{dom_id(note, 'edit_form')}');" ) + " | " %> + "$('##{dom_id(note)}').toggle(); $('##{dom_id(note, 'edit')}').show(); $('##{dom_id(note, 'edit_form')} textarea').focus();" ) + " | " %> <%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %> |  Created: <%= format_date(note.created_at) %> <% if note.updated_at? -%> @@ -37,4 +37,4 @@ <% end -%> -<% note = nil -%> \ No newline at end of file +<% note = nil -%> diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml index 8cfcbd76..273bc379 100644 --- a/app/views/search/index.rhtml +++ b/app/views/search/index.rhtml @@ -4,6 +4,3 @@ <%= submit_tag "Search" %> <% end %> - \ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index fb0d7b60..1a8ffc77 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -88,8 +88,8 @@ var TracksForm = { var TodoBehavior = { enableToggleNotes: function() { - jQuery(".show_notes").unbind('click').bind('click', function () { - jQuery(this).next().toggle("fast"); return false; + $(".show_notes").unbind('click').bind('click', function () { + $(this).next().toggle("fast"); return false; }); } } @@ -281,8 +281,43 @@ function enable_rich_interaction(){ } $(document).ready(function() { + $('#search-form #search').focus(); + /* Nifty corners */ Nifty("div#recurring_new_container","normal"); + Nifty("div#context_new_container","normal"); + Nifty("div#feedlegend","normal"); + Nifty("div#feedicons-project","normal"); + Nifty("div#feedicons-context","normal"); + Nifty("div#todo_new_action_container","normal"); + + /* Moved from standard.html.erb layout */ + $('ul.sf-menu').superfish({ + delay: 250, + animation: {opacity:'show',height:'show'}, + autoArrows: false, + dropShadows: false, + speed: 'fast' + }); + + $('ul.sf-item-menu').superfish({ /* context menu */ + delay: 100, + animation: {opacity:'show',height:'show'}, + autoArrows: false, + dropShadows: false, + speed: 'fast', + onBeforeShow: function() { /* highlight todo */ + $(this.parent().parent().parent()).addClass("sf-item-selected"); + }, + onHide: function() { /* remove hightlight from todo */ + $(this.parent().parent().parent()).removeClass("sf-item-selected"); + } + }); + + /* for toggle notes link in mininav */ + $("#toggle-notes-nav").click(function () { jQuery(".todo_notes").toggle(); }); + /* show the notes of a todo */ + TodoBehavior.enableToggleNotes(); /* fade flashes and alerts in automatically */ $(".alert").fadeOut(8000);