Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as JavaScript by dan ( 16 years ago )
$(function() {
$("#act_search").autocomplete('/acts/search',{
multiple: true,
dataType: "json",
parse: function(data) {
return $.map(data, function(row) {
return {
data: row,
value: row.name,
result: row.name
}
});
},
formatItem: function(item) {
return item.name;
}
}).result(function(event, data) {
event_id = $('#event_id').html();
$.ajax({
url: "/events/acts",
data: ({act_id : data.id, event_id : event_id, order : 1}),
success: function(msg){
$('.acts').html(msg);
}
});
$("#act_search").val('');
});
$('.editable').click(function(e){
att_value_id = $(this).attr('rel');
event_id = $('.event').attr('rel');
$.ajax({
url: "/event/"+event_id+"/attribute",
type: 'post',
data: ({att_value_id : att_value_id}),
success: function(msg){
}
});
console.log(att_value_id);
});
});
Revise this Paste