Init commit
This commit is contained in:
BIN
assets/.clientApp.js.swp
Normal file
BIN
assets/.clientApp.js.swp
Normal file
Binary file not shown.
32
assets/clientApp.js
Normal file
32
assets/clientApp.js
Normal file
@@ -0,0 +1,32 @@
|
||||
//var bla = function
|
||||
|
||||
$(document).ready(function(){
|
||||
var row = function(data){
|
||||
|
||||
var htmlobj = "<div>"+data.title+" |"+ data.url+
|
||||
//" </div>"+ "<div class='presLink'><button value='"+ data.url+"'> launch </button></div>"
|
||||
"<button class='presLink' value='"+data.url+"' > launch </button></div>"
|
||||
//return "<div><div>"+data.title+"</div> <div>| "+ data.url+" </div>"+ "<button class='.presLink'value='bla'> launch </button></div>"
|
||||
return htmlobj
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#addUrl").click(function(){
|
||||
console.log("Hey")
|
||||
var url=$("#urlText").val()
|
||||
$.post("/", {url:url}, function(data){
|
||||
console.log(data)
|
||||
if (data.url){
|
||||
//$("#ressources_list").append("<div> <p>"+data.title +"</p></div>")
|
||||
$("#ressources_list").append(row(data))
|
||||
$(".presLink").click(function(){
|
||||
console.log(this.value)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user