diff --git a/application/controllers/Qrbcalc.php b/application/controllers/Qrbcalc.php new file mode 100644 index 00000000..99668860 --- /dev/null +++ b/application/controllers/Qrbcalc.php @@ -0,0 +1,25 @@ +load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + } + + public function index() + { + $data['page_title'] = "QRB Calculaltor"; + $this->load->view('qrbcalc/index', $data); + } +} diff --git a/application/models/Qrbcalc_model b/application/models/Qrbcalc_model new file mode 100644 index 00000000..ade46a6d --- /dev/null +++ b/application/models/Qrbcalc_model @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index c4a35e26..439dbefa 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -421,8 +421,36 @@ document.onkeyup = function(e) { if (e.altKey && e.which == 76) { spawnLookupModal(); } + if (e.altKey && e.which == 81) { + spawnQrbCalculator(); + } }; +function spawnQrbCalculator() { + $.ajax({ + url: base_url + 'index.php/qrbcalc', + type: 'post', + success: function (html) { + BootstrapDialog.show({ + title: 'Compute QRB and QTF', + size: BootstrapDialog.SIZE_WIDE, + cssClass: 'lookup-dialog', + nl2br: false, + message: html, + onshown: function(dialog) { + + }, + buttons: [{ + label: 'Close', + action: function (dialogItself) { + dialogItself.close(); + } + }] + }); + } + }); +} + // This displays the dialog with the form and it's where the resulttable is displayed function spawnLookupModal() { $.ajax({ diff --git a/application/views/qrbcalc/index.php b/application/views/qrbcalc/index.php new file mode 100644 index 00000000..24f83d76 --- /dev/null +++ b/application/views/qrbcalc/index.php @@ -0,0 +1,25 @@ +
\ No newline at end of file