Skip to content

Commit

Permalink
Fixed bug with generating multiple new ids for the same new record. T…
Browse files Browse the repository at this point in the history
…hanks to rebo.
  • Loading branch information
alloy committed Mar 12, 2009
1 parent 1cf1821 commit a618da2
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions public/javascripts/application.js
@@ -1,11 +1,8 @@
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
timestamp = function(){
return new Date().getTime()
}

replace_ids = function(s){
return s.replace(/NEW_RECORD/g, timestamp )
var new_id = new Date().getTime();
return s.replace(/NEW_RECORD/g, timestamp);
}

var myrules = {
Expand Down Expand Up @@ -42,12 +39,6 @@ var myrules = {
}
};


Event.observe(window, 'load', function(){
$('container').delegate('click', myrules);


})



$('container').delegate('click', myrules);
});

0 comments on commit a618da2

Please sign in to comment.