Added basic hexfile reading that respects r/w perms
This commit is contained in:
@@ -51,4 +51,4 @@ $(function(){
|
||||
return time + " " + unit + tail;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
//= require app
|
||||
//= require editor
|
||||
//= require highlight
|
||||
//= require jquery-textcomplete
|
||||
//= require jquery-textcomplete
|
||||
//= require memory
|
||||
|
||||
@@ -89,4 +89,4 @@ $(function() {
|
||||
debounce: 300
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
19
app/assets/javascripts/memory.js
Normal file
19
app/assets/javascripts/memory.js
Normal file
@@ -0,0 +1,19 @@
|
||||
$(function() {
|
||||
var data = [];
|
||||
$('td').keydown(function() {
|
||||
data.push(this.id, $(this).html().substr(0, 2)); //position, value
|
||||
})
|
||||
$('td').blur(function() {
|
||||
if ((id_i = data.indexOf(this.id) != -1) && data[id_i+1] != $(this).html().substr(0, 2)) {
|
||||
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);
|
||||
}
|
||||
});
|
||||
$('select').change(function() {
|
||||
$.get("/memory/table?project="+$(this).data("project")+"&file="+$(this).find("option:selected").text()+".hex")
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user