Ajout de la reserve de liens et du passage reserve -> liste
This commit is contained in:
@@ -1,27 +1,38 @@
|
||||
$(document).ready(function(){
|
||||
// Réglage des options
|
||||
$('body').append('<a href="#links" id="links-menu"><img src="images/interface/link_edit.png" /></a><div style="display:none;"><div id="links"></div></div>');
|
||||
$('body').append('<img src="images/interface/link_edit.png" id="links-menu" />');
|
||||
$('#menu-bar').prepend($('#links-menu'));
|
||||
$('#links').append('<h3>Quel lien à ajouter?</h3><br/><input type="text" id="linkChoice" name="linkChoice"/><span id="links-submit" class="green-button">Enregistrer</span>');
|
||||
$('#links-menu').fancybox({
|
||||
'zoomSpeedIn' : 600,
|
||||
'zoomSpeedOut' : 500,
|
||||
'easingIn' : 'easeOutBack',
|
||||
'easingOut' : 'easeInBack',
|
||||
'hideOnContentClick': false,
|
||||
'padding' : 15
|
||||
});
|
||||
$('#links-submit').live('click', function(){
|
||||
var link = $('#linkChoice').val();
|
||||
if(link != '' || link != null){
|
||||
$.get('ajax/update.php', {id:'links', link: link}, function(msg){
|
||||
location.reload();
|
||||
|
||||
// Apparition de la reserve de liens
|
||||
$('#links-menu').live('click', function(){
|
||||
$('#reserve').show();
|
||||
$.get('ajax/loadReserve.php', function(html){
|
||||
$.fancybox(
|
||||
html,
|
||||
{
|
||||
'autoDimensions' : false,
|
||||
'width' : 400,
|
||||
'height' : 'auto',
|
||||
'showNavArrows' : false,
|
||||
'transitionIn' : 'elastic'
|
||||
}
|
||||
);
|
||||
});
|
||||
}else{
|
||||
$('#links').append('<span class="error">links can\'t be empty.</span>');
|
||||
}
|
||||
});
|
||||
|
||||
// Passage Reserve => Liste
|
||||
$('#reserveiconlist .item').live('click', function(e){
|
||||
e.preventDefault();
|
||||
$.post("ajax/reserveToList.php", {reserve: $(this).attr('id')});
|
||||
$('#Entertainment').append($(this).parent().html());
|
||||
$.fancybox.close();
|
||||
});
|
||||
|
||||
|
||||
//Passage Liste => Reserve
|
||||
|
||||
// ??
|
||||
|
||||
// Mouvement des liens avec enregistrement
|
||||
$(".iconlist").sortable(
|
||||
{
|
||||
|
Reference in New Issue
Block a user