From 0bad725381d0e09017a840d27bc1601edcd84a13 Mon Sep 17 00:00:00 2001 From: Belen Barros Pena Date: Wed, 19 Feb 2014 21:08:15 +0000 Subject: bitbake: toaster: Move long content toggle to main.js I have move all javascript needed for toggling very long values for bitbake variables to main.js. I have changed the names of the classes involved to make them more generic, since I hope we'll be able to reuse them in other parts of the Toaster interface. .full-variable is now .full .full-variable-hide is now full-hide .full-variable-show is now full-show I have also removed all the inline scripting in base.html, since it is no longer needed. (Bitbake rev: 73828f047385ced160c7900cad24535aa8d325cd) Signed-off-by: Belen Barros Pena Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/main.js | 15 +++++++ bitbake/lib/toaster/toastergui/templates/base.html | 52 ---------------------- .../toaster/toastergui/templates/configvars.html | 6 +-- 3 files changed, 18 insertions(+), 55 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/main.js b/bitbake/lib/toaster/toastergui/static/js/main.js index ce4f578112..c80f716edb 100644 --- a/bitbake/lib/toaster/toastergui/static/js/main.js +++ b/bitbake/lib/toaster/toastergui/static/js/main.js @@ -75,4 +75,19 @@ $(document).ready(function() { }); }); + // toggle for long content (variables, python stack trace, etc) + $('.full, .full-hide').hide(); + $('.full-show').click(function(){ + $('.full').slideDown(function(){ + $('.full-hide').show(); + }); + $(this).hide(); + }); + $('.full-hide').click(function(){ + $(this).hide(); + $('.full').slideUp(function(){ + $('.full-show').show(); + }); + }); + }); diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 96f093f627..16a1812789 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html @@ -49,58 +49,6 @@ function reload_params(params) { } - - diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html b/bitbake/lib/toaster/toastergui/templates/configvars.html index cd41cca7e5..ecd5a0f3d8 100644 --- a/bitbake/lib/toaster/toastergui/templates/configvars.html +++ b/bitbake/lib/toaster/toastergui/templates/configvars.html @@ -73,12 +73,12 @@

{{variable.variable_name}} value is:

{{variable.variable_value|string_slice:':570'}} - {{variable.variable_value|string_slice:'570:'}} + {{variable.variable_value|string_slice:'570:'}} - ... + ...

- Collapse variable value + Collapse variable value {% endif %} {% else %} -- cgit v1.2.3-54-g00ecf