From bf47096ec1b13ec033205d25eeb7fe42a4886723 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 9 Jul 2019 20:42:02 +1000 Subject: [PATCH] modal box changing title and content is done --- js/bts_timesheet.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/js/bts_timesheet.js b/js/bts_timesheet.js index 2c7ea70..f15c28e 100644 --- a/js/bts_timesheet.js +++ b/js/bts_timesheet.js @@ -371,9 +371,43 @@ console.log("response for save %o", response); self.load_data(response.newdata); }); - } + } }//end of class Job + //global GUI summary + function get_wages() + { + var txt = $('div.wages div').html(); + return parseInt(txt); + } + function set_wages(num){ + $('div.wages div').html(num); + } + + function set_working_hours(num){ + $('input#woh').attr('value', num); + } + + function get_working_hours(){ + var txt = $('input#woh').attr('value'); + return parseFloat(txt); + } + + + //modal box + function set_modal_title(selector, title){ + var s = 'div.'+ selector +' .ult_modal-title'; + $(s).html(title); + } + + function set_modal_content(selector, content){ + var s = 'div.'+ selector +' div.ult_modal-body.ult-html'; + $(s).html(content); + } + + set_modal_title('abcdefg', 'suck title'); + set_modal_content('abcdefg', 'fucking details'); + /*________________________________________________________________________*/ }); })(jQuery);