Commit 4e615da4 authored by Jonathon Duerig's avatar Jonathon Duerig

Add support for dynamic image sets to be added to the Jacks editor.

Expand information collected about dynamic images to include deprecation and node type support.
parent 5ea8a650
......@@ -140,15 +140,18 @@ function ImagesWhere($where, $dblink)
{
$result = array();
$query_result = DBQueryFatal(
"select i.urn, v.description, v.version from ".
"select i.urn, v.description, v.version, v.deprecated is not NULL, v.deprecated_message, v.types_known_working from ".
"image_versions as v left join images as i on ".
"v.urn=i.urn ".$where,
"v.urn=i.urn ".$where." and (deprecated is NULL or deprecated_iserror=0)",
$dblink);
while ($row = mysql_fetch_array($query_result)) {
array_push($result, array(
'urn' => $row[0],
'description' => $row[1],
'version' => $row[2]));
'version' => $row[2],
'deprecated' => $row[3],
'deprecated_messsage' => $row[4],
'types' => $row[5]));
}
return $result;
}
......
......@@ -110,6 +110,11 @@ $(function () {
{
$('#edit_topo_modal_button').prop('disabled', false);
context = data;
var callback = function(json) {
if (json.code == 0)
{
context.canvasOptions.dynamicImages = json.value[0];
}
if ($('#amlist-json').length > 0)
{
var amlist = JSON.parse(_.unescape($('#amlist-json')[0].textContent));
......@@ -124,6 +129,9 @@ $(function () {
_.each(waitingInstances, function (f) {
f();
});
};
var xmlthing = sup.CallServerMethod(null, "instantiate", "GetImageList");
xmlthing.done(callback);
}
function contextFail(fail1, fail2)
......
......@@ -823,7 +823,6 @@ $(function () {
dom.find('button#image-select').click(function (event) {
var callback = function(json) {
$('#waitwait-modal').modal('hide');
console.log('imagepicker', json);
if (json.code == 0) {
sup.ShowModal('#imagepicker-modal');
......
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