Version avec modules séparés !
parent
2861556131
commit
734e6f4829
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
class clock extends Module {
|
||||
|
||||
protected static $paramsList = array(
|
||||
'visibility',
|
||||
'x',
|
||||
'y'
|
||||
);
|
||||
|
||||
public $params = array();
|
||||
|
||||
public function __construct($params){
|
||||
$this->setParams($params);
|
||||
echo '<script type="text/javascript" src="js/jquery.jclock.js"></script>';
|
||||
echo '<div class="jclock" id="clock" style="left:'.$params['x'].'; top:'.$params['y'].';"></div>';
|
||||
}
|
||||
|
||||
private function setParams($params){
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public static function start($params){
|
||||
$clock = new clock($params);
|
||||
}
|
||||
|
||||
public static function updateConfig($updated){
|
||||
foreach ($updated as $what=>$withWhat){
|
||||
if(in_array($what, self::$paramsList)){
|
||||
call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
<?php
|
||||
class search extends Module {
|
||||
|
||||
protected static $paramsList = array(
|
||||
'visibility'
|
||||
);
|
||||
public $params = array();
|
||||
|
||||
public function __construct($params){
|
||||
echo '<link rel="stylesheet" type="text/css" href="css/search.css">
|
||||
<script type="text/javascript" src="js/jquery.search.js"></script>
|
||||
<form id="searchForm" method="post">
|
||||
<fieldset>
|
||||
<input id="s" type="text" />
|
||||
<input type="submit" value="Submit" id="submitButton" class="searchbutton" />
|
||||
|
||||
<ul class="icons">
|
||||
<li class="web" title="Web Search" data-searchType="web">Web</li>
|
||||
<li class="images" title="Image Search" data-searchType="images">Images</li>
|
||||
<li class="news" title="News Search" data-searchType="news">News</li>
|
||||
<li class="videos" title="Video Search" data-searchType="video">Videos</li>
|
||||
</ul>
|
||||
|
||||
</fieldset>
|
||||
</form>';
|
||||
}
|
||||
|
||||
private function setParams($params){
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public static function start($params){
|
||||
$search = new search($params);
|
||||
}
|
||||
|
||||
public static function updateConfig($updated){
|
||||
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?
|
||||
$xmla = simplexml_load_file('todoist.xml');
|
||||
if($xmla->token== '' || $xmla->token == null)
|
||||
header('Location: index.php');
|
||||
if($xmla->id != '' || $xmla->id != null):
|
||||
$token = $xmla->token;
|
||||
$id = $xmla->id;?>
|
||||
|
||||
<script type="text/javascript" src="js/getUncompletedTasks.php?token=<?=$token?>&id=<?=$id?>"></script>
|
||||
<? else:
|
||||
header('Location: getProjectsList.php');
|
||||
endif;
|
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
@ -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');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -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}',
|
||||
url + (o.data ?
|
||||
(/\?/.test(url) ? '&' : '?') + jQuery.param(o.data)
|
||||
: '')
|
||||
),
|
||||
format: 'xml'
|
||||
};
|
||||
|
||||
// Since it's a JSONP request
|
||||
// complete === success
|
||||
if (!o.success && o.complete) {
|
||||
o.success = o.complete;
|
||||
delete o.complete;
|
||||
}
|
||||
|
||||
o.success = (function(_success){
|
||||
return function(data) {
|
||||
|
||||
if (_success) {
|
||||
// Fake XHR callback.
|
||||
_success.call(this, {
|
||||
responseText: data.results[0]
|
||||
// YQL screws with <script>s
|
||||
// Get rid of them
|
||||
.replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
|
||||
}, 'success');
|
||||
}
|
||||
|
||||
};
|
||||
})(o.success);
|
||||
|
||||
}
|
||||
|
||||
return _ajax.apply(this, arguments);
|
||||
|
||||
};
|
||||
|
||||
})(jQuery.ajax);
|
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
class clock extends Module {
|
||||
|
||||
protected static $paramsList = array(
|
||||
'visibility',
|
||||
'x',
|
||||
'y'
|
||||
);
|
||||
|
||||
public $params = array();
|
||||
|
||||
public function __construct($params){
|
||||
$this->moduleName = get_class();
|
||||
$this->pathToModule = 'modules/'.$this->moduleName.'/';
|
||||
$this->setParams($params);
|
||||
echo '<script type="text/javascript" src="'.$this->pathToModule.'js/'.$this->moduleName.'.js"></script>
|
||||
<link rel="stylesheet" href="'.$this->pathToModule.'css/'.$this->moduleName.'.css" type="text/css" />';
|
||||
echo '<div class="jclock" id="clock" style="left:'.$params['x'].'; top:'.$params['y'].';"></div>';
|
||||
}
|
||||
|
||||
private function setParams($params){
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public static function start($params){
|
||||
$clock = new clock($params);
|
||||
}
|
||||
|
||||
public function setVisibility($visibility){
|
||||
// Saving the position and z-index of the note:
|
||||
$xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE);
|
||||
|
||||
$path = $xmla->xpath("//item[@id='clock']");
|
||||
$path[0]->visibility = $visibility;
|
||||
|
||||
$xmla->asXML('../'.AccueilModules::CONFIG_FILE);
|
||||
|
||||
echo "ok";
|
||||
}
|
||||
|
||||
public static function updateConfig($updated){
|
||||
foreach ($updated as $what=>$withWhat){
|
||||
if(in_array($what, self::$paramsList)){
|
||||
call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
var geocoder = new google.maps.Geocoder();
|
||||
var map;
|
||||
var gmarkers = [];
|
||||
var infowindow;
|
||||
var directions = new google.maps.DirectionsRenderer();
|
||||
var directionsService = new google.maps.DirectionsService();
|
||||
var current_lat = 0;
|
||||
var current_lng = 0;
|
||||
function getCurrentLat() {
|
||||
return current_lat;
|
||||
}
|
||||
function getCurrentLng() {
|
||||
return current_lng;
|
||||
}
|
||||
function addMarker(latlng,title,content,category,icon) {
|
||||
var marker = new google.maps.Marker({
|
||||
map: map,
|
||||
title : title,
|
||||
icon: new google.maps.MarkerImage(icon, new google.maps.Size(57,34)),
|
||||
position: latlng
|
||||
});
|
||||
var html = '<div style="float:left;text-align:left;width:250;">'+content+'</div>'
|
||||
google.maps.event.addListener(marker, "click", function() {
|
||||
if (infowindow) infowindow.close();
|
||||
infowindow = new google.maps.InfoWindow({content: html});
|
||||
infowindow.open(map,marker);
|
||||
map.setCenter(new google.maps.LatLng(latlng.lat(),latlng.lng()),3);
|
||||
});
|
||||
marker.mycategory = category;
|
||||
gmarkers.push(marker);
|
||||
}
|
||||
function geocodeMarker(address,title,content,category,icon) {
|
||||
if (geocoder) {
|
||||
geocoder.geocode( { "address" : address}, function(results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK) {
|
||||
var latlng = results[0].geometry.location;
|
||||
addMarker(results[0].geometry.location,title,content,category,icon)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function geocodeCenter(address) {
|
||||
if (geocoder) {
|
||||
geocoder.geocode( { "address": address}, function(results, status) {
|
||||
if (status == google.maps.GeocoderStatus.OK) {
|
||||
map.setCenter(results[0].geometry.location);
|
||||
} else {
|
||||
alert("Geocode was not successful for the following reason: " + status);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function initialize() {
|
||||
var myLatlng = new google.maps.LatLng(48.8792,2.34778);
|
||||
var myOptions = {
|
||||
zoom: 11,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById("mymap"), myOptions);
|
||||
geocodeCenter("Paris France");
|
||||
google.maps.event.addListener(map,"click",function(event) { if (event) { current_lat=event.latLng.lat();current_lng=event.latLng.lng(); }}) ;
|
||||
directions.setMap(map);
|
||||
directions.setPanel(document.getElementById("route"))
|
||||
}
|
||||
initialize();
|
||||
$('#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) {
|
||||
e.preventDefault();
|
||||
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');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?
|
||||
include '../class/Links.php';
|
||||
if($links_xml = simplexml_load_file('../'.links::LINKS_FILE)){
|
||||
if($links_xml = simplexml_load_file("../db/links.xml")){
|
||||
$links = $links_xml->reserve;
|
||||
foreach($links as $label){
|
||||
echo '<ul id="reserveiconlist">';
|
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
class search extends Module {
|
||||
|
||||
protected $moduleName;
|
||||
protected $moduleTitle;
|
||||
protected $pathToModule;
|
||||
|
||||
protected static $paramsList = array(
|
||||
'visibility'
|
||||
);
|
||||
public $params = array();
|
||||
|
||||
public function __construct($params){
|
||||
$this->moduleName = get_class();
|
||||
$this->pathToModule = 'modules/'.$this->moduleName.'/';
|
||||
$this->setParams($params);
|
||||
echo '<link rel="stylesheet" type="text/css" href="'.$this->pathToModule.'css/search.css">
|
||||
<script type="text/javascript" src="'.$this->pathToModule.'js/jquery.search.js"></script>
|
||||
<form id="searchForm" method="post">
|
||||
<fieldset>
|
||||
<input id="s" type="text" />
|
||||
<input type="submit" value="Submit" id="submitButton" class="searchbutton" />
|
||||
|
||||
<ul class="icons">
|
||||
<li class="web" title="Web Search" data-searchType="web">Web</li>
|
||||
<li class="images" title="Image Search" data-searchType="images">Images</li>
|
||||
<li class="news" title="News Search" data-searchType="news">News</li>
|
||||
<li class="videos" title="Video Search" data-searchType="video">Videos</li>
|
||||
</ul>
|
||||
|
||||
</fieldset>
|
||||
</form>';
|
||||
}
|
||||
|
||||
private function setParams($params){
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public static function start($params){
|
||||
$search = new search($params);
|
||||
}
|
||||
|
||||
public function setVisibility($visibility){
|
||||
// Saving the position and z-index of the note:
|
||||
$xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE);
|
||||
|
||||
$path = $xmla->xpath("//item[@id='search']");
|
||||
$path[0]->visibility = $visibility;
|
||||
|
||||
$xmla->asXML('../'.AccueilModules::CONFIG_FILE);
|
||||
|
||||
echo "ok";
|
||||
}
|
||||
|
||||
public static function updateConfig($updated){
|
||||
foreach ($updated as $what=>$withWhat){
|
||||
if(in_array($what, self::$paramsList)){
|
||||
call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?
|
||||
$xmla = simplexml_load_file('../db/todoist.xml');
|
||||
if($xmla->token== '' || $xmla->token == null)
|
||||
header('Location: ./');
|
||||
if($xmla->id != '' || $xmla->id != null):
|
||||
$token = $xmla->token;
|
||||
$id = $xmla->id;?>
|
||||
|
||||
<script type="text/javascript" src="../js/getUncompletedTasks.php?token=<?=$token?>&id=<?=$id?>"></script>
|
||||
<? else:
|
||||
header('Location: getProjectsList.php');
|
||||
endif;
|
@ -1,11 +1,11 @@
|
||||
<?
|
||||
$xmla = simplexml_load_file('db/todoist.xml');
|
||||
$xmla = simplexml_load_file('../db/todoist.xml');
|
||||
if($xmla->token == '' || $xmla->token == null):?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Todoist : Login</title>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/index.js"></script>
|
||||
<script type="text/javascript" src="../js/index.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue