Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

edited usernav so that it correctly highlights in production_data view

  • Loading branch information...
commit 4e2402f65a5d7ce606e644673eebc3af193a4f41 1 parent c8d161b
@semlak semlak authored
View
5 app/controllers/production_data_controller.rb
@@ -1,6 +1,7 @@
class ProductionDataController < ApplicationController
before_filter :get_user
before_filter :get_rehearsal_units_groups_and_actors
+ before_filter :set_session_value, :only => [:show]
layout 'production_data'
def show
@@ -30,4 +31,8 @@ def get_user
end
end
+ def set_session_value
+ session[:event_selection] = 'prod_data'
+ end
+
end
View
3  app/views/shared/_user_nav.html.erb
@@ -1,6 +1,5 @@
<ul>
- <li class=<%= session[:event_selection] == 'prod_data' ? 'userNav-selected' : 'userNav'%>><%= link_to "Manage Actors", :controller=> 'production_data', :action =>'show'%></li>
-
+ <li class=<%= session[:event_selection] == 'prod_data' ? 'userNav-selected' : 'userNav'%>><%= link_to "Manage Actors", :controller=> 'production_data', :action =>'show', :event_selection => 'prod_data' %></li>
<li class=<%= session[:event_selection] == 'actor_conflicts' ? 'userNav-selected' : 'userNav'%>><%= link_to "Actor Conflicts", :controller => 'events', :action => 'index', :event_selection => 'actor_conflicts' %></li>
<li class=<%= session[:event_selection] == 'rehearsal_schedule' ? 'userNav-selected' : 'userNav'%>><%= link_to "Rehearsal Schedule", :controller=> 'events',:action => 'index', :event_selection => 'rehearsal_schedule' %></li>
View
23 public/javascripts/application.js
@@ -32,7 +32,7 @@ $(function() {
} ,
"crrm": {
"move" : {
- "always_copy" : "multitree",
+ "always_copy" : "multitree"
// "check_move" : function (m) {
// var p = this._get_parent(m.o);
// if(!p) return false;
@@ -55,7 +55,7 @@ $(function() {
.bind("select_node.jstree", onNodeSelected)
.bind("deselect_node.jstree", onNodeDeselected)
.jstree({
- "plugins" : ["themes","html_data","ui","dnd"],
+ "plugins" : ["themes","html_data","ui","dnd", "crrm"],
"core": {"initially_open":[]},
"themes": {"dots":false,"icons":false},
"ui": {
@@ -73,15 +73,16 @@ $(function() {
} ,
"crrm": {
"move" : {
- "always_copy" : "multitree",
- "check_move" : function (m) {
- var p = this._get_parent(m.o);
- if(!p) return false;
- p = p == -1 ? this.get_container() : p;
- if(p === m.np) return true;
- if(p[0] && m.np[0] && p[0] === m.np[0]) return true;
- return false;
- }
+ "always_copy" : "multitree"
+ //,
+ //"check_move" : function (m) {
+ // var p = this._get_parent(m.o);
+ // if(!p) return false;
+ // p = p == -1 ? this.get_container() : p;
+ // if(p === m.np) return true;
+ // if(p[0] && m.np[0] && p[0] === m.np[0]) return true;
+ // return false;
+ //}
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.