diff --git a/amd/src/config.js b/amd/src/config.js index 313ebea..e550c66 100644 --- a/amd/src/config.js +++ b/amd/src/config.js @@ -16,9 +16,9 @@ define(['jquery', 'js/jquery.dataTables.min.js', 'js/jquery-ui.min.js'] , functi dataSrc:"" }, columns: [ - { data: "id" }, - { data: "title" }, - { data: "description" } + { data: "id_conversa" }, + { data: "titulo" }, + { data: "cpf" } ], //select: true }); diff --git a/index.php b/index.php index 009d3a6..1f01a3b 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ set_pagelayout('standard'); $PAGE->set_url('/blocks/fale_conosco/index.php'); +$PAGE->requires->css(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css')); $PAGE->requires->css(new moodle_url('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css')); $PAGE->requires->css(new moodle_url('https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css')); -$PAGE->requires->css(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css')); - -//$PAGE->requires->js('/blocks/fale_conosco/datatable.js', true); -/* -$PAGE->requires->js(new moodle_url('https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'),true); -$PAGE->requires->js(new moodle_url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'),true); -*/ $PAGE->set_context($context); - // Get data $strtitle = get_string('fale_conosco', 'block_fale_conosco'); $user = $USER; @@ -63,7 +54,6 @@ echo $OUTPUT->header(); echo $OUTPUT->box_start('generalbox boxaligncenter'); echo $OUTPUT->heading(get_string('fale_conosco', 'block_fale_conosco')); - //Instantiate simplehtml_form $mform = new searchform(); @@ -159,7 +149,7 @@ if ($mform->is_cancelled()) { requires->js_call_amd('block_fale_conosco/config', 'init'); + $PAGE->requires->js_call_amd('block_fale_conosco/config', 'init'); //$PAGE->requires->js_call_amd('block_fale_conosco/config', 'getTableContacts'); ?> diff --git a/proxy.php b/proxy.php index ab46dfd..54df8b3 100644 --- a/proxy.php +++ b/proxy.php @@ -28,12 +28,12 @@ if(isset($_GET["contactID"])) { ->send(); } else { - $uri = 'https://escolamodelows.interlegis.leg.br/api/v1/fale_conosco'; + $uri = 'https://escolamodelows.interlegis.leg.br/api/v1/fale_conosco/conversa'; $response = \Httpful\Request::post($uri) ->sendsJson() ->body( '{ - "school_initial": "SSL", + "school_initials": "SSL", "page" : "1", "limit": "10" }'