saveMaps(data);
getMapById();
$.each(data, function (i, item) {
+ var caption;
+ var label;
if ((item.editable == false)) {
- var caption = 'View';
- var label = '<span class="label label-default">Read</span>';
+ caption = 'View';
+ label = '<span class="label label-default">Read</span>';
}
else {
- var caption = 'Edit';
- var label = '<span class="label label-default">Read</span> <span class="label label-success">Write</span>';
+ caption = 'Edit';
+ label = '<span class="label label-default">Read</span> <span class="label label-success">Write</span>';
}
items.push('<tr>' +
'<td class="col-md-2 maps-cell">' + label + '</td>' +
'data-source="#' + item.map + '" ' +
'data-editable="' + item.editable + '" ' +
'data-target="#modalDialog" ' +
- 'data-title="' + item.description +
- '" data-toggle="modal">' + item.description + '</span>' +
+ 'data-title="' + item.uri +
+ '" data-toggle="modal">' + item.uri + '</span>' +
+ '</td>' +
+ '<td>' +
+ item.description +
'</td>' +
'</tr>');
});
obj = ucl_object_typed_new (UCL_OBJECT);
ucl_object_insert_key (obj, ucl_object_fromint (map->id),
- "map", 0, false);
+ "map", 0, false);
if (map->description) {
ucl_object_insert_key (obj, ucl_object_fromstring (map->description),
"description", 0, false);
}
+ ucl_object_insert_key (obj, ucl_object_fromstring (map->uri),
+ "uri", 0, false);
ucl_object_insert_key (obj, ucl_object_frombool (editable),
- "editable", 0, false);
+ "editable", 0, false);
ucl_array_append (top, obj);
cur = g_list_next (cur);