Merge "Fixing image tags after form validation error"

This commit is contained in:
Jenkins 2014-03-04 14:10:26 +00:00 committed by Gerrit Code Review
commit 77bd587b0e
2 changed files with 15 additions and 8 deletions

View File

@ -63,13 +63,7 @@
{% endfor %}
console.log(plugin_tags_map);
</script>
<div id="image_tags_list" class="well">
{% for tag in image.tags %}
<span class="label label-info" style="float: left;display: block; margin: 2px;">{{ tag }} <i
class="icon-remove-sign"
onclick="remove_tag(this);"></i></span>
{% endfor %}
</div>
<div id="image_tags_list" class="well"></div>
<div style="clear: both;"></div>
<div id="plugin_populate_section">
<h5>Register tags required for the Plugin with specified Hadoop Version</h5>
@ -124,4 +118,4 @@
});
})
})
</script>
</script>

View File

@ -12,4 +12,17 @@
{{ image_registry_table.render }}
</div>
<script type="text/javascript">
addHorizonLoadEvent(function () {
horizon.modals.addModalInitFunction(function (modal) {
var tags = JSON.parse($("#id_tags_list").val());
$.each(tags, function(i, tag) {
var tagspan = '<span class="label label-info" style="float: left;display: block; margin: 2px;">' +
tag +
'<i class="icon-remove-sign" onclick="remove_tag(this);"></i></span>';
$("#image_tags_list").append(tagspan);
});
});
});
</script>
{% endblock %}