Browse Source

Add simple message

pull/440/head
danpros 4 years ago
parent
commit
719a5e1fc8
2 changed files with 7 additions and 2 deletions
  1. +4
    -2
      system/admin/views/menu.html.php
  2. +3
    -0
      system/htmly.php

+ 4
- 2
system/admin/views/menu.html.php View File

@ -103,8 +103,10 @@ function parseMenu($menu) {
type: 'POST', type: 'POST',
url: '<?php echo site_url();?>admin/menu', url: '<?php echo site_url();?>admin/menu',
dataType: 'json', dataType: 'json',
data: {'json': js}
data: {'json': js},
success: function (response) {
alert(response.message);
},
}); });
}); });
</script> </script>


+ 3
- 0
system/htmly.php View File

@ -1766,6 +1766,9 @@ post('/admin/menu', function () {
if (login()) { if (login()) {
$json = from($_REQUEST, 'json'); $json = from($_REQUEST, 'json');
file_put_contents('content/data/menu.json', json_encode($json, JSON_UNESCAPED_UNICODE)); file_put_contents('content/data/menu.json', json_encode($json, JSON_UNESCAPED_UNICODE));
echo json_encode(array(
'message' => 'Menu saved successfully!',
));
} }
}); });


Loading…
Cancel
Save