Skip to content

Commit

Permalink
[#401] Extract JS code from viewAreas.php (2/2)
Browse files Browse the repository at this point in the history
In this step, we extract the php code from the .js file we just
renamed to a new file. The history of that file will be empty.

We also take advantage to rename the page with a better name.
  • Loading branch information
jaragunde committed May 14, 2018
1 parent 1acd8ed commit 73c295a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 32 deletions.
2 changes: 1 addition & 1 deletion config/permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
'/services/createSectorsService.php', '/services/deleteSectorsService.php',
//areas management
'/services/createAreasService.php', '/services/deleteAreasService.php',
'/services/updateAreasService.php', '/viewAreas.php',
'/services/updateAreasService.php', '/areaManagement.php',
//calendar management
'/calendarManagement.php', '/services/getCommonEventsByCityIdJsonService.php',
'/services/getCommonEventsByCityIdService.php', '/services/createCommonEventsService.php',
Expand Down
40 changes: 40 additions & 0 deletions web/areaManagement.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/*
* Copyright (C) 2009-2018 Igalia, S.L. <info@igalia.com>
*
* This file is part of PhpReport.
*
* PhpReport is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PhpReport is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PhpReport. If not, see <http://www.gnu.org/licenses/>.
*/

define('PHPREPORT_ROOT', __DIR__ . '/../');

/* We check authentication and authorization */
require_once(PHPREPORT_ROOT . '/web/auth.php');

/* Include the generic header and sidebar*/
define('PAGE_TITLE', "PhpReport - Areas Management");
include_once("include/header.php");

?>
<script src="include/RowEditor.min.js"></script>
<script src="js/areaManagement.min.js"></script>

<div id="content">
</div>
<div id="variables"/>
<?php
/* Include the footer to close the header */
include("include/footer.php");
?>
2 changes: 1 addition & 1 deletion web/include/menubar.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<img class="silk-vcard-edit" src="include/icons/s.gif" />
Clients
</a>
<a href="viewAreas.php">
<a href="areaManagement.php">
<img class="silk-brick-edit" src="include/icons/s.gif" />
Areas
</a>
Expand Down
31 changes: 1 addition & 30 deletions web/js/areaManagement.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/*
* Copyright (C) 2009 Igalia, S.L. <info@igalia.com>
* Copyright (C) 2009-2018 Igalia, S.L. <info@igalia.com>
*
* This file is part of PhpReport.
*
Expand All @@ -18,25 +17,6 @@
* along with PhpReport. If not, see <http://www.gnu.org/licenses/>.
*/

define('PHPREPORT_ROOT', __DIR__ . '/../');
$sid = $_GET["sid"];
/* We check authentication and authorization */
require_once(PHPREPORT_ROOT . '/web/auth.php');
/* Include the generic header and sidebar*/
define('PAGE_TITLE', "PhpReport - Areas Management");
include_once("include/header.php");
include_once(PHPREPORT_ROOT . '/util/ConfigurationParametersManager.php');
include_once(PHPREPORT_ROOT . '/util/UnknownParameterException.php');
include_once(PHPREPORT_ROOT . '/util/LoginManager.php');
include_once(PHPREPORT_ROOT . '/web/services/WebServicesFunctions.php');
?>
<script src="include/RowEditor.min.js"></script>
<script type="text/javascript">
Ext.onReady(function(){

var App = new Ext.App({});
Expand Down Expand Up @@ -280,12 +260,3 @@ Ext.onReady(function(){
});

});
</script>

<div id="content">
</div>
<div id="variables"/>
<?php
/* Include the footer to close the header */
include("include/footer.php");
?>

0 comments on commit 73c295a

Please sign in to comment.