New maps in progress... (map editor dialog version 1.0)
This commit is contained in:
parent
a1de142e98
commit
95b13bf3aa
|
@ -26,6 +26,7 @@ if (is_ajax ()) {
|
|||
$getNodeData = (bool)get_parameter('getNodeData', 0);
|
||||
$getNodeDetails = (bool)get_parameter('getNodeDetails', 0);
|
||||
$printEditNodeTable = (bool)get_parameter('printEditNodeTable', 0);
|
||||
$printEditMapTable = (bool)get_parameter('printEditMapTable', 0);
|
||||
|
||||
if ($getNodeData) {
|
||||
$id_node_data = (int)get_parameter('id_node_data');
|
||||
|
@ -301,6 +302,35 @@ if (is_ajax ()) {
|
|||
<?php
|
||||
return;
|
||||
}
|
||||
else if ($printEditMapTable) {
|
||||
?>
|
||||
<div title="<?php echo __('Edit map');?>">
|
||||
<div style="text-align: center; width: 100%;">
|
||||
<?php
|
||||
$table = new stdClass();
|
||||
$table->id = 'map_options';
|
||||
$table->width = "100%";
|
||||
|
||||
$table->head = array();
|
||||
$table->head['name'] = __('Nombre del mapa');
|
||||
$table->head['type'] = __('Tipo del mapa');
|
||||
|
||||
$table->data = array();
|
||||
$table->data[0][0] = __('Capo1');
|
||||
$table->data[0][1] = __('Capo2');
|
||||
$table->data[1][0] = __('Capo1');
|
||||
$table->data[1][1] = __('Capo2');
|
||||
$table->data[2][0] = __('Capo1');
|
||||
$table->data[2][1] = __('Capo2');
|
||||
|
||||
ui_toggle(html_print_table($table, true), __('Map options'),
|
||||
__('Map options'), true);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -435,10 +435,6 @@ MapController.prototype.paint_resize_square = function(item, wait) {
|
|||
transform_viewport.translate[1]
|
||||
) * transform_viewport.scale[1];
|
||||
|
||||
console.log("transform_viewport", transform_viewport);
|
||||
console.log("bbox_item", bbox_item);
|
||||
console.log("bbox_square", bbox_square);
|
||||
|
||||
x = (bbox_item.x +
|
||||
transform_item.translate[0]) * transform_viewport.scale[0] +
|
||||
transform_viewport.translate[0];
|
||||
|
@ -528,7 +524,7 @@ MapController.prototype.init_events = function(principalObject) {
|
|||
{
|
||||
title: 'Edit map',
|
||||
action: function(elm, d, i) {
|
||||
console.log('Edit map!!');
|
||||
self.editMap(self, elm);
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -665,6 +661,33 @@ MapController.prototype.tooltip_map_create = function(self, target) {
|
|||
nodeTarget.tooltipster("show");
|
||||
}
|
||||
|
||||
/**
|
||||
* Function editMap
|
||||
* Return void
|
||||
* This function prints the map edition table
|
||||
*/
|
||||
MapController.prototype.editMap = function(self, target) {
|
||||
var id_map = self._id;
|
||||
|
||||
var params = {};
|
||||
params["printEditMapTable"] = 1;
|
||||
params["id_map"] = id_map;
|
||||
params["page"] = "include/ajax/map.ajax";
|
||||
|
||||
jQuery.ajax ({
|
||||
data: params,
|
||||
dataType: "html",
|
||||
type: "POST",
|
||||
url: "ajax.php",
|
||||
success: function (data) {
|
||||
$(target).append("<div id='edit_map_dialog' style='display: none;'></div>");
|
||||
$("#edit_map_dialog").append(data);
|
||||
$("#edit_map_dialog").dialog({ autoOpen: false });
|
||||
$("#edit_map_dialog").dialog("open");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function openNodeDetais
|
||||
* Return void
|
||||
|
@ -712,7 +735,7 @@ MapController.prototype.nodeGetDetails = function(data_id, type, id_map, data_gr
|
|||
/**
|
||||
* Function editNode
|
||||
* Return void
|
||||
* This function prints the node table
|
||||
* This function prints the node edition table
|
||||
*/
|
||||
MapController.prototype.editNode = function(self, target) {
|
||||
var nodeTarget = $(target);
|
||||
|
@ -744,7 +767,6 @@ MapController.prototype.editNode = function(self, target) {
|
|||
$("#edit_node_dialog").dialog("open");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue