diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js (renamed from bitbake/lib/toaster/toastergui/static/js/newcustomimage.js) | 5 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/newcustomimage.html | 44 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html | 33 |
3 files changed, 37 insertions, 45 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/newcustomimage.js b/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 @@ | |||
1 | "use strict"; | 1 | "use strict"; |
2 | 2 | ||
3 | function newCustomImagePageInit(ctx){ | 3 | /* Used for the newcustomimage_modal actions */ |
4 | function newCustomImageModalInit(ctx){ | ||
4 | 5 | ||
5 | var newCustomImgBtn = $("#create-new-custom-image-btn"); | 6 | var newCustomImgBtn = $("#create-new-custom-image-btn"); |
6 | var imgCustomModal = $("#new-custom-image-modal"); | 7 | var imgCustomModal = $("#new-custom-image-modal"); |
@@ -44,6 +45,4 @@ function newCustomImagePageInit(ctx){ | |||
44 | } | 45 | } |
45 | }); | 46 | }); |
46 | } | 47 | } |
47 | |||
48 | |||
49 | } | 48 | } |
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 @@ | |||
4 | {% load static %} | 4 | {% load static %} |
5 | {% block pagecontent %} | 5 | {% block pagecontent %} |
6 | 6 | ||
7 | <script src="{% static 'js/newcustomimage.js' %}"></script> | 7 | {% include "newcustomimage_modal.html" %} |
8 | <script> | ||
9 | $(document).ready(function (){ | ||
10 | var ctx = { | ||
11 | xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}", | ||
12 | }; | ||
13 | |||
14 | try { | ||
15 | newCustomImagePageInit(ctx); | ||
16 | } catch (e) { | ||
17 | document.write("Sorry, An error has occurred loading this page"); | ||
18 | console.warn(e); | ||
19 | } | ||
20 | }); | ||
21 | </script> | ||
22 | |||
23 | </script> | ||
24 | <div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false"> | ||
25 | <div class="modal-header"> | ||
26 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
27 | <h3>Name your custom image</h3> | ||
28 | </div> | ||
29 | <div class="modal-body"> | ||
30 | <div class="row-fluid"> | ||
31 | <span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p> | ||
32 | </span></div> | ||
33 | <div class="control-group controls"> | ||
34 | <input type="text" class="huge span5" placeholder="Type the name, something like 'core-image-myimage'"> | ||
35 | <span class="help-block" style="display:none">Image names cannot contain spaces or capital letters. The only allowed special character is dash (-)</span> | ||
36 | <span class="help-block" style="display: none">An image with this name already exists. Image names must be unique: try a different one.</span> | ||
37 | </div> | ||
38 | </div> | ||
39 | <div class="modal-footer"> | ||
40 | <a href="#" id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="">Create custom image</a> | ||
41 | </div> | ||
42 | </div> | ||
43 | |||
44 | {% include "projecttopbar.html" %} | 8 | {% include "projecttopbar.html" %} |
45 | 9 | ||
46 | |||
47 | {% url table_name project.id as xhr_table_url %} | 10 | {% url table_name project.id as xhr_table_url %} |
11 | <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>)</h2> | ||
48 | {% include "toastertable.html" %} | 12 | {% include "toastertable.html" %} |
49 | 13 | ||
50 | |||
51 | |||
52 | {% endblock %} | 14 | {% endblock %} |
53 | |||
54 | |||
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 @@ | |||
1 | {% load static %} | ||
2 | |||
3 | <script src="{% static 'js/newcustomimage_modal.js' %}"></script> | ||
4 | <script> | ||
5 | $(document).ready(function (){ | ||
6 | try { | ||
7 | newCustomImageModalInit(); | ||
8 | } catch (e) { | ||
9 | document.write("Sorry, An error has occurred loading this page"); | ||
10 | console.warn(e); | ||
11 | } | ||
12 | }); | ||
13 | </script> | ||
14 | |||
15 | <div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false"> | ||
16 | <div class="modal-header"> | ||
17 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
18 | <h3>Name your custom image</h3> | ||
19 | </div> | ||
20 | <div class="modal-body"> | ||
21 | <div class="row-fluid"> | ||
22 | <span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p> | ||
23 | </span></div> | ||
24 | <div class="control-group controls"> | ||
25 | <input type="text" class="huge span5" placeholder="Type the name, something like 'core-image-myimage'"> | ||
26 | <span class="help-block" style="display:none">Image names cannot contain spaces or capital letters. The only allowed special character is dash (-)</span> | ||
27 | <span class="help-block" style="display: none">An image with this name already exists. Image names must be unique: try a different one.</span> | ||
28 | </div> | ||
29 | </div> | ||
30 | <div class="modal-footer"> | ||
31 | <a href="#" id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="">Create custom image</a> | ||
32 | </div> | ||
33 | </div> | ||