Location: PHPKode > projects > PWhere > pwhere-0.4/pwhere-dojo.php
<!--
 Copyright 2008-2009 - Domenico Ferrari <hide@address.com>

 This program 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.

 This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.

-->
<html>
<title>PWhere</title>
<?
error_reporting(E_ALL);

include("pwhere-conf.php");
include("lang/$LANG.php");
?>
<head>
<style type="text/css">
@import "js/dojo/resources/dojo.css";
@import "js/dijit/themes/tundra/tundra.css";
@import "js/dojox/grid/resources/tundraGrid.css";

body {
  margin:10px;
}
  
</style>
<script type="text/javascript" src="js/dojo/dojo.js"
  djConfig="parseOnLoad: true, isDebug: true, allowFirebugLite: true"></script>
<script type="text/javascript">
var baseUrl="<? echo dirname($_SERVER["SCRIPT_NAME"])."/pwhere-manager.php" ?>";
</script>
<script type="text/javascript" src="Application-dojo.js"></script>
</head>
<body class="tundra" id="mainBody">
<div id="menuBarContainer" style="width: 100%">
  <div id="menubar" dojoType="dijit.MenuBar">
    <div dojoType="dijit.MenuBarItem" label="<?echo _STR_CATEGORIES?>" onClick="goCategories()"></div>
    <div dojoType="dijit.MenuBarItem" label="<?echo _STR_SEARCH?>" onClick="goSearch()"></div>
    <div dojoType="dijit.PopupMenuBarItem" disabled="true">
      <span>Help</span>
      <div dojoType="dijit.Menu">
        <div dojoType="dijit.MenuItem" label="Informazioni su..." onClick="infoDialog.show()"></div>
      </div>
    </div>
  </div><!-- menuBar -->
</div><!-- menuBarContainer -->
<div dojoType="dijit.Dialog" jsId="infoDialog" title="Informazioni su...">
  <div>Akssk  nmdas kasjkda msana</div>
</div>
<br>
<div id="content" style="position: relative">
</div>

<div id="contentCategories" style="position: absolute; left: -1000px; top: 0px; height: 80%">
  <div style="position: absolute; top: 0px; left: 0px; width: 50px" dojoType="dijit.form.Button" jsId="view.avanti"><? echo _STR_CATEGORY_NEW ?></div>
  <div style="position: absolute; top: 0px; left: 100px; width: 50px" dojoType="dijit.form.Button" jsId="view.avanti" onClick="saveCatData()">SaveAAA</div>
  <div style="position: absolute; top: 50px; left: 0px; height: 100%" dojoType="dijit.layout.BorderContainer" id="catGridContainer" ></div>
  <script type="text/javascript">
    var catGridLayout = [
    {
      name: "<? echo _STR_CAT_CODE ?>",
      field: "id",
      styles: "text-align:right;",
      width: "50px"
    },
    {
      name: "<? echo _STR_CAT_NAME ?>",
      field: "name",
      //editable: true,
      width: "150px"
    },
    {
      name: "<? echo _STR_CAT_DESCRIPTION ?>",
      field: "descr",
      //editable: true,
      width: "auto"
    },
    {
      name: "&nbsp;",
      field: "modifyUrl",
      width: "50px"
    },
    {
      name: "&nbsp;",
      field: "deleteUrl",
      width: "50px"
    }
    ];
  </script>
</div>

<div id="contentDisks" style="position: absolute; left: -1000px; top: 0px; height: 80%">
  <div style="position: absolute; top: 0px; left: 0px; width: 50px" dojoType="dijit.form.Button" jsId="view.avanti"><? echo _STR_CATEGORY_NEW ?></div>
  <div style="position: absolute; top: 50px; left: 0px; height: 100%" dojoType="dijit.layout.BorderContainer" id="diskGridContainer" ></div>
  <script type="text/javascript">
    var diskGridLayout = [
    {
      name: "id",
      field: "id",
      hidden: true,
      width: "50px"
    },
    {
      name: "<? echo _STR_DISK_NAME ?>",
      field: "name",
      //width: "120px"
      noresize: false,
      width: "auto"
    },
    {
      name: "##",
      field: "num",
      styles: "text-align:right;",
      width: "25px"
    },
    {
      name: "<? echo _STR_DATE ?>",
      field: "date",
      width: "150px"
    },
    {
      name: "<? echo _STR_LABEL ?>",
      field: "label",
      width: "100px"
    },
    {
      name: "<? echo _STR_DISK_USAGE ?>",
      field: "usage",
      styles: "text-align:right;",
      width: "70px"
    },
    {
      name: "<? echo _STR_DISK_FREE ?>",
      field: "free",
      styles: "text-align:right;",
      width: "70px"
    },
    {
      name: "<? echo _STR_DISK_DESCRIPTION ?>",
      field: "descr",
      hidden: true,
      width: "auto"
    },
    {
      name: "&nbsp;",
      field: "modifyUrl",
      width: "50px"
    },
    {
      name: "&nbsp;",
      field: "deleteUrl",
      width: "50px"
    }
    ];
  </script>
</div>

<div id="contentFiles" style="position: absolute; left: -1000px; top: 0px; height: 80%">
  <div style="position: absolute; top: 0px; left: 0px; width: 50px" dojoType="dijit.form.Button" jsId="view.avanti"><? echo _STR_CATEGORY_NEW ?></div>
  <div style="position: absolute; top: 50px; left: 0px; height: 100%" dojoType="dijit.layout.BorderContainer" id="fileGridContainer" ></div>
  <script type="text/javascript">
    var fileGridLayout = [
    {
      name: "id",
      field: "id",
      hidden: true,
      width: "50px"
    },
    {
      name: "<? echo _STR_FILE_NAME ?>",
      field: "name",
      //width: "120px"
      noresize: false,
      width: "auto"
    },
    {
      name: "<? echo _STR_FILE_SIZE ?>",
      field: "size",
      width: "70px"
    },
    {
      name: "&nbsp;",
      width: "auto"
    }
    ];
  </script>
</div>

<div id="contentSearch" style="position: absolute; left: -1000px; top: 0px; height: 80%">
  <div style="position: absolute; top: 30px; left: 0px;">
    <div dojoType="dijit.form.TextBox" jsId="searchValue"></div>
    <div dojoType="dijit.form.Button" onClick="goResults"><? echo _STR_SEARCH ?></div>
  </div>
</div>

<div id="contentResults" style="position: absolute; left: -1000px; top: 0px; height: 80%">
  <div style="position: absolute; top: 50px; left: 0px; height: 100%" dojoType="dijit.layout.BorderContainer" id="resultsGridContainer" ></div>
  <script type="text/javascript">
    var resultsGridLayout = [
    {
      name: "<? echo _STR_FILE_NAME ?>",
      field: "name",
      //width: "120px"
      noresize: false,
      width: "auto"
    },
    {
      name: "<? echo _STR_FILE_PATH ?>",
      field: "path",
      width: "70px"
    },
    {
      name: "<? echo _STR_FILE_SIZE ?>",
      field: "size",
      width: "70px"
    },
    {
      name: "<? echo _STR_DISK ?>",
      field: "disk",
      width: "70px"
    },
    {
      name: "<? echo _STR_CATEGORY ?>",
      field: "cat",
      width: "70px"
    },
    {
      name: "&nbsp;",
      width: "auto"
    }
    ];
  </script>
</div>

</body>
</html>

Return current item: PWhere