Commit b28302b2 authored by Vincent Dubois's avatar Vincent Dubois

Modification diverse :

-> déplacement des js compilés
-> suppression des js inutile
-> ajout du style invalidé
parent 99504261
This diff is collapsed.
......@@ -93,7 +93,8 @@ class OauthOsm {
url: '/',
request: 'GetNoteId',
params: {
id: 1
id: 1,
format: ''
}
},
GetNotesBoundsBox: {
......@@ -104,7 +105,8 @@ class OauthOsm {
left: 0,
bottom: 0,
right: 10,
top: 10
top: 10,
format: ''
}
},
SearchNotes: {
......@@ -114,8 +116,9 @@ class OauthOsm {
params: {
query: 'hello',
limit: 100, // 1 -> 10000
closed: 7 // Specifies the number of days a bug needs to be closed to no longer be returned
closed: 7, // Specifies the number of days a bug needs to be closed to no longer be returned
// A value of 0 means only open bugs are returned. A value of -1 means all bugs are returned.
format: ''
}
},
GetChangesetId: {
......@@ -366,7 +369,12 @@ class OauthOsm {
type: apiRequest.method,
data: data
}).done((data) => {
this._connected = true;
//console.trace('myGeocropping', 'request ok connected:', this._connected);
if (this._connected == false) {
this._connected = true;
this.connect();
}
deferred.resolveWith(this, [data]);
}).fail((jqXHR: JQueryXHR, textStatus: string, errorThrown: string) => {
......@@ -409,6 +417,8 @@ class OauthOsm {
* @return {JQueryPromise} Pour gérer les callbacks
*/
connect() {
//console.trace('myGeocropping', 'osm connect ', this.isConnected);
let deferred = $.Deferred();
if (this.isConnected) {
......@@ -430,7 +440,7 @@ class OauthOsm {
};
let error = (...args) => {
console.log(args);
//console.trace('myGeocropping',args);
deferred.rejectWith(this, args);
};
......@@ -478,6 +488,7 @@ class OauthOsm {
},
success: (data) => {
deferred.resolveWith(this);
this._connected = false;
$(this).trigger("disconnected");
},
error: (err) => {
......
......@@ -2,7 +2,7 @@
/// <reference path="myTypings/tsd.d.ts" />
function toggleRightMenu() {
var actualRight = $('body')[0].offsetWidth - $('.side-nav.fit-right')[0].offsetLeft;
let actualRight = $('body')[0].offsetWidth - $('.side-nav.fit-right')[0].offsetLeft;
if (actualRight !== 0)
closeRightMenu();
else
......@@ -82,17 +82,15 @@ $(document).ready(() => {
geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);
});
if (geocropping.isConnected) {
let userConnected = () => {
//console.trace('myGeocropping', 'connected');
$('#userAction #login').hide();
$('#userAction #logout').show();
$('.map-menu-item:has(#userImage)').show();
} else {
$('#userAction #logout').hide();
$('#userAction #login').show();
$('.map-menu-item:has(#userImage)').hide();
};
}
let userDisconnected = () => {
//console.trace('myGeocropping', 'disconnected');
$geocropping.on('userDisconnected', (e) => {
$('#userAction #logout').hide();
$('#userAction #login').show();
......@@ -100,19 +98,31 @@ $(document).ready(() => {
$('#userInfo').hide();
$('#userImage').attr('src', '');
$('#userInfo #userName').text('');
});
}
$geocropping.on('userConnected', () => {
$('#userAction #login').hide();
$('#userAction #logout').show();
$('.map-menu-item:has(#userImage)').show();
});
$geocropping.on('userDisconnected', userDisconnected);
$geocropping.on('userConnected', userConnected);
let updateUserDetails = (e, data) => {
//console.trace('myGeocropping', 'updateUserDetails', e);
$geocropping.on('userDetailsUpdated', (e, data) => {
$('#userImage').show();
$('#userImage').attr('src', data.img);
$('#userInfo #userName').text(data.display_name);
});
}
$geocropping.on('userDetailsUpdated', updateUserDetails);
//console.trace('myGeocropping', geocropping.isConnected);
if (geocropping.isConnected) {
//console.trace('myGeocropping', 'test ok', geocropping.getUserDetails());
userConnected();
//updateUserDetails(null, geocropping.getUserDetails());
} else {
userDisconnected();
};
geocropping.createMap('map');
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
],
"target": "es5",
"noImplicitAny": false,
"outDir": "../",
"outDir": "../js",
"removeComments": false,
"alwaysStrict": true,
"declaration": true,
......
......@@ -19,7 +19,11 @@ declare class Geocropping {
_userMarker: L.Marker;
_geoJSONLayers: L.GeoJSON;
_lastUserLocation?: L.LatLng;
_featureDisplayed: number[];
_featureDisplayed: {
layer: L.Layer;
note?: any;
}[];
__locationFoundClick: L.EventHandlerFn;
_map_minZoom: number;
_map_maxZoom: number;
/** index ofserver url interpreter used*/
......@@ -41,8 +45,8 @@ declare class Geocropping {
_style_alert: L.PathOptions;
_style_warning: L.PathOptions;
_style_ok: L.PathOptions;
_style_done: L.PathOptions;
_style_selected: L.PathOptions;
_style_invalid: L.PathOptions;
static readonly DEFAULT: Geocropping.DEFAULT;
constructor();
connect(): this;
......@@ -53,9 +57,10 @@ declare class Geocropping {
isMapCreated(): boolean;
createMap(map: any): boolean;
setClickPosition(active: Boolean): void;
_locationFoundClickFunction(): L.EventHandlerFn;
startLocateUser(): boolean;
stopLocateUser(): void;
_locationFound(options: any, data: L.LocationEvent): void;
_locationFound(data: L.LocationEvent, options?: any): void;
_locationError(options: any, data: any): void;
_searchDataAround(pos: L.LatLng): void;
}
......@@ -70,6 +70,7 @@ declare class OauthOsm {
request: string;
params: {
id: number;
format: string;
};
};
GetNotesBoundsBox: {
......@@ -81,6 +82,7 @@ declare class OauthOsm {
bottom: number;
right: number;
top: number;
format: string;
};
};
SearchNotes: {
......@@ -91,6 +93,7 @@ declare class OauthOsm {
query: string;
limit: number;
closed: number;
format: string;
};
};
GetChangesetId: {
......
......@@ -3,7 +3,9 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"configurations": [
{
"type": "php",
"request": "launch",
"name": "PHP",
......@@ -15,9 +17,18 @@
"type": "chrome",
"request": "launch",
"name": "Launch Chrome remote",
"url": "http://dev-vdubois.xsalto.com/OSM/geocropping/",
"url": "https://geocropping.xsalto.com",
"webRoot": "${workspaceRoot}",
"runtimeExecutable": "chromium-browser"
"runtimeExecutable": "google-chrome"
},
{
"type": "chrome",
"request": "attach",
"name": "Attach Chrome remote",
"port": 9222,
"url": "https://geocropping.xsalto.com",
"webRoot": "${workspaceRoot}"
},
{
......@@ -35,7 +46,7 @@
"name": "Launch Firefox remotehost",
"type": "firefox",
"request": "launch",
"url": "http://dev-vdubois.xsalto.com/OSM/geocropping/",
"url": "https://geocropping.xsalto.com",
"webRoot": "${workspaceRoot}",
"firefoxExecutable": ""
},
......@@ -50,7 +61,7 @@
"name": "Launch FirefoxDev remotehost",
"type": "firefox",
"request": "launch",
"url": "http://dev-vdubois.xsalto.com/OSM/geocropping/",
"url": "https://geocropping.xsalto.com",
"webRoot": "${workspaceRoot}",
"firefoxExecutable": "/home/vdubois/Bureau/firefox/firefox"
}
......
......@@ -2,5 +2,14 @@
{
// TypeScript
"typescript.validate.enable": true,
"typescript.format.enable": true
"typescript.format.enable": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.js.map": true
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -121,7 +121,7 @@ class Geocropping
]
];
$url = $req->to_url();
if (!empty($content)) {
$options['http']['content'] = $content;
$options['http']['header'] .= 'Content-Type: '.self::getMime($content)."\r\n";
......@@ -132,7 +132,6 @@ class Geocropping
return $this->parseHeaders($http_response_header);
}*/
$headers = $this->parseHeaders($http_response_header);
//var_dump($headers['Content-Type'], strpos($headers['Content-Type'],'application/xml'), strpos($headers['Content-Type'], 'text/xml'), $headers['Content-Type'] && (strpos($headers['Content-Type'],'application/xml') || strpos($headers['Content-Type'], 'text/xml')));
if ($headers['Content-Type'] && (strpos($headers['Content-Type'], 'application/xml') !== false || strpos($headers['Content-Type'], 'text/xml') !== false)) {
$headers['Content-Type'] = 'application/json';
$str = simplexml_load_string($str);
......@@ -145,33 +144,6 @@ class Geocropping
return (new finfo(FILEINFO_MIME_TYPE))->buffer($data);
}
// reverse simplexml_load_string
/*static function json2xml($json = [], &$parentXMLElement = null)
{
if (!is_a($parentXMLElement, 'SimpleXMLElement')) {
// we need a parent ( ex: $parentXMLElement = new SimpleXMLElement('<osm/>') )
return null;
}
foreach ($json as $key => $value) {
if ($key === '@attributes') {
foreach ($value as $attributeName => $attributeValue) {
$parentXMLElement->addAttribute($attributeName, $attributeValue);
}
} elseif (is_array($value)) {
foreach ($value as $index => $child) {
$newParent = $parentXMLElement->addChild($key);
self::json2xml($child, $newParent);
}
} else {
$newParent = $parentXMLElement->addChild($key);
self::json2xml($value, $newParent);
}
}
return $parentXMLElement;
}
*/
private function parseHeaders($headers)
{
$head=[];
......@@ -225,14 +197,16 @@ class Geocropping
return $this->requestAPI($url, null, $options, 'GET');
case 'GetNoteId':
$id = $options['id']?$options['id']:'1';
$url='/api/0.6/notes/'.$id;
$format=$options['format']?'.'.$options['format']:'';
$url='/api/0.6/notes/'.$id.$format;
return $this->requestAPI($url, null, $options, 'GET');
case 'GetNotesBoundsBox':
$left=$options['left']?$options['left']:'0';
$bottom=$options['bottom']?$options['bottom']:'0';
$right=$options['right']?$options['right']:'10';
$top=$options['top']?$options['top']:'10';
$url='/api/0.6/notes?bbox='.$left.','.$bottom.','.$right.','.$top;
$format=$options['format']?'.'.$options['format']:'';
$url='/api/0.6/notes'.$format.'?bbox='.$left.','.$bottom.','.$right.','.$top;
return $this->requestAPI($url, null, $options, 'GET');
case 'SearchNotes':
$query=$options['query']?$options['query']:'hello';
......@@ -240,8 +214,9 @@ class Geocropping
$closed=$options['closed']?$options['closed']:'7';// Specifies the number of days a bug needs to be closed to no longer be returned
// A value of 0 means only open bugs are returned.
// A value of -1 means all bugs are returned.
$format=$options['format']?'.'.$options['format']:'';
$url='/api/0.6/notes/search?q='.$query.'&limit='.$limit.'&closed='.$closed;
$url='/api/0.6/notes/search'.$format.'?q='.$query.'&limit='.$limit.'&closed='.$closed;
return $this->requestAPI($url, null, $options, 'GET');
case 'GetChangesetId':
$id = $options['id']?$options['id']:'1';
......@@ -276,7 +251,7 @@ class Geocropping
}
$url='/api/0.6/'.$type.'/'.$id.'/version';
return $this->requestAPI($url, null, $options, 'GET');
case 'GetElementsId': // kapout !!!!!!!!!!!!!!!!!!!!
case 'GetElementsId': // ?
$id = $options['id']?$options['id']:['100','102'];
if (is_array($id)) {
$id = implode(',', $id);
......@@ -295,11 +270,11 @@ class Geocropping
}
$url='/api/0.6/'.$type.'/'.$id.'/relations';
return $this->requestAPI($url, null, $options, 'GET');
case 'GetNodeIdWays': // kapout !!!!!!!!!!!!!!!!!!!!!
case 'GetNodeIdWays': // ?
$id = $options['id']?$options['id']:'1';
$url='/api/0.6/ways/'.$id.'/ways';
return $this->requestAPI($url, null, $options, 'GET');
case 'GetElementIdFull':// kapout !!!!!!!!!!!!!!!!!!!!
case 'GetElementIdFull':// ?
$id = $options['id']?$options['id']:'1';
$type = strtolower($options['type']);// [way|relation]
if (!preg_match('/^(way|relations)$/', $type)) {
......@@ -338,7 +313,7 @@ class Geocropping
/////////
/// PUT
case 'CreateChangeset':
$element = $options['element'];
unset($options['element']);
......@@ -362,7 +337,7 @@ class Geocropping
$element = $xml->saveXML();
$url='/api/0.6/changeset/create';
return $this->requestAPI($url, null, $options, 'PUT', $element);
case 'UpdateChangeset':
$id = $options['id'];
$element = $options['element'];
......@@ -394,13 +369,13 @@ class Geocropping
$element = $xml->saveXML();
$url='/api/0.6/changeset/'.$id;
return $this->requestAPI($url, null, $options, 'PUT', $element);
case 'CloseChangeset':
$id = $options['id'];
$url='/api/0.6/changeset/'.$id.'/close';
return $this->requestAPI($url, null, $options, 'PUT');
case 'CreateElement':
$type = $options['type'];
$element = $options['element'];
......@@ -419,7 +394,7 @@ class Geocropping
$element = $xml->saveXML();
$url='/api/0.6/'.$type.'/create';
return $this->requestAPI($url, null, $options, 'PUT', $element);
case 'UpdateElement':
$before = $options['before'];
$after = $options['after'];
......
......@@ -54,7 +54,7 @@ switch ($_REQUEST['action']) {
case 'request_api':
// API
$data;
if ($useSession && !empty($_SESSION['access_token'])) {
if ($useSession /*&& !empty($_SESSION['access_token'])*/) {
// with session
$geocropping->oauthAccessToken = $_SESSION['access_token'];
$data = $geocropping->handleRequestAPI($_REQUEST['command'], $_REQUEST['options']); // 4
......@@ -63,12 +63,12 @@ switch ($_REQUEST['action']) {
$geocropping->oauthAccessToken->key = $_REQUEST['oauth_token'];
$geocropping->oauthAccessToken->secret = $geocropping->decrypteTokenValue($_REQUEST['access_secret']);
$data = $geocropping->handleRequestAPI($_REQUEST['command'], $_REQUEST['options']); // 4
} else {
}/* else {
//error
// Not connected
http_response_code(401);
die();
}
}*/
if ($_SESSION['devMode'] && $data['res']['headers']['response_code'] == 401) {
$data['res']['headers']['response_code'] = 400;
......@@ -81,8 +81,11 @@ switch ($_REQUEST['action']) {
header('Content-Type: '.$data['res']['headers']['Content-Type']);
if (strpos($data['res']['headers']['Content-Type'], 'application/json') !== false) {
die(json_encode($data['res']['body']));
} else {
} elseif (!empty($data['res']['body'])) {
die($data['res']['body']);
} else {
header('Content-Type: application/json');
die(json_encode($data));
}
} else {
// afficher tout en cas d'erreur
......@@ -106,4 +109,4 @@ switch ($_REQUEST['action']) {
break;
default:
http_response_code(400);
}
\ No newline at end of file
}
{"version":3,"file":"index.js","sourceRoot":"","sources":[".ts/index.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,2CAA2C;AAE3C;IACI,IAAI,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACpF,EAAE,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC;QAClB,cAAc,EAAE,CAAC;IACrB,IAAI;QACA,aAAa,EAAE,CAAC;AACxB,CAAC;AAED;IACI,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAChF,aAAa,EAAE,CAAC;IACpB,IAAI;QACA,YAAY,EAAE,CAAC;AACvB,CAAC;AAED;IACI,YAAY,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,sBAAsB,KAAc;IAChC,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,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WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,YAAY,CAAC,EAAE,CAAC,eAAe,EAAE;QAC7B,CAAC,CAAC,oBAAoB,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/B,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC;QAChC,CAAC,CAAC,gCAAgC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,YAAY,CAAC,EAAE,CAAC,oBAAoB,EAAE,UAAC,CAAC,EAAE,IAAI;QAC1C,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE7B,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;IACxD,WAAW,CAAC,eAAe,EAAE,CAAC;AAClC,CAAC,CAAC,CAAC","sourcesContent":["/// <reference path=\"typings/tsd.d.ts\" />\n/// <reference path=\"myTypings/tsd.d.ts\" />\n\nfunction toggleRightMenu() {\n var actualRight = $('body')[0].offsetWidth - $('.side-nav.fit-right')[0].offsetLeft;\n if (actualRight !== 0)\n closeRightMenu();\n else\n openRightMenu();\n}\n\nfunction toggleLeftMenu() {\n if ($('.side-nav.fit-left').position().left + $('.side-nav.fit-left').width() !== 0)\n closeLeftMenu();\n else\n openLeftMenu();\n}\n\nfunction closeLeftMenu() {\n openLeftMenu(0);\n}\nfunction openLeftMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-left').width());\n if (width === 0)\n $('.side-nav.fit-left').css('left', -$('.side-nav.fit-left').width());\n else {\n $('.side-nav.fit-left').width(width);\n $('.side-nav.fit-left').css('left', 0);\n }\n $('#mapArea').css('left', width);\n}\nfunction closeRightMenu() {\n openRightMenu(0);\n}\nfunction openRightMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-right').width());\n if (width === 0)\n $('.side-nav.fit-right').css('right', -$('.side-nav.fit-right').width());\n else {\n $('.side-nav.fit-right').width(width);\n $('.side-nav.fit-right').css('right', 0);\n }\n $('#mapArea').css('right', width);\n}\nlet geocropping = new Geocropping();\n$(document).ready(() => {\n\n let $geocropping = $(geocropping)\n geocropping._app_server_interpreter_list.forEach(element => {\n $('#urlInterpreter').append(`<option value=\"${element}\">${element}</option>`);\n });\n\n $geocropping.on('urlInterpreterUpdated', (e, index) => {\n $('#urlInterpreter').val(geocropping._app_server_interpreter_list[index]);\n });\n\n $('#userAction #login').click(() => {\n geocropping.connect();\n });\n $('#userAction #logout').click(() => {\n geocropping.userDisconnect();\n });\n\n $('#menu #clickPos').change(function (e) {\n let val = $(this).prop('checked');\n geocropping.setClickPosition(val);\n val ? geocropping.stopLocateUser() : geocropping.startLocateUser();\n }).prop(\"checked\", false);\n\n let devMode = localLoad('devMode');\n if (devMode) {\n geocropping._osm._devApi = devMode == \"true\";\n }\n $('#menu #devMode').change(function (e) {\n let val: boolean = $(this).prop('checked');\n geocropping.userDisconnect();\n geocropping._osm._devApi = val;\n localSave('devMode', '' + val);\n }).prop(\"checked\", geocropping._osm._devApi);\n\n $('#menu #urlInterpreter').change(function (e) {\n geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);\n });\n\n if (geocropping.isConnected) {\n $('#userAction #login').hide();\n $('#userAction #logout').show();\n $('.map-menu-item:has(#userImage)').show();\n } else {\n $('#userAction #logout').hide();\n $('#userAction #login').show();\n $('.map-menu-item:has(#userImage)').hide();\n };\n\n $geocropping.on('userDisconnected', (e) => {\n $('#userAction #logout').hide();\n $('#userAction #login').show();\n\n $('.map-menu-item:has(#userImage)').hide();\n $('#userInfo').hide();\n $('#userImage').attr('src', '');\n $('#userInfo #userName').text('');\n });\n\n $geocropping.on('userConnected', () => {\n $('#userAction #login').hide();\n $('#userAction #logout').show();\n $('.map-menu-item:has(#userImage)').show();\n });\n\n $geocropping.on('userDetailsUpdated', (e, data) => {\n $('#userImage').show();\n $('#userImage').attr('src', data.img);\n $('#userInfo #userName').text(data.display_name);\n });\n\n geocropping.createMap('map');\n\n // pour permettre le redimentionnement après la crétion de la carte leaflet\n document.getElementById('mapArea').style.width = \"auto\";\n geocropping.startLocateUser();\n});"]}
\ No newline at end of file
......@@ -40,12 +40,12 @@ if (empty($_SERVER['HTTPS'])) {
-->
<link rel="stylesheet" href="style.css" />
<script src="osmtogeojson.js"></script>
<script src="osmauth.js"></script>
<script src="fr.js"></script>
<script src="OauthOsm.js"></script>
<script src="Geocropping.js"></script>
<script src="index.js"></script>
<script src="js/osmtogeojson.js"></script>
<script src="js/leaflet.pattern.js"></script>
<script src="js/fr.js"></script>
<script src="js/OauthOsm.js"></script>
<script src="js/Geocropping.js"></script>
<script src="js/index.js"></script>
</head>
<body>
......
This diff is collapsed.
This diff is collapsed.
......@@ -85,7 +85,8 @@ var OauthOsm = (function () {
url: '/',
request: 'GetNoteId',
params: {
id: 1
id: 1,
format: ''
}
},
GetNotesBoundsBox: {
......@@ -96,7 +97,8 @@ var OauthOsm = (function () {
left: 0,
bottom: 0,
right: 10,
top: 10
top: 10,
format: ''
}
},
SearchNotes: {
......@@ -106,8 +108,9 @@ var OauthOsm = (function () {
params: {
query: 'hello',
limit: 100,
closed: 7 // Specifies the number of days a bug needs to be closed to no longer be returned
closed: 7,
// A value of 0 means only open bugs are returned. A value of -1 means all bugs are returned.
format: ''
}
},
GetChangesetId: {
......@@ -347,7 +350,11 @@ var OauthOsm = (function () {
type: apiRequest.method,
data: data
}).done(function (data) {
_this._connected = true;
//console.trace('myGeocropping', 'request ok connected:', this._connected);
if (_this._connected == false) {
_this._connected = true;
_this.connect();
}
deferred.resolveWith(_this, [data]);
}).fail(function (jqXHR, textStatus, errorThrown) {
if (jqXHR.status === 401) {
......@@ -387,6 +394,7 @@ var OauthOsm = (function () {
* @return {JQueryPromise} Pour gérer les callbacks
*/
OauthOsm.prototype.connect = function () {
//console.trace('myGeocropping', 'osm connect ', this.isConnected);
var _this = this;
var deferred = $.Deferred();
if (this.isConnected) {
......@@ -408,7 +416,7 @@ var OauthOsm = (function () {
};
let error = (...args) => {
console.log(args);
//console.trace('myGeocropping',args);
deferred.rejectWith(this, args);
};
......@@ -456,6 +464,7 @@ var OauthOsm = (function () {
},
success: function (data) {
deferred.resolveWith(_this);
_this._connected = false;
$(_this).trigger("disconnected");
},
error: function (err) {
......
This diff is collapsed.
......@@ -73,35 +73,40 @@ $(document).ready(function () {
$('#menu #urlInterpreter').change(function (e) {
geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);
});
if (geocropping.isConnected) {
var userConnected = function () {
//console.trace('myGeocropping', 'connected');
$('#userAction #login').hide();
$('#userAction #logout').show();
$('.map-menu-item:has(#userImage)').show();
}
else {
$('#userAction #logout').hide();
$('#userAction #login').show();
$('.map-menu-item:has(#userImage)').hide();
}
;
$geocropping.on('userDisconnected', function (e) {
};
var userDisconnected = function () {
//console.trace('myGeocropping', 'disconnected');
$('#userAction #logout').hide();
$('#userAction #login').show();
$('.map-menu-item:has(#userImage)').hide();
$('#userInfo').hide();
$('#userImage').attr('src', '');
$('#userInfo #userName').text('');
});
$geocropping.on('userConnected', function () {
$('#userAction #login').hide();
$('#userAction #logout').show();
$('.map-menu-item:has(#userImage)').show();
});
$geocropping.on('userDetailsUpdated', function (e, data) {
};
$geocropping.on('userDisconnected', userDisconnected);
$geocropping.on('userConnected', userConnected);
var updateUserDetails = function (e, data) {
//console.trace('myGeocropping', 'updateUserDetails', e);
$('#userImage').show();
$('#userImage').attr('src', data.img);
$('#userInfo #userName').text(data.display_name);
});
};
$geocropping.on('userDetailsUpdated', updateUserDetails);
//console.trace('myGeocropping', geocropping.isConnected);
if (geocropping.isConnected) {
//console.trace('myGeocropping', 'test ok', geocropping.getUserDetails());
userConnected();
//updateUserDetails(null, geocropping.getUserDetails());
}
else {
userDisconnected();
}
;
geocropping.createMap('map');
// pour permettre le redimentionnement après la crétion de la carte leaflet
document.getElementById('mapArea').style.width = "auto";
......
{"version":3,"file":"index.js","sourceRoot":"","sources":["../.ts/index.ts"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,2CAA2C;AAE3C;IACI,IAAI,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IACpF,EAAE,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC;QAClB,cAAc,EAAE,CAAC;IACrB,IAAI;QACA,aAAa,EAAE,CAAC;AACxB,CAAC;AAED;IACI,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAChF,aAAa,EAAE,CAAC;IACpB,IAAI;QACA,YAAY,EAAE,CAAC;AACvB,CAAC;AAED;IACI,YAAY,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,sBAAsB,KAAc;IAChC,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IACnE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;QACZ,CAAC,CAA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EAAE,IAAI;QAC5B,yDAAyD;QAEzD,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC,CAAA;IACD,YAAY,CAAC,EAAE,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;IAEzD,0DAA0D;IAE1D,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1B,0EAA0E;QAE1E,aAAa,EAAE,CAAC;QAChB,wDAAwD;IAC5D,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,gBAAgB,EAAE,CAAC;IACvB,CAAC;IAAA,CAAC;IAEF,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE7B,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;IACxD,WAAW,CAAC,eAAe,EAAE,CAAC;AAClC,CAAC,CAAC,CAAC","sourcesContent":["/// <reference path=\"typings/tsd.d.ts\" />\n/// <reference path=\"myTypings/tsd.d.ts\" />\n\nfunction toggleRightMenu() {\n let actualRight = $('body')[0].offsetWidth - $('.side-nav.fit-right')[0].offsetLeft;\n if (actualRight !== 0)\n closeRightMenu();\n else\n openRightMenu();\n}\n\nfunction toggleLeftMenu() {\n if ($('.side-nav.fit-left').position().left + $('.side-nav.fit-left').width() !== 0)\n closeLeftMenu();\n else\n openLeftMenu();\n}\n\nfunction closeLeftMenu() {\n openLeftMenu(0);\n}\nfunction openLeftMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-left').width());\n if (width === 0)\n $('.side-nav.fit-left').css('left', -$('.side-nav.fit-left').width());\n else {\n $('.side-nav.fit-left').width(width);\n $('.side-nav.fit-left').css('left', 0);\n }\n $('#mapArea').css('left', width);\n}\nfunction closeRightMenu() {\n openRightMenu(0);\n}\nfunction openRightMenu(width?: number) {\n (width === undefined) && (width = $('.side-nav.fit-right').width());\n if (width === 0)\n $('.side-nav.fit-right').css('right', -$('.side-nav.fit-right').width());\n else {\n $('.side-nav.fit-right').width(width);\n $('.side-nav.fit-right').css('right', 0);\n }\n $('#mapArea').css('right', width);\n}\nlet geocropping = new Geocropping();\n$(document).ready(() => {\n\n let $geocropping = $(geocropping)\n geocropping._app_server_interpreter_list.forEach(element => {\n $('#urlInterpreter').append(`<option value=\"${element}\">${element}</option>`);\n });\n\n $geocropping.on('urlInterpreterUpdated', (e, index) => {\n $('#urlInterpreter').val(geocropping._app_server_interpreter_list[index]);\n });\n\n $('#userAction #login').click(() => {\n geocropping.connect();\n });\n $('#userAction #logout').click(() => {\n geocropping.userDisconnect();\n });\n\n $('#menu #clickPos').change(function (e) {\n let val = $(this).prop('checked');\n geocropping.setClickPosition(val);\n val ? geocropping.stopLocateUser() : geocropping.startLocateUser();\n }).prop(\"checked\", false);\n\n let devMode = localLoad('devMode');\n if (devMode) {\n geocropping._osm._devApi = devMode == \"true\";\n }\n $('#menu #devMode').change(function (e) {\n let val: boolean = $(this).prop('checked');\n geocropping.userDisconnect();\n geocropping._osm._devApi = val;\n localSave('devMode', '' + val);\n }).prop(\"checked\", geocropping._osm._devApi);\n\n $('#menu #urlInterpreter').change(function (e) {\n geocropping._app_server_interpreter_index = geocropping._app_server_interpreter_list.indexOf(this.value);\n });\n\n let userConnected = () => {\n //console.trace('myGeocropping', 'connected');\n $('#userAction #login').hide();\n $('#userAction #logout').show();\n $('.map-menu-item:has(#userImage)').show();\n }\n let userDisconnected = () => {\n //console.trace('myGeocropping', 'disconnected');\n\n $('#userAction #logout').hide();\n $('#userAction #login').show();\n\n $('.map-menu-item:has(#userImage)').hide();\n $('#userInfo').hide();\n $('#userImage').attr('src', '');\n $('#userInfo #userName').text('');\n }\n\n $geocropping.on('userDisconnected', userDisconnected);\n\n $geocropping.on('userConnected', userConnected);\n\n let updateUserDetails = (e, data) => {\n //console.trace('myGeocropping', 'updateUserDetails', e);\n\n $('#userImage').show();\n $('#userImage').attr('src', data.img);\n $('#userInfo #userName').text(data.display_name);\n }\n $geocropping.on('userDetailsUpdated', updateUserDetails);\n\n //console.trace('myGeocropping', geocropping.isConnected);\n\n if (geocropping.isConnected) {\n //console.trace('myGeocropping', 'test ok', geocropping.getUserDetails());\n\n userConnected();\n //updateUserDetails(null, geocropping.getUserDetails());\n } else {\n userDisconnected();\n };\n\n geocropping.createMap('map');\n\n // pour permettre le redimentionnement après la crétion de la carte leaflet\n document.getElementById('mapArea').style.width = \"auto\";\n geocropping.startLocateUser();\n});"]}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment