From 5f52614a878269fe7837b7198e653377b25b91d8 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Wed, 4 Nov 2015 15:44:00 +0000 Subject: [PATCH] bitbake: toaster: newcustomimage Move modal dialog out of newcustomimage template Move the modal template and JS out of the newcustomimage page so that it can also be used by the image details page. (Bitbake rev: c310bc6bab1a33124906dd57b3c63462a773ff25) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- ...customimage.js => newcustomimage_modal.js} | 5 +-- .../toastergui/templates/newcustomimage.html | 44 +------------------ .../templates/newcustomimage_modal.html | 33 ++++++++++++++ 3 files changed, 37 insertions(+), 45 deletions(-) rename bitbake/lib/toaster/toastergui/static/js/{newcustomimage.js => newcustomimage_modal.js} (92%) create mode 100644 bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html diff --git a/bitbake/lib/toaster/toastergui/static/js/newcustomimage.js b/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js similarity index 92% rename from bitbake/lib/toaster/toastergui/static/js/newcustomimage.js rename to bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js index 935b21ede8..71a28f7b2a 100644 --- a/bitbake/lib/toaster/toastergui/static/js/newcustomimage.js +++ b/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js @@ -1,6 +1,7 @@ "use strict"; -function newCustomImagePageInit(ctx){ +/* Used for the newcustomimage_modal actions */ +function newCustomImageModalInit(ctx){ var newCustomImgBtn = $("#create-new-custom-image-btn"); var imgCustomModal = $("#new-custom-image-modal"); @@ -44,6 +45,4 @@ function newCustomImagePageInit(ctx){ } }); } - - } diff --git a/bitbake/lib/toaster/toastergui/templates/newcustomimage.html b/bitbake/lib/toaster/toastergui/templates/newcustomimage.html index 4487b3ea08..46aed901f1 100644 --- a/bitbake/lib/toaster/toastergui/templates/newcustomimage.html +++ b/bitbake/lib/toaster/toastergui/templates/newcustomimage.html @@ -4,51 +4,11 @@ {% load static %} {% block pagecontent %} - - - - - - +{% include "newcustomimage_modal.html" %} {% include "projecttopbar.html" %} - {% url table_name project.id as xhr_table_url %} +

{{title}} (0)

{% include "toastertable.html" %} - - {% endblock %} - - diff --git a/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html b/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html new file mode 100644 index 0000000000..93cf9d7e02 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html @@ -0,0 +1,33 @@ +{% load static %} + + + + +