Added choice of project, r/w perms, and fixed up some css
This commit is contained in:
BIN
app/assets/javascripts/.memory.js.swp
Normal file
BIN
app/assets/javascripts/.memory.js.swp
Normal file
Binary file not shown.
@@ -1,10 +1,17 @@
|
||||
$(function() {
|
||||
$('td').focus(function() {
|
||||
if (this.id.split("-")[0] == "memory") {
|
||||
$(this).css("background-color", "lightblue")
|
||||
}
|
||||
});
|
||||
var data = [];
|
||||
$('td').keydown(function() {
|
||||
data.push(this.id, $(this).html().substr(0, 2)); //position, value
|
||||
})
|
||||
$('td').blur(function() {
|
||||
$(this).css("background", "none");
|
||||
if ((id_i = data.indexOf(this.id) != -1) && data[id_i+1] != $(this).html().substr(0, 2)) {
|
||||
$(this).css("color", "darkgreen");
|
||||
var int_id = this.id.split("-")[1]
|
||||
$.post("/memory/update_memory?project="+$(this).closest("table").data("project")+"&file="+Math.floor((int_id/2048)+1)+"&mem_id="+int_id%2048+"&value="+$(this).html().substr(0, 2));
|
||||
data.splice(id_i, 2);
|
||||
|
||||
Reference in New Issue
Block a user