Version avec modules séparés !
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
<?header('Content-type: application/javascript');
|
||||
|
||||
$token = $_GET['token'];
|
||||
|
||||
?>
|
||||
|
@@ -1,56 +0,0 @@
|
||||
<?header('Content-type: application/javascript');
|
||||
$token = $_GET['token'];
|
||||
$id = $_GET['id'];
|
||||
?>
|
||||
|
||||
function cbfunc(o){
|
||||
|
||||
$('#results').append('<ul id="uncompletedList"><ul>');
|
||||
|
||||
for(var i in o)
|
||||
|
||||
{
|
||||
|
||||
$('#uncompletedList').append('<li id="'+o[i].id+'">'+o[i].content+' - '+o[i].date_string+' <img src="images/interface/delete.png" class="deleteTask" id="delete-'+o[i].id+'"/> <img src="images/interface/complete.png" class="completeTask" id="complete-'+o[i].id+'"/> </li>');
|
||||
|
||||
}
|
||||
|
||||
$('#uncompletedList li').prepend('<div class="puce"></div>');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
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(){
|
||||
$('#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');
|
||||
|
||||
script.type = 'text/javascript';
|
||||
|
||||
script.src = 'https://todoist.com/API/getUncompletedItems?project_id='+project_id+'&token='+token+'&format=json&callback=cbfunc';
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
|
||||
|
||||
|
||||
$('#showNewTask').click(function(){
|
||||
|
||||
$('#newTaskFieldset').toggle();
|
||||
|
||||
});
|
||||
|
23
js/gmap.js
23
js/gmap.js
@@ -1,23 +0,0 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#menu-bar').append($('#myAdress'));
|
||||
$('#map').css({'visibility':'hidden'});
|
||||
$('#gmapLink').fancybox({
|
||||
'transitionIn': 'elastic',
|
||||
'transitionOut': 'elastic',
|
||||
'onClosed': function(){$('#map').css({'visibility':'hidden'});},
|
||||
'onStart': function(){$('#map').css({'visibility':'visible'});}
|
||||
});
|
||||
$('#myAdressField').keydown(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) {
|
||||
var adress = $(this).val();
|
||||
geocodeMarker(adress,adress,adress,'','http://maps.gstatic.com/intl/fr_ALL/mapfiles/markers/marker_sprite.png');
|
||||
geocodeCenter(adress);
|
||||
$('#gmapLink').trigger('click');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
21
js/index.js
21
js/index.js
@@ -1,21 +0,0 @@
|
||||
function cbfunc(o){
|
||||
|
||||
var token = o.api_token;
|
||||
|
||||
if(token == undefined){
|
||||
|
||||
$('#error').html('Identification erronnée');
|
||||
|
||||
}else{
|
||||
|
||||
$.post('ajax/saveTodoist.php', {token: token}, function(data){
|
||||
$('body').append('<a href="getProjectsList.php">Etape suivante</a>');
|
||||
if(data=="ok"){
|
||||
location.reload();
|
||||
}else{
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
@@ -1,22 +0,0 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#menu-bar').prepend($('#blog-links-manager'));
|
||||
|
||||
//affichage des blogs
|
||||
$("#blogs").html("<img src=\"images/interface/ajax_load.gif\"/> Loading Blogs...");
|
||||
var tmp;
|
||||
|
||||
/* A helper function for converting a set of elements to draggables: */
|
||||
make_draggable($('#blogs'));
|
||||
|
||||
$.ajax(
|
||||
{url : "blogs.php",
|
||||
timeout : 36000,
|
||||
error: function(data){
|
||||
$("#blogs").html('<img src="images/interface/error.png"/> Délai dépassé !');
|
||||
},
|
||||
success:function(data){
|
||||
$("#blogs").html(data);
|
||||
}
|
||||
});
|
||||
});
|
@@ -1,219 +0,0 @@
|
||||
/*
|
||||
* jQuery jclock - Clock plugin - v 2.3.0
|
||||
* http://plugins.jquery.com/project/jclock
|
||||
*
|
||||
* Copyright (c) 2007-2009 Doug Sparling <http://www.dougsparling.com>
|
||||
* Licensed under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
$.fn.jclock = function(options) {
|
||||
var version = '2.3.0';
|
||||
|
||||
// options
|
||||
var opts = $.extend({}, $.fn.jclock.defaults, options);
|
||||
|
||||
return this.each(function() {
|
||||
$this = $(this);
|
||||
$this.timerID = null;
|
||||
$this.running = false;
|
||||
|
||||
// Record keeping for seeded clock
|
||||
$this.increment = 0;
|
||||
$this.lastCalled = new Date().getTime();
|
||||
|
||||
var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
|
||||
|
||||
$this.format = o.format;
|
||||
$this.utc = o.utc;
|
||||
// deprecate utc_offset (v 2.2.0)
|
||||
$this.utcOffset = (o.utc_offset != null) ? o.utc_offset : o.utcOffset;
|
||||
$this.seedTime = o.seedTime;
|
||||
$this.timeout = o.timeout;
|
||||
|
||||
$this.css({
|
||||
fontFamily: o.fontFamily,
|
||||
fontSize: o.fontSize,
|
||||
backgroundColor: o.background,
|
||||
color: o.foreground
|
||||
});
|
||||
|
||||
// %a
|
||||
$this.daysAbbrvNames = new Array(7);
|
||||
$this.daysAbbrvNames[0] = "Sun";
|
||||
$this.daysAbbrvNames[1] = "Mon";
|
||||
$this.daysAbbrvNames[2] = "Tue";
|
||||
$this.daysAbbrvNames[3] = "Wed";
|
||||
$this.daysAbbrvNames[4] = "Thu";
|
||||
$this.daysAbbrvNames[5] = "Fri";
|
||||
$this.daysAbbrvNames[6] = "Sat";
|
||||
|
||||
// %A
|
||||
$this.daysFullNames = new Array(7);
|
||||
$this.daysFullNames[0] = "Sunday";
|
||||
$this.daysFullNames[1] = "Monday";
|
||||
$this.daysFullNames[2] = "Tuesday";
|
||||
$this.daysFullNames[3] = "Wednesday";
|
||||
$this.daysFullNames[4] = "Thursday";
|
||||
$this.daysFullNames[5] = "Friday";
|
||||
$this.daysFullNames[6] = "Saturday";
|
||||
|
||||
// %b
|
||||
$this.monthsAbbrvNames = new Array(12);
|
||||
$this.monthsAbbrvNames[0] = "Jan";
|
||||
$this.monthsAbbrvNames[1] = "Feb";
|
||||
$this.monthsAbbrvNames[2] = "Mar";
|
||||
$this.monthsAbbrvNames[3] = "Apr";
|
||||
$this.monthsAbbrvNames[4] = "May";
|
||||
$this.monthsAbbrvNames[5] = "Jun";
|
||||
$this.monthsAbbrvNames[6] = "Jul";
|
||||
$this.monthsAbbrvNames[7] = "Aug";
|
||||
$this.monthsAbbrvNames[8] = "Sep";
|
||||
$this.monthsAbbrvNames[9] = "Oct";
|
||||
$this.monthsAbbrvNames[10] = "Nov";
|
||||
$this.monthsAbbrvNames[11] = "Dec";
|
||||
|
||||
// %B
|
||||
$this.monthsFullNames = new Array(12);
|
||||
$this.monthsFullNames[0] = "January";
|
||||
$this.monthsFullNames[1] = "February";
|
||||
$this.monthsFullNames[2] = "March";
|
||||
$this.monthsFullNames[3] = "April";
|
||||
$this.monthsFullNames[4] = "May";
|
||||
$this.monthsFullNames[5] = "June";
|
||||
$this.monthsFullNames[6] = "July";
|
||||
$this.monthsFullNames[7] = "August";
|
||||
$this.monthsFullNames[8] = "September";
|
||||
$this.monthsFullNames[9] = "October";
|
||||
$this.monthsFullNames[10] = "November";
|
||||
$this.monthsFullNames[11] = "December";
|
||||
|
||||
$.fn.jclock.startClock($this);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.jclock.startClock = function(el) {
|
||||
$.fn.jclock.stopClock(el);
|
||||
$.fn.jclock.displayTime(el);
|
||||
}
|
||||
|
||||
$.fn.jclock.stopClock = function(el) {
|
||||
if(el.running) {
|
||||
clearTimeout(el.timerID);
|
||||
}
|
||||
el.running = false;
|
||||
}
|
||||
|
||||
$.fn.jclock.displayTime = function(el) {
|
||||
var time = $.fn.jclock.getTime(el);
|
||||
el.html(time);
|
||||
el.timerID = setTimeout(function(){$.fn.jclock.displayTime(el)},el.timeout);
|
||||
}
|
||||
|
||||
$.fn.jclock.getTime = function(el) {
|
||||
if(typeof(el.seedTime) == 'undefined') {
|
||||
// Seed time not being used, use current time
|
||||
var now = new Date();
|
||||
} else {
|
||||
// Otherwise, use seed time with increment
|
||||
el.increment += new Date().getTime() - el.lastCalled;
|
||||
var now = new Date(el.seedTime + el.increment);
|
||||
el.lastCalled = new Date().getTime();
|
||||
}
|
||||
|
||||
if(el.utc == true) {
|
||||
var localTime = now.getTime();
|
||||
var localOffset = now.getTimezoneOffset() * 60000;
|
||||
var utc = localTime + localOffset;
|
||||
var utcTime = utc + (3600000 * el.utcOffset);
|
||||
now = new Date(utcTime);
|
||||
}
|
||||
|
||||
var timeNow = "";
|
||||
var i = 0;
|
||||
var index = 0;
|
||||
while ((index = el.format.indexOf("%", i)) != -1) {
|
||||
timeNow += el.format.substring(i, index);
|
||||
index++;
|
||||
|
||||
// modifier flag
|
||||
//switch (el.format.charAt(index++)) {
|
||||
//}
|
||||
|
||||
var property = $.fn.jclock.getProperty(now, el, el.format.charAt(index));
|
||||
index++;
|
||||
|
||||
//switch (switchCase) {
|
||||
//}
|
||||
|
||||
timeNow += property;
|
||||
i = index
|
||||
}
|
||||
|
||||
timeNow += el.format.substring(i);
|
||||
return timeNow;
|
||||
};
|
||||
|
||||
$.fn.jclock.getProperty = function(dateObject, el, property) {
|
||||
|
||||
switch (property) {
|
||||
case "a": // abbrv day names
|
||||
return (el.daysAbbrvNames[dateObject.getDay()]);
|
||||
case "A": // full day names
|
||||
return (el.daysFullNames[dateObject.getDay()]);
|
||||
case "b": // abbrv month names
|
||||
return (el.monthsAbbrvNames[dateObject.getMonth()]);
|
||||
case "B": // full month names
|
||||
return (el.monthsFullNames[dateObject.getMonth()]);
|
||||
case "d": // day 01-31
|
||||
return ((dateObject.getDate() < 10) ? "0" : "") + dateObject.getDate();
|
||||
case "H": // hour as a decimal number using a 24-hour clock (range 00 to 23)
|
||||
return ((dateObject.getHours() < 10) ? "0" : "") + dateObject.getHours();
|
||||
case "I": // hour as a decimal number using a 12-hour clock (range 01 to 12)
|
||||
var hours = (dateObject.getHours() % 12 || 12);
|
||||
return ((hours < 10) ? "0" : "") + hours;
|
||||
case "m": // month number
|
||||
return (((dateObject.getMonth() + 1) < 10) ? "0" : "") + (dateObject.getMonth() + 1);
|
||||
case "M": // minute as a decimal number
|
||||
return ((dateObject.getMinutes() < 10) ? "0" : "") + dateObject.getMinutes();
|
||||
case "p": // either `am' or `pm' according to the given time value,
|
||||
// or the corresponding strings for the current locale
|
||||
return (dateObject.getHours() < 12 ? "am" : "pm");
|
||||
case "P": // either `AM' or `PM' according to the given time value,
|
||||
return (dateObject.getHours() < 12 ? "AM" : "PM");
|
||||
case "S": // second as a decimal number
|
||||
return ((dateObject.getSeconds() < 10) ? "0" : "") + dateObject.getSeconds();
|
||||
case "y": // two-digit year
|
||||
return dateObject.getFullYear().toString().substring(2);
|
||||
case "Y": // full year
|
||||
return (dateObject.getFullYear());
|
||||
case "%":
|
||||
return "%";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// plugin defaults (24-hour)
|
||||
$.fn.jclock.defaults = {
|
||||
format: '%H:%M:%S',
|
||||
utcOffset: 0,
|
||||
utc: false,
|
||||
fontFamily: '',
|
||||
fontSize: '',
|
||||
foreground: '',
|
||||
background: '',
|
||||
seedTime: undefined,
|
||||
timeout: 1000 // 1000 = one second, 60000 = one minute
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
$(document).ready(function(){
|
||||
$('.jclock').jclock(); //l'horloge
|
||||
var tmp;
|
||||
|
||||
/* A helper function for converting a set of elements to draggables: */
|
||||
make_draggable($('.jclock'));
|
||||
|
||||
});
|
@@ -1,237 +0,0 @@
|
||||
/*
|
||||
* jQuery jclock - Clock plugin - v 2.3.0
|
||||
* http://plugins.jquery.com/project/jclock
|
||||
*
|
||||
* Copyright (c) 2007-2009 Doug Sparling <http://www.dougsparling.com>
|
||||
* Licensed under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
$.fn.jclock = function(options) {
|
||||
var version = '2.3.0';
|
||||
|
||||
// options
|
||||
var opts = $.extend({}, $.fn.jclock.defaults, options);
|
||||
|
||||
return this.each(function() {
|
||||
$this = $(this);
|
||||
$this.timerID = null;
|
||||
$this.running = false;
|
||||
|
||||
// Record keeping for seeded clock
|
||||
$this.increment = 0;
|
||||
$this.lastCalled = new Date().getTime();
|
||||
|
||||
var o = $.meta ? $.extend({}, opts, $this.data()) : opts;
|
||||
|
||||
$this.format = o.format;
|
||||
$this.utc = o.utc;
|
||||
// deprecate utc_offset (v 2.2.0)
|
||||
$this.utcOffset = (o.utc_offset != null) ? o.utc_offset : o.utcOffset;
|
||||
$this.seedTime = o.seedTime;
|
||||
$this.timeout = o.timeout;
|
||||
|
||||
$this.css({
|
||||
fontFamily: o.fontFamily,
|
||||
fontSize: o.fontSize,
|
||||
backgroundColor: o.background,
|
||||
color: o.foreground
|
||||
});
|
||||
|
||||
// %a
|
||||
$this.daysAbbrvNames = new Array(7);
|
||||
$this.daysAbbrvNames[0] = "Dim";
|
||||
$this.daysAbbrvNames[1] = "Lun";
|
||||
$this.daysAbbrvNames[2] = "Mar";
|
||||
$this.daysAbbrvNames[3] = "Mer";
|
||||
$this.daysAbbrvNames[4] = "Jeu";
|
||||
$this.daysAbbrvNames[5] = "Ven";
|
||||
$this.daysAbbrvNames[6] = "Sam";
|
||||
|
||||
// %A
|
||||
$this.daysFullNames = new Array(7);
|
||||
$this.daysFullNames[0] = "Dimanche";
|
||||
$this.daysFullNames[1] = "Lundi";
|
||||
$this.daysFullNames[2] = "Mardi";
|
||||
$this.daysFullNames[3] = "Mercredi";
|
||||
$this.daysFullNames[4] = "Jeudi";
|
||||
$this.daysFullNames[5] = "Vendredi";
|
||||
$this.daysFullNames[6] = "Samedi";
|
||||
|
||||
// %b
|
||||
$this.monthsAbbrvNames = new Array(12);
|
||||
$this.monthsAbbrvNames[0] = "Jan";
|
||||
$this.monthsAbbrvNames[1] = "Fev";
|
||||
$this.monthsAbbrvNames[2] = "Mar";
|
||||
$this.monthsAbbrvNames[3] = "Avr";
|
||||
$this.monthsAbbrvNames[4] = "Mai";
|
||||
$this.monthsAbbrvNames[5] = "Jun";
|
||||
$this.monthsAbbrvNames[6] = "Jul";
|
||||
$this.monthsAbbrvNames[7] = "Aou";
|
||||
$this.monthsAbbrvNames[8] = "Sep";
|
||||
$this.monthsAbbrvNames[9] = "Oct";
|
||||
$this.monthsAbbrvNames[10] = "Nov";
|
||||
$this.monthsAbbrvNames[11] = "Dec";
|
||||
|
||||
// %B
|
||||
$this.monthsFullNames = new Array(12);
|
||||
$this.monthsFullNames[0] = "Janvier";
|
||||
$this.monthsFullNames[1] = "Février";
|
||||
$this.monthsFullNames[2] = "Mars";
|
||||
$this.monthsFullNames[3] = "Avril";
|
||||
$this.monthsFullNames[4] = "Mai";
|
||||
$this.monthsFullNames[5] = "Juin";
|
||||
$this.monthsFullNames[6] = "Juillet";
|
||||
$this.monthsFullNames[7] = "Aout";
|
||||
$this.monthsFullNames[8] = "Septembre";
|
||||
$this.monthsFullNames[9] = "Octobre";
|
||||
$this.monthsFullNames[10] = "Novembre";
|
||||
$this.monthsFullNames[11] = "Décembre";
|
||||
|
||||
$.fn.jclock.startClock($this);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.jclock.startClock = function(el) {
|
||||
$.fn.jclock.stopClock(el);
|
||||
$.fn.jclock.displayTime(el);
|
||||
}
|
||||
|
||||
$.fn.jclock.stopClock = function(el) {
|
||||
if(el.running) {
|
||||
clearTimeout(el.timerID);
|
||||
}
|
||||
el.running = false;
|
||||
}
|
||||
|
||||
$.fn.jclock.displayTime = function(el) {
|
||||
var time = $.fn.jclock.getTime(el);
|
||||
el.html(time);
|
||||
el.timerID = setTimeout(function(){$.fn.jclock.displayTime(el)},el.timeout);
|
||||
}
|
||||
|
||||
$.fn.jclock.getTime = function(el) {
|
||||
if(typeof(el.seedTime) == 'undefined') {
|
||||
// Seed time not being used, use current time
|
||||
var now = new Date();
|
||||
} else {
|
||||
// Otherwise, use seed time with increment
|
||||
el.increment += new Date().getTime() - el.lastCalled;
|
||||
var now = new Date(el.seedTime + el.increment);
|
||||
el.lastCalled = new Date().getTime();
|
||||
}
|
||||
|
||||
if(el.utc == true) {
|
||||
var localTime = now.getTime();
|
||||
var localOffset = now.getTimezoneOffset() * 60000;
|
||||
var utc = localTime + localOffset;
|
||||
var utcTime = utc + (3600000 * el.utcOffset);
|
||||
now = new Date(utcTime);
|
||||
}
|
||||
|
||||
var timeNow = "";
|
||||
var i = 0;
|
||||
var index = 0;
|
||||
while ((index = el.format.indexOf("%", i)) != -1) {
|
||||
timeNow += el.format.substring(i, index);
|
||||
index++;
|
||||
|
||||
// modifier flag
|
||||
//switch (el.format.charAt(index++)) {
|
||||
//}
|
||||
|
||||
var property = $.fn.jclock.getProperty(now, el, el.format.charAt(index));
|
||||
index++;
|
||||
|
||||
//switch (switchCase) {
|
||||
//}
|
||||
|
||||
timeNow += property;
|
||||
i = index
|
||||
}
|
||||
|
||||
timeNow += el.format.substring(i);
|
||||
return timeNow;
|
||||
};
|
||||
|
||||
$.fn.jclock.getProperty = function(dateObject, el, property) {
|
||||
|
||||
switch (property) {
|
||||
case "a": // abbrv day names
|
||||
return (el.daysAbbrvNames[dateObject.getDay()]);
|
||||
case "A": // full day names
|
||||
return (el.daysFullNames[dateObject.getDay()]);
|
||||
case "b": // abbrv month names
|
||||
return (el.monthsAbbrvNames[dateObject.getMonth()]);
|
||||
case "B": // full month names
|
||||
return (el.monthsFullNames[dateObject.getMonth()]);
|
||||
case "d": // day 01-31
|
||||
return ((dateObject.getDate() < 10) ? "0" : "") + dateObject.getDate();
|
||||
case "H": // hour as a decimal number using a 24-hour clock (range 00 to 23)
|
||||
return ((dateObject.getHours() < 10) ? "0" : "") + dateObject.getHours();
|
||||
case "I": // hour as a decimal number using a 12-hour clock (range 01 to 12)
|
||||
var hours = (dateObject.getHours() % 12 || 12);
|
||||
return ((hours < 10) ? "0" : "") + hours;
|
||||
case "m": // month number
|
||||
return (((dateObject.getMonth() + 1) < 10) ? "0" : "") + (dateObject.getMonth() + 1);
|
||||
case "M": // minute as a decimal number
|
||||
return ((dateObject.getMinutes() < 10) ? "0" : "") + dateObject.getMinutes();
|
||||
case "p": // either `am' or `pm' according to the given time value,
|
||||
// or the corresponding strings for the current locale
|
||||
return (dateObject.getHours() < 12 ? "am" : "pm");
|
||||
case "P": // either `AM' or `PM' according to the given time value,
|
||||
return (dateObject.getHours() < 12 ? "AM" : "PM");
|
||||
case "S": // second as a decimal number
|
||||
return ((dateObject.getSeconds() < 10) ? "0" : "") + dateObject.getSeconds();
|
||||
case "y": // two-digit year
|
||||
return dateObject.getFullYear().toString().substring(2);
|
||||
case "Y": // full year
|
||||
return (dateObject.getFullYear());
|
||||
case "%":
|
||||
return "%";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// plugin defaults (24-hour)
|
||||
$.fn.jclock.defaults = {
|
||||
format: '%H:%M:%S',
|
||||
utcOffset: 0,
|
||||
utc: false,
|
||||
fontFamily: '',
|
||||
fontSize: '',
|
||||
foreground: '',
|
||||
background: '',
|
||||
seedTime: undefined,
|
||||
timeout: 1000 // 1000 = one second, 60000 = one minute
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
$(document).ready(function(){
|
||||
$('body').append('<a href="#jca" id="jclockAdvanced-menu"><img src="images/interface/clock_edit.png" /></a><div style="display:none;"><div id="jca"></div></div>');
|
||||
$('#menu-bar').prepend($('#jclockAdvanced-menu'));
|
||||
$('#jca').append('<h3>Options</h3><br/><label for="fontFamily">Font Family : </label><input type="text" id="fontFamily" name="fontFamily"/><br/><label for="fontSize">Font Size : </label><input type="text" id="fontSize" name="fontSize"/><br/><label for="format">Format : </label><input type="text" id="format" name="format"/><br/><label for="color">Color : </label><input type="text" id="color" name="color"/><span id="jca-submit" class="green-button">Enregistrer</span>');
|
||||
$('#jclockAdvanced-menu').fancybox({
|
||||
'zoomSpeedIn' : 600,
|
||||
'zoomSpeedOut' : 500,
|
||||
'easingIn' : 'easeOutBack',
|
||||
'easingOut' : 'easeInBack',
|
||||
'hideOnContentClick': false,
|
||||
'padding' : 15
|
||||
});
|
||||
$('#jca-submit').live('click', function(){
|
||||
var fontFamily = $('#fontFamily').val();
|
||||
var fontSize = $('#fontSize').val();
|
||||
var format = $('#format').val();
|
||||
var color = $('#color').val();
|
||||
if(fontFamily != '' && fontSize != '' && format != '' && color != ''){
|
||||
$.get('ajax/update.php', {id:'clockAdvanced', fontFamily: fontFamily, fontSize:fontSize, format:format, color:color}, function(msg){
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
$('#jca').append('<span class="error">Fields can\'t be empty.</span>');
|
||||
}
|
||||
});
|
||||
});
|
@@ -1,80 +0,0 @@
|
||||
$(document).ready(function(){
|
||||
// Réglage des options
|
||||
$('body').append('<img src="images/interface/link_edit.png" id="links-menu" />');
|
||||
$('body').append('<img src="images/interface/link_add.png" id="links-add-menu" />');
|
||||
$('#menu-bar').prepend($('#links-menu'));
|
||||
$('#menu-bar').prepend($('#links-add-menu'));
|
||||
$('#links-add-fancy').append('<form action="addLink.php" enctype="multipart/form-data" method="POST"><label for="urlField">URL : </label><input type="text" name="urlField" id="urlField"/><br/><label for="popupField">popup ? </label><input type="checkbox" name="popupField" id="popupField" checked="checked" value="1" /><br/><label for="imgField">Icône : </label><input type="file" name="imgField" id="imgField"/><br/><label for="titreField">Titre : </label><input type="text" name="titreField" id="titreField"/><br/><input type="submit" class="green-button" id="links-add-submit" value="Envoyer"/></form>');
|
||||
|
||||
// Apparition du menu d'ajout de lien
|
||||
$('#links-add-menu').live('click', function(){
|
||||
$.fancybox(
|
||||
$('#links-add-fancy').html()
|
||||
);
|
||||
});
|
||||
|
||||
// Apparition de la reserve de liens
|
||||
$('#links-menu').live('click', function(){
|
||||
$.get('ajax/loadReserve.php', function(html){
|
||||
$.fancybox(
|
||||
html,
|
||||
{
|
||||
'autoDimensions' : false,
|
||||
'width' : 400,
|
||||
'height' : 'auto',
|
||||
'showNavArrows' : false,
|
||||
'transitionIn' : 'elastic'
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// Passage Reserve => Liste
|
||||
$('#reserveiconlist .iconitem').live('click', function(e){
|
||||
e.preventDefault();
|
||||
$.post("ajax/reserveToList.php", {reserve: $(this).attr('id')});
|
||||
$('.iconlist').last().append('<li class="iconitem" id="'+$(this).attr('id')+'">'+$(this).html()+'</li>');
|
||||
$.fancybox.close();
|
||||
});
|
||||
|
||||
|
||||
//Passage Liste => Reserve
|
||||
$('.iconitem').mouseover(function(){
|
||||
$(this).children('.deleteLink').show();
|
||||
});
|
||||
$('.iconitem').mouseout(function(){
|
||||
$(this).children('.deleteLink').hide();
|
||||
});
|
||||
|
||||
$('.deleteLink').click(function(){
|
||||
$.post("ajax/listToReserve.php", {reserve: $(this).parent().attr('id')});
|
||||
$(this).parent().fadeOut();
|
||||
});
|
||||
|
||||
// Mouvement des liens avec enregistrement
|
||||
$(".iconlist").sortable(
|
||||
{
|
||||
connectWith: '.iconlist',
|
||||
update: function(event,ui){
|
||||
var linkOrder = $(this).sortable('toArray').toString();
|
||||
var label = $(ui.item).parent()[0].id;
|
||||
var itemMoved = $(ui.item)[0].id;
|
||||
$.post("ajax/update-links-order.php", {order: linkOrder, label : label, itemMoved: itemMoved});
|
||||
},
|
||||
start: function(e) {
|
||||
// have to remvoe click handler off item so drop doesn't click
|
||||
$("a.popup").unbind("click");
|
||||
}
|
||||
}
|
||||
).disableSelection().mouseout(function(){
|
||||
// reattach the item click handler
|
||||
$('a.popup').unbind("click").bind("click", function(e){
|
||||
e.preventDefault();
|
||||
var url = $(this).attr('href');
|
||||
spawnURL(url);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
@@ -1,130 +0,0 @@
|
||||
$(document).ready(function(){
|
||||
$('.delete').css({"display":"none"});//initialisation des delete
|
||||
|
||||
//passage au dessus des notes
|
||||
$('.note').hover(function () {
|
||||
$(this).find('.delete').css({"display":"block"});
|
||||
},
|
||||
function () {
|
||||
$(this).find('.delete').css({"display":"none"});
|
||||
});
|
||||
|
||||
//click sur delete
|
||||
$('.delete').click(function(){
|
||||
var data2 = {'id' : $(this).attr("id")};
|
||||
$(this).replaceWith('<img src="images/interface/ajax_load.gif" style="display:block" />');
|
||||
/* Sending an AJAX POST request: */
|
||||
$.post('ajax/delete-notes.php',data2,function(msg2){
|
||||
if(parseInt(msg2))
|
||||
{
|
||||
msg2--;
|
||||
//alert(msg2);
|
||||
$(".note:eq("+msg2+")").fadeOut();
|
||||
}
|
||||
|
||||
//$(this).parent('.note').hide();
|
||||
});
|
||||
});
|
||||
|
||||
var tmp;
|
||||
|
||||
$('.note').each(function(){
|
||||
/* Finding the biggest z-index value of the notes */
|
||||
|
||||
tmp = $(this).css('z-index');
|
||||
if(tmp>zIndex) zIndex = tmp;
|
||||
})
|
||||
|
||||
/* A helper function for converting a set of elements to draggables: */
|
||||
make_draggable($('.note'));
|
||||
|
||||
/* Configuring the fancybox plugin for the "Add a note" button: */
|
||||
$("#addButton").fancybox({
|
||||
'zoomSpeedIn' : 600,
|
||||
'zoomSpeedOut' : 500,
|
||||
'easingIn' : 'easeOutBack',
|
||||
'easingOut' : 'easeInBack',
|
||||
'hideOnContentClick': false,
|
||||
'padding' : 15
|
||||
});
|
||||
|
||||
/* Listening for keyup events on fields of the "Add a note" form: */
|
||||
$('.pr-body,.pr-author').live('keyup',function(e){
|
||||
|
||||
if(!this.preview)
|
||||
this.preview=$('#previewNote');
|
||||
|
||||
/* Setting the text of the preview to the contents of the input field, and stripping all the HTML tags: */
|
||||
this.preview.find($(this).attr('class').replace('pr-','.')).html($(this).val().replace(/<[^>]+>/ig,''));
|
||||
});
|
||||
|
||||
/* Changing the color of the preview note: */
|
||||
$('.color').live('click',function(){
|
||||
|
||||
$('#previewNote').removeClass('yellow green blue').addClass($(this).attr('class').replace('color',''));
|
||||
});
|
||||
/* The submit button: */
|
||||
$('#note-submit').live('click',function(e){
|
||||
|
||||
if($('.pr-body').val().length<4)
|
||||
{
|
||||
alert("The note text is too short!")
|
||||
return false;
|
||||
}
|
||||
|
||||
/*if($('.pr-author').val().length<1)
|
||||
{
|
||||
alert("You haven't entered your name!")
|
||||
return false;
|
||||
}*/
|
||||
|
||||
$(this).replaceWith('<img src="images/interface/ajax_load.gif" style="margin:30px auto;display:block" />');
|
||||
|
||||
var data = {
|
||||
'zindex' : ++zIndex,
|
||||
'body' : $('.pr-body').val(),
|
||||
/*'author' : $('.pr-author').val(),*/
|
||||
'color' : $.trim($('#previewNote').attr('class').replace('note',''))
|
||||
};
|
||||
|
||||
/* Sending an AJAX POST request: */
|
||||
$.post('ajax/post-notes.php',data,function(msg){
|
||||
|
||||
if(parseInt(msg))
|
||||
{
|
||||
/* msg contains the ID of the note, assigned by MySQL's auto increment: */
|
||||
var tmp = $('#previewNote').clone();
|
||||
//tmp.find('.delete').attr('id',msg);
|
||||
tmp.find('span.data').text(msg).end().css({'z-index':zIndex,top:0,left:0});
|
||||
tmp.appendTo('body');
|
||||
|
||||
make_draggable(tmp)
|
||||
}
|
||||
|
||||
//$.fn.fancybox.close;
|
||||
$.fancybox.close();
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
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.php',{
|
||||
x : ui.position.left,
|
||||
y : ui.position.top,
|
||||
z : zIndex,
|
||||
id : parseInt(ui.helper.find('span.data').html())
|
||||
});
|
||||
}
|
||||
});}
|
||||
});
|
@@ -1,12 +0,0 @@
|
||||
$(document).ready(function(){
|
||||
$('body').append('<img src="images/interface/music.png" id="ouifm-menu"/>');
|
||||
$('#menu-bar').prepend($('#ouifm-menu'));
|
||||
|
||||
$('#ouifm-menu').click(function(){
|
||||
var radioUrl_adswizz="http://ouifm.ice.infomaniak.ch/ouifm-high.mp3";
|
||||
// radioUrl_adswizz=com_adswizz_synchro_decorateUrl(radioUrl_adswizz);
|
||||
|
||||
var player_object_adswizz='<object data="http://www.ouifm.fr/scripts_player/miniPlayer.swf" name="name_player_radio_1829" id="id_player_radio_894_1829" type="application/x-shockwave-flash" height="28" width="144"><param value="false" name="menu"><param value="always" name="AllowScriptAccess"><param value="transparent" name="wmode"><param value="noscale" name="scale"><param value="lt" name="salign"><param value="#ffffff" name="bgcolor"><param value="high" name="quality"><param value="false" name="allowfullscreen"><param value="objId=id_player_radio_894_1829&paramCurrentAudioMode=liveMP3&paramServerUrl=&paramStreamName=&paramStreamUrl='+escape(radioUrl_adswizz)+'&paramBackgroundColor=0x000000&paramButtonsColor=0xcccccc&paramErrorColor=0xff0000&paramAutoplay=1&paramSoundValue=100&paramFlashCookie=0&paramCallback=1" name="flashvars"></object>';
|
||||
$('#ouifm').html(player_object_adswizz);
|
||||
});
|
||||
});
|
@@ -1,184 +0,0 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
var config = {
|
||||
type : 'web',
|
||||
perPage : 8, // A maximum of 8 is allowed by Google
|
||||
page : 0 // The start page
|
||||
}
|
||||
|
||||
// The small arrow that marks the active search icon:
|
||||
var arrow = $('<span>',{className:'arrow'}).appendTo('ul.icons');
|
||||
|
||||
$('ul.icons li').click(function(){
|
||||
var el = $(this);
|
||||
|
||||
if(el.hasClass('active')){
|
||||
// The icon is already active, exit
|
||||
return false;
|
||||
}
|
||||
|
||||
el.siblings().removeClass('active');
|
||||
el.addClass('active');
|
||||
|
||||
// Move the arrow below this icon
|
||||
arrow.stop().animate({
|
||||
left : el.position().left,
|
||||
marginLeft : (el.width()/2)-4
|
||||
});
|
||||
|
||||
// Set the search type
|
||||
config.type = el.attr('data-searchType');
|
||||
$('#more').fadeOut();
|
||||
});
|
||||
|
||||
// Focusing the input text box:
|
||||
$('#s').focus();
|
||||
|
||||
$('#searchForm').submit(function(){
|
||||
googleSearch();
|
||||
return false;
|
||||
});
|
||||
|
||||
function googleSearch(settings){
|
||||
|
||||
// If no parameters are supplied to the function,
|
||||
// it takes its defaults from the config object above:
|
||||
|
||||
settings = $.extend({},config,settings);
|
||||
settings.term = settings.term || $('#s').val();
|
||||
|
||||
// URL of Google's AJAX search API
|
||||
var apiURL = 'http://ajax.googleapis.com/ajax/services/search/'+settings.type+
|
||||
'?v=1.0&callback=?';
|
||||
|
||||
$.getJSON(apiURL,{
|
||||
q : settings.term,
|
||||
rsz : settings.perPage,
|
||||
start : settings.page*settings.perPage
|
||||
},function(r){
|
||||
|
||||
var results = r.responseData.results;
|
||||
$('#more').remove();
|
||||
|
||||
if(results.length){
|
||||
|
||||
// If results were returned, add them to a pageContainer div,
|
||||
// after which append them to the #resultsDiv:
|
||||
|
||||
var pageContainer = $('<div>',{className:'pageContainer'});
|
||||
|
||||
for(var i=0;i<results.length;i++){
|
||||
// Creating a new result object and firing its toString method:
|
||||
pageContainer.append(new result(results[i]) + '');
|
||||
}
|
||||
|
||||
var cursor = r.responseData.cursor;
|
||||
|
||||
// Checking if there are more pages with results,
|
||||
// and deciding whether to show the More button:
|
||||
|
||||
if( +cursor.estimatedResultCount > (settings.page+1)*settings.perPage){
|
||||
$('<div>',{id:'more'}).appendTo(pageContainer).click(function(){
|
||||
googleSearch({append:true,page:settings.page+1});
|
||||
$(this).fadeOut();
|
||||
});
|
||||
}
|
||||
|
||||
pageContainer.append('<div class="clear"></div>').hide();
|
||||
|
||||
$.fancybox(
|
||||
$(pageContainer).html(),
|
||||
{
|
||||
'autoDimensions' : false,
|
||||
'width' : 400,
|
||||
'height' : 'auto',
|
||||
'showNavArrows' : false,
|
||||
'transitionIn' : 'elastic'
|
||||
}
|
||||
);
|
||||
$('#more').click(function(){
|
||||
googleSearch({append:true,page:settings.page+1});
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
var pageContainer = $('<div>',{className:'pageContainer'});
|
||||
// No results were found for this search.
|
||||
|
||||
$('<p>',{
|
||||
className : 'notFound',
|
||||
html : 'No Results Were Found!'
|
||||
}).appendTo(pageContainer);
|
||||
// .hide().appendTo(resultsDiv).fadeIn();
|
||||
$.fancybox(
|
||||
$(pageContainer).html(),
|
||||
{
|
||||
'autoDimensions' : false,
|
||||
'width' : 400,
|
||||
'height' : 'auto',
|
||||
'showNavArrows' : false,
|
||||
'transitionIn' : 'elastic'
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function result(r){
|
||||
|
||||
// This is class definition. Object of this class are created for
|
||||
// each result. The markup is generated by the .toString() method.
|
||||
|
||||
var arr = [];
|
||||
|
||||
// GsearchResultClass is passed by the google API
|
||||
switch(r.GsearchResultClass){
|
||||
|
||||
case 'GwebSearch':
|
||||
arr = [
|
||||
'<div class="webResult">',
|
||||
'<h2><a href="',r.url,'">',r.title,'</a></h2>',
|
||||
'<p>',r.content,'</p>',
|
||||
'<a href="',r.url,'">',r.visibleUrl,'</a>',
|
||||
'</div>'
|
||||
];
|
||||
break;
|
||||
case 'GimageSearch':
|
||||
arr = [
|
||||
'<div class="imageResult">',
|
||||
'<a href="',r.url,'" title="',r.titleNoFormatting,
|
||||
'" class="pic" style="width:',r.tbWidth,'px;height:',r.tbHeight,'px;">',
|
||||
'<img src="',r.tbUrl,'" width="',r.tbWidth,'" height="',
|
||||
r.tbHeight,'" /></a>','<div class="clear"></div>',
|
||||
'<a href="',r.originalContextUrl,'">',r.visibleUrl,'</a>',
|
||||
'</div>'
|
||||
];
|
||||
break;
|
||||
case 'GvideoSearch':
|
||||
arr = [
|
||||
'<div class="imageResult">',
|
||||
'<a href="',r.url,'" title="',r.titleNoFormatting,
|
||||
'" class="pic" style="width:150px;height:auto;">',
|
||||
'<img src="',r.tbUrl,'" width="100%" /></a>',
|
||||
'<div class="clear"></div>','<a href="',
|
||||
r.originalContextUrl,'">',r.publisher,'</a>',
|
||||
'</div>'
|
||||
];
|
||||
break;
|
||||
case 'GnewsSearch':
|
||||
arr = [
|
||||
'<div class="webResult">',
|
||||
'<h2><a href="',r.unescapedUrl,'">',r.title,'</a></h2>',
|
||||
'<p>',r.content,'</p>',
|
||||
'<a href="',r.unescapedUrl,'">',r.publisher,'</a>',
|
||||
'</div>'
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
||||
// The toString method.
|
||||
this.toString = function(){
|
||||
return arr.join('');
|
||||
}
|
||||
}
|
||||
});
|
@@ -1,30 +0,0 @@
|
||||
$(document).ready(function(){
|
||||
$('body').append('<a href="#city" id="city-menu"><img src="images/interface/weather.png" /></a><div style="display:none;"><div id="city"></div></div>');
|
||||
$('#menu-bar').prepend($('#city-menu'));
|
||||
$('#city').append('<h3>Quelle ville pour la meteo ?</h3><br/><input type="text" id="cityChoice" name="cityChoice"/><span id="city-submit" class="green-button">Enregistrer</span>');
|
||||
$('#city-menu').fancybox({
|
||||
'zoomSpeedIn' : 600,
|
||||
'zoomSpeedOut' : 500,
|
||||
'easingIn' : 'easeOutBack',
|
||||
'easingOut' : 'easeInBack',
|
||||
'hideOnContentClick': false,
|
||||
'padding' : 15
|
||||
});
|
||||
$('#city-submit').live('click', function(){
|
||||
var ville = $('#cityChoice').val();
|
||||
if(ville != '' || ville != null){
|
||||
$.get('ajax/update.php', {id:'weather', city: ville}, function(msg){
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
$('#city').append('<span class="error">City can\'t be empty.</span>');
|
||||
}
|
||||
});
|
||||
|
||||
var tmp;
|
||||
|
||||
/* A helper function for converting a set of elements to draggables: */
|
||||
make_draggable($('#weather'));
|
||||
|
||||
|
||||
});
|
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
|
||||
* jQuery.ajax mid - CROSS DOMAIN AJAX
|
||||
|
||||
* ---
|
||||
|
||||
* @author James Padolsey (http://james.padolsey.com)
|
||||
|
||||
* @version 0.11
|
||||
|
||||
* @updated 12-JAN-10
|
||||
|
||||
* ---
|
||||
|
||||
* Note: Read the README!
|
||||
|
||||
* ---
|
||||
|
||||
* @info http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
jQuery.ajax = (function(_ajax){
|
||||
|
||||
|
||||
|
||||
var protocol = location.protocol,
|
||||
|
||||
hostname = location.hostname,
|
||||
|
||||
exRegex = RegExp(protocol + '//' + hostname),
|
||||
|
||||
YQL = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?callback=?',
|
||||
|
||||
query = 'select * from html where url="{URL}" and xpath="*"';
|
||||
|
||||
|
||||
|
||||
function isExternal(url) {
|
||||
|
||||
return !exRegex.test(url) && /:\/\//.test(url);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return function(o) {
|
||||
|
||||
|
||||
|
||||
var url = o.url;
|
||||
|
||||
|
||||
|
||||
if ( /get/i.test(o.type) && !/json/i.test(o.dataType) && isExternal(url) ) {
|
||||
|
||||
|
||||
|
||||
// Manipulate options so that JSONP-x request is made to YQL
|
||||
|
||||
|
||||
|
||||
o.url = YQL;
|
||||
|
||||
o.dataType = 'json';
|
||||
|
||||
|
||||
|
||||
o.data = {
|
||||
|
||||
q: query.replace(
|
||||
|
||||
'{URL}',
|
34
js/mappy.js
34
js/mappy.js
@@ -1,34 +0,0 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#menu-bar').append($('#myAdress'));
|
||||
$('#myAdressField').keydown(function(e){
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
if(code == 13) {
|
||||
var adress = $(this).val();
|
||||
geocode(adress);
|
||||
$('#mymap').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function geocode (addr)
|
||||
{
|
||||
var geo = new Mappy.api.geolocation.Geocoder();
|
||||
geo.geocode(addr, function (results)
|
||||
{
|
||||
var map = new Mappy.api.map.Map({
|
||||
container:"#mymap"
|
||||
});
|
||||
var scalePosition = new Mappy.api.map.tools.ToolPosition('lb', new Mappy.api.types.Point(10, 0));
|
||||
var scale = new Mappy.api.map.tools.Scale(scalePosition);
|
||||
map.addTool(scale);
|
||||
var latitude = results[0].Placemark.Point.coordinates[0];
|
||||
var longitude = results[0].Placemark.Point.coordinates[1];
|
||||
var markerLayer = new Mappy.api.map.layer.MarkerLayer(40);
|
||||
map.addLayer(markerLayer);
|
||||
var icon = new Mappy.api.ui.Icon(Mappy.api.ui.Icon.DEFAULT);
|
||||
var marker = new Mappy.api.map.Marker(new Mappy.api.geo.Coordinates(latitude, longitude), icon);
|
||||
markerLayer.addMarker(marker);
|
||||
map.setCenter(new Mappy.api.geo.Coordinates(latitude,longitude),7);
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user