commit avant reprise
This commit is contained in:
60
static/Js/index.js
Normal file
60
static/Js/index.js
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
// jus fot testing :)
|
||||
console.log("Ok");
|
||||
|
||||
//Materialize js component initialization
|
||||
$(document).ready(function(){
|
||||
$('select').formSelect();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var socket = io();
|
||||
$('#send').click(function(e){
|
||||
e.preventDefault();
|
||||
var data = {zone:$("#zone").val(),
|
||||
ListeCom : new Array()};
|
||||
data.ListeCom.push({
|
||||
IDPub:-1,
|
||||
html: $('#summernote').summernote('code'),
|
||||
level:$("#level").val()
|
||||
});
|
||||
|
||||
socket.emit('Communication', JSON.stringify(data));
|
||||
//$('#m').val('');
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#SendAll").click(function(){
|
||||
var data = {zone:$("#zone").val(),
|
||||
ListeCom : new Array()};
|
||||
|
||||
for(var i=0;i<3;i++)
|
||||
{
|
||||
var f = $($("form").get(i));
|
||||
console.log(f)
|
||||
data.ListeCom.push({
|
||||
IDPub:-1,
|
||||
html:f.children(".com")[0].value,
|
||||
level:f.children(".lvl")[0].value
|
||||
});
|
||||
}
|
||||
socket.emit('Communication', JSON.stringify(data));
|
||||
})
|
||||
|
||||
|
||||
socket.on('chat message', function(msg){
|
||||
//$('#messages').append($('<li>').text(msg));
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
//Summer note initialization
|
||||
$('#summernote').summernote({
|
||||
placeholder: 'nothing',
|
||||
tabsize: 2,
|
||||
height: 100
|
||||
});
|
||||
1
static/Js/map.js
Normal file
1
static/Js/map.js
Normal file
@@ -0,0 +1 @@
|
||||
//Javascript leafletjs initialization
|
||||
Reference in New Issue
Block a user