Amélioration des scripts AJAX et des styles

Ajout de la fonctionnalité "changement d'options" pour la clockAdvanced
This commit is contained in:
Chouchen
2010-09-20 14:39:08 +00:00
parent 136be98daa
commit fdc7719815
18 changed files with 306 additions and 61 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ function cbfunc2(o){
$('#uncompletedList').append('<li id="'+o.id+'">'+o.content+' - '+o.date_string+' <img src="images/interface/delete.png" id="delete-'+o.id+'"/> <img src="images/interface/complete.png" class="completeTask" id="complete-'+o.id+'"/> </li>');␍
}␍
$(document).ready(function(){␍ $('#todoList').resizable();␍ $('#todoList').draggable();␍ $('#todoList').append('<div id="results"></div><img src="images/interface/add.png" id="showNewTask"/><fieldset id="newTaskFieldset" style="display:none; width:200px;"><input type="text" name="newtask" id="newtask"/> <select id="priority"><option id="1" value="1">1</option><option id="2" value="2">2</option><option id="3" value="3">3</option><option id="4" value="4">4</option></select> <br/><input type="text" name="date_string" id="date_string"/> <img src="images/interface/add.png" id="addTask"/></fieldset>');␍
$(document).ready(function(){␍ $('#todo').resizable();␍ $('#todo').draggable();␍ $('#todo').append('<div id="results"></div><img src="images/interface/add.png" id="showNewTask"/><fieldset id="newTaskFieldset" style="display:none; width:200px;"><input type="text" name="newtask" id="newtask"/> <select id="priority"><option id="1" value="1">1</option><option id="2" value="2">2</option><option id="3" value="3">3</option><option id="4" value="4">4</option></select> <br/><input type="text" name="date_string" id="date_string"/> <img src="images/interface/add.png" id="addTask"/></fieldset>');␍
var token = "<?=$token?>";␍
var project_id = "<?=$id?>";␍
var script = document.createElement('script');␍
@@ -52,5 +52,5 @@ $(document).ready(function(){ $('#todoList').resizable(); $('#todoList').dragg
document.getElementsByTagName('head')[0].appendChild(script); ␍
$('#'+arrayId[1]).remove(); ␍
});␍
/* A helper function for converting a set of elements to draggables: */␍make_draggable($('#todo'));␍␍var zIndex = 0;␍␍function make_draggable(elements)␍{␍ /* Elements is a jquery object: */␍ elements.draggable({␍ containment:'parent',␍ start:function(e,ui){ ui.helper.css('z-index',++zIndex); },␍ stop:function(e,ui){␍␍ /* Sending the z-index and positon of the note to update_position.php via AJAX GET: */␍ $.get('ajax/update_position_config.php',{␍ x : ui.position.left,␍ y : ui.position.top,␍ id : ui.helper.attr('id')␍ });␍ }␍ });␍}
});