summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/base.html
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2014-11-11 16:23:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-21 11:49:23 +0000
commitfa9206e42710772b8aac918b7aba01e126e993ce (patch)
tree28b0fdae74e59d5e692d53c122a115a1dfb50226 /bitbake/lib/toaster/toastergui/templates/base.html
parent0b6859cdf3a4b66bb8b94361681a5b6b362f93ae (diff)
downloadpoky-fa9206e42710772b8aac918b7aba01e126e993ce.tar.gz
bitbake: toaster: Create libtoaster.js with some utility functions
Replace main.js with libtoaster. This can be a place for common functionality for toaster. Calling it lib... makes it more obvious as well as helps with code readability due to the namespacing. (Bitbake rev: cdf6178ae3675b40afca9f08d491ca1b7e45914e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/base.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html29
1 files changed, 2 insertions, 27 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index f377081849..1b9edfd7b7 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -18,36 +18,11 @@
18</script> 18</script>
19<script src="{% static 'js/prettify.js' %}"> 19<script src="{% static 'js/prettify.js' %}">
20</script> 20</script>
21<script src="{% static 'js/main.js' %}"> 21<script src="{% static 'js/libtoaster.js' %}">
22</script>
22</script> 23</script>
23<script> 24<script>
24function reload_params(params) {
25 uri = window.location.href;
26 splitlist = uri.split("?");
27 url = splitlist[0], parameters=splitlist[1];
28 // deserialize the call parameters
29 if(parameters){
30 cparams = parameters.split("&");
31 }else{
32 cparams = []
33 }
34 nparams = {}
35 for (i = 0; i < cparams.length; i++) {
36 temp = cparams[i].split("=");
37 nparams[temp[0]] = temp[1];
38 }
39 // update parameter values
40 for (i in params) {
41 nparams[encodeURIComponent(i)] = encodeURIComponent(params[i]);
42 }
43 // serialize the structure
44 callparams = []
45 for (i in nparams) {
46 callparams.push(i+"="+nparams[i]);
47 }
48 window.location.href = url+"?"+callparams.join('&');
49 25
50}
51</script> 26</script>
52 27
53{% block extraheadcontent %} 28{% block extraheadcontent %}