Move go function to taghistory-namespace within app.tag

This commit is contained in:
Lennart Blom
2018-12-02 18:56:34 +01:00
parent b94a65d79b
commit 246369fdec
2 changed files with 6 additions and 7 deletions

View File

@@ -85,6 +85,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
route('');
}
};
registryUI.taghistory.go = function(image, tag) {
route('/taghistory/image/' + image + '/tag/' + tag);
};
registryUI.snackbar = function(message, isError) {
registryUI.appTag.tags['material-snackbar'].addToast({'message': message, 'isError': isError}, 15000);
};

View File

@@ -16,14 +16,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<tag-history-button>
<a href="#" title="This will show the history of given tag"
onclick="go('{ opts.image.name }', '{ opts.image.tag }');">
onclick="registryUI.taghistory.go('{ opts.image.name }', '{ opts.image.tag }');">
<i class="material-icons">history</i>
</a>
<script type="text/javascript">
go = function(image, tag) {
route('/taghistory/image/' + image + '/tag/' + tag);
};
</script>
</tag-history-button>