move js genreated for ajax calls into their own object to prevent name clashes

I only modified the js that is most likely to be used in cocurrent calls. This because we
start the development of Tracks 3 that will change all js.
This commit is contained in:
Reinier Balt 2014-08-10 13:18:33 +02:00
parent f0871738e9
commit 4cdbd9a451
14 changed files with 436 additions and 410 deletions

View file

@ -236,4 +236,10 @@ module ApplicationHelper
source_view_is_one_of(:project, :context) ? "#{@source_view}-#{eval("@#{@source_view}.id")}" : @source_view
end
# create a unique object name which can be used in ajax calls returning js
# to prevent concurrent calls with same functions to overwrite each other functions
def unique_object_name_for(name)
"#{name}_#{SecureRandom.hex(5)}"
end
end