Browse Source

* UPD: db schema file
* ADD: forced autofocus in bind and ventilazione

Giancarlo Voci 8 years ago
parent
commit
6d65ff4a0e
4 changed files with 44 additions and 71 deletions
  1. 35 38
      .idea/workspace.xml
  2. 0 32
      omlink.sql
  3. 1 1
      src/OpenMind/System/ErrorHandlers.php
  4. 8 0
      ui/js/omlink.js

+ 35 - 38
.idea/workspace.xml

@@ -2,9 +2,7 @@
 <project version="4">
 <project version="4">
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="13e5f013-e4b6-4dea-8a5b-303c9372ca73" name="Default" comment=".">
     <list default="true" id="13e5f013-e4b6-4dea-8a5b-303c9372ca73" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/ui/css/omlink.css" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/omlink.sql" beforeDir="false" afterPath="$PROJECT_DIR$/omlink.sql" afterDir="false" />
     </list>
     </list>
     <ignored path="ui/css/omlink.css" />
     <ignored path="ui/css/omlink.css" />
     <ignored path="ui/css/omlink.css.map" />
     <ignored path="ui/css/omlink.css.map" />
@@ -39,7 +37,7 @@
     <session id="563863937">
     <session id="563863937">
       <usages-collector id="statistics.lifecycle.project">
       <usages-collector id="statistics.lifecycle.project">
         <counts>
         <counts>
-          <entry key="project.closed" value="31" />
+          <entry key="project.closed" value="32" />
           <entry key="project.open.time.0" value="5" />
           <entry key="project.open.time.0" value="5" />
           <entry key="project.open.time.10" value="6" />
           <entry key="project.open.time.10" value="6" />
           <entry key="project.open.time.11" value="7" />
           <entry key="project.open.time.11" value="7" />
@@ -69,7 +67,7 @@
           <entry key="log" value="5" />
           <entry key="log" value="5" />
           <entry key="php" value="670" />
           <entry key="php" value="670" />
           <entry key="scss" value="18" />
           <entry key="scss" value="18" />
-          <entry key="sql" value="3" />
+          <entry key="sql" value="5" />
           <entry key="tpl" value="97" />
           <entry key="tpl" value="97" />
           <entry key="ts" value="2" />
           <entry key="ts" value="2" />
           <entry key="txt" value="1" />
           <entry key="txt" value="1" />
@@ -87,8 +85,8 @@
           <entry key="PHP" value="670" />
           <entry key="PHP" value="670" />
           <entry key="PLAIN_TEXT" value="19" />
           <entry key="PLAIN_TEXT" value="19" />
           <entry key="SCSS" value="18" />
           <entry key="SCSS" value="18" />
-          <entry key="SQL" value="1" />
-          <entry key="Scratch" value="2" />
+          <entry key="SQL" value="2" />
+          <entry key="Scratch" value="3" />
           <entry key="Smarty" value="97" />
           <entry key="Smarty" value="97" />
           <entry key="TypeScript" value="2" />
           <entry key="TypeScript" value="2" />
           <entry key="XML" value="2" />
           <entry key="XML" value="2" />
@@ -105,9 +103,9 @@
           <entry key="log" value="1" />
           <entry key="log" value="1" />
           <entry key="php" value="39561" />
           <entry key="php" value="39561" />
           <entry key="scss" value="185" />
           <entry key="scss" value="185" />
-          <entry key="sql" value="14" />
+          <entry key="sql" value="42" />
           <entry key="tpl" value="4708" />
           <entry key="tpl" value="4708" />
-          <entry key="txt" value="2852" />
+          <entry key="txt" value="2858" />
           <entry key="xml" value="113" />
           <entry key="xml" value="113" />
         </counts>
         </counts>
       </usages-collector>
       </usages-collector>
@@ -118,10 +116,10 @@
           <entry key="JSON" value="192" />
           <entry key="JSON" value="192" />
           <entry key="JavaScript" value="2671" />
           <entry key="JavaScript" value="2671" />
           <entry key="PHP" value="39552" />
           <entry key="PHP" value="39552" />
-          <entry key="PLAIN_TEXT" value="2915" />
+          <entry key="PLAIN_TEXT" value="2921" />
           <entry key="SCSS" value="185" />
           <entry key="SCSS" value="185" />
-          <entry key="SQL" value="9" />
-          <entry key="Scratch" value="14" />
+          <entry key="SQL" value="14" />
+          <entry key="Scratch" value="37" />
           <entry key="Smarty" value="4708" />
           <entry key="Smarty" value="4708" />
           <entry key="XML" value="113" />
           <entry key="XML" value="113" />
         </counts>
         </counts>
@@ -218,7 +216,7 @@
           </provider>
           </provider>
         </entry>
         </entry>
       </file>
       </file>
-      <file pinned="false" current-in-tab="true">
+      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/package.json">
         <entry file="file://$PROJECT_DIR$/package.json">
           <provider selected="true" editor-type-id="text-editor">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="80">
             <state relative-caret-position="80">
@@ -227,14 +225,11 @@
           </provider>
           </provider>
         </entry>
         </entry>
       </file>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/OpenMind/Web/Web.php">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/omlink.sql">
           <provider selected="true" editor-type-id="text-editor">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="245">
-              <caret line="45" selection-start-line="45" selection-end-line="47" selection-end-column="57" />
-              <folding>
-                <element signature="e#96#131#0#PHP" expanded="true" />
-              </folding>
+            <state relative-caret-position="41">
+              <caret line="3" column="25" lean-forward="true" selection-start-line="3" selection-start-column="25" selection-end-line="3" selection-end-column="25" />
             </state>
             </state>
           </provider>
           </provider>
         </entry>
         </entry>
@@ -254,7 +249,6 @@
   </component>
   </component>
   <component name="FindInProjectRecents">
   <component name="FindInProjectRecents">
     <findStrings>
     <findStrings>
-      <find>center</find>
       <find>PrintLabel</find>
       <find>PrintLabel</find>
       <find>debugborder</find>
       <find>debugborder</find>
       <find>danger</find>
       <find>danger</find>
@@ -284,6 +278,7 @@
       <find>cookie.user</find>
       <find>cookie.user</find>
       <find>array_sear</find>
       <find>array_sear</find>
       <find>getserver</find>
       <find>getserver</find>
+      <find>label_bindings</find>
     </findStrings>
     </findStrings>
     <replaceStrings>
     <replaceStrings>
       <replace>images/</replace>
       <replace>images/</replace>
@@ -343,8 +338,6 @@
   <component name="IdeDocumentHistory">
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
     <option name="CHANGED_PATHS">
       <list>
       <list>
-        <option value="$PROJECT_DIR$/src/OpenMind/FindBox/FindBox.php" />
-        <option value="$PROJECT_DIR$/index2.htm" />
         <option value="$PROJECT_DIR$/ui/footer.tpl" />
         <option value="$PROJECT_DIR$/ui/footer.tpl" />
         <option value="$PROJECT_DIR$/src/OpenMind/FindBox/FindBoxCoreSystem.php" />
         <option value="$PROJECT_DIR$/src/OpenMind/FindBox/FindBoxCoreSystem.php" />
         <option value="$PROJECT_DIR$/conn_odbc_ibm.php" />
         <option value="$PROJECT_DIR$/conn_odbc_ibm.php" />
@@ -394,6 +387,8 @@
         <option value="$PROJECT_DIR$/src/OpenMind/System/User.php" />
         <option value="$PROJECT_DIR$/src/OpenMind/System/User.php" />
         <option value="$PROJECT_DIR$/src/Modules/Blank/Blank.php" />
         <option value="$PROJECT_DIR$/src/Modules/Blank/Blank.php" />
         <option value="$PROJECT_DIR$/package.json" />
         <option value="$PROJECT_DIR$/package.json" />
+        <option value="$PROJECT_DIR$/omlink.sql" />
+        <option value="$APPLICATION_CONFIG_DIR$/consoles/db/c429afd6-0a95-4610-bbe6-d7e85493d7fc/console.sql" />
       </list>
       </list>
     </option>
     </option>
   </component>
   </component>
@@ -468,13 +463,13 @@
   </component>
   </component>
   <component name="PropertiesComponent">
   <component name="PropertiesComponent">
     <property name="Constants" value="false" />
     <property name="Constants" value="false" />
-    <property name="DatabaseDriversLRU" value="mariadb&#10;db2&#10;java.sql.Driver" />
+    <property name="DatabaseDriversLRU" value="db2&#10;java.sql.Driver&#10;mariadb&#10;bdca26c7-590a-4404-9b10-e7277409f629" />
     <property name="DefaultHtmlFileTemplate" value="HTML File" />
     <property name="DefaultHtmlFileTemplate" value="HTML File" />
     <property name="NewWatcherDialog.advanced.open" value="true" />
     <property name="NewWatcherDialog.advanced.open" value="true" />
     <property name="TODO_SCOPE" value="All Places" />
     <property name="TODO_SCOPE" value="All Places" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="com.intellij.database.dataSource.DataSourceTemplate" value="DDL Data Source&#10;MySQL" />
     <property name="com.intellij.database.dataSource.DataSourceTemplate" value="DDL Data Source&#10;MySQL" />
-    <property name="database.console.LAST_STATE" value="true" />
+    <property name="database.console.LAST_STATE" value="false" />
     <property name="last_opened_file_path" value="$PROJECT_DIR$/node_modules/.bin/sass.cmd" />
     <property name="last_opened_file_path" value="$PROJECT_DIR$/node_modules/.bin/sass.cmd" />
     <property name="list.type.of.created.stylesheet" value="SCSS" />
     <property name="list.type.of.created.stylesheet" value="SCSS" />
     <property name="nodejs_interpreter_path" value="node" />
     <property name="nodejs_interpreter_path" value="node" />
@@ -482,7 +477,7 @@
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
     <property name="nodejs_package_manager_path" value="npm" />
     <property name="nodejs_package_manager_path" value="npm" />
     <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
     <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
-    <property name="settings.editor.selected.configurable" value="configurable.group.build" />
+    <property name="settings.editor.selected.configurable" value="database.main" />
   </component>
   </component>
   <component name="RecentsManager">
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
     <key name="CopyFile.RECENT_KEYS">
@@ -512,7 +507,7 @@
       </list>
       </list>
     </option>
     </option>
   </component>
   </component>
-  <component name="RunManager">
+  <component name="RunManager" selected="npm.Make Bundles - Dimatec">
     <configuration default="true" type="PhpRemoteDebugRunConfigurationType" factoryName="PHP Remote Debug" filter_connections="NOT_FILTER" server_name="Gedec" session_id="PHPSTORM">
     <configuration default="true" type="PhpRemoteDebugRunConfigurationType" factoryName="PHP Remote Debug" filter_connections="NOT_FILTER" server_name="Gedec" session_id="PHPSTORM">
       <method v="2" />
       <method v="2" />
     </configuration>
     </configuration>
@@ -659,7 +654,7 @@
       <workItem from="1539070459176" duration="40464000" />
       <workItem from="1539070459176" duration="40464000" />
       <workItem from="1539244283816" duration="11000" />
       <workItem from="1539244283816" duration="11000" />
       <workItem from="1539245333653" duration="53000" />
       <workItem from="1539245333653" duration="53000" />
-      <workItem from="1539247714485" duration="18985000" />
+      <workItem from="1539247714485" duration="20315000" />
     </task>
     </task>
     <task id="LOCAL-00019" summary="* corretta piccola fix sull'elenco finale di chiusura picklist">
     <task id="LOCAL-00019" summary="* corretta piccola fix sull'elenco finale di chiusura picklist">
       <created>1525276448689</created>
       <created>1525276448689</created>
@@ -1008,7 +1003,7 @@
     <servers />
     <servers />
   </component>
   </component>
   <component name="TimeTrackingManager">
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="1335563000" />
+    <option name="totallyTimeSpent" value="1336893000" />
   </component>
   </component>
   <component name="TodoView">
   <component name="TodoView">
     <todo-panel id="selected-file">
     <todo-panel id="selected-file">
@@ -1025,7 +1020,7 @@
     <layout>
     <layout>
       <window_info id="Favorites" order="0" sideWeight="0.50108224" side_tool="true" weight="0.20522387" />
       <window_info id="Favorites" order="0" sideWeight="0.50108224" side_tool="true" weight="0.20522387" />
       <window_info id="npm" order="1" sideWeight="0.4528302" side_tool="true" weight="0.22654584" />
       <window_info id="npm" order="1" sideWeight="0.4528302" side_tool="true" weight="0.22654584" />
-      <window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.66555554" visible="true" weight="0.22334754" />
+      <window_info content_ui="combo" id="Project" order="2" sideWeight="0.66555554" visible="true" weight="0.22334754" />
       <window_info id="Structure" order="3" sideWeight="0.33444443" side_tool="true" visible="true" weight="0.22334754" />
       <window_info id="Structure" order="3" sideWeight="0.33444443" side_tool="true" visible="true" weight="0.22334754" />
       <window_info anchor="bottom" id="Docker" order="0" show_stripe_button="false" />
       <window_info anchor="bottom" id="Docker" order="0" show_stripe_button="false" />
       <window_info anchor="bottom" id="Database Changes" order="1" show_stripe_button="false" />
       <window_info anchor="bottom" id="Database Changes" order="1" show_stripe_button="false" />
@@ -1292,14 +1287,6 @@
     </expressions>
     </expressions>
   </component>
   </component>
   <component name="editorHistoryManager">
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/OpenMind/System/QueueSystem.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="383">
-          <caret line="25" column="16" lean-forward="true" selection-start-line="25" selection-start-column="16" selection-end-line="25" selection-end-column="16" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/OpenMind/Backend/Backend.php" />
     <entry file="file://$PROJECT_DIR$/src/Modules/Dimatec/MigrationData.php">
     <entry file="file://$PROJECT_DIR$/src/Modules/Dimatec/MigrationData.php">
       <provider selected="true" editor-type-id="text-editor">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="463">
         <state relative-caret-position="463">
@@ -1636,6 +1623,16 @@
         </state>
         </state>
       </provider>
       </provider>
     </entry>
     </entry>
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/c429afd6-0a95-4610-bbe6-d7e85493d7fc/console.sql">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/omlink.sql">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="41">
+          <caret line="3" column="25" lean-forward="true" selection-start-line="3" selection-start-column="25" selection-end-line="3" selection-end-column="25" />
+        </state>
+      </provider>
+    </entry>
   </component>
   </component>
   <component name="masterDetails">
   <component name="masterDetails">
     <states>
     <states>

+ 0 - 32
omlink.sql

@@ -11,38 +11,6 @@ DROP DATABASE IF EXISTS `omlink`;
 CREATE DATABASE `omlink` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
 CREATE DATABASE `omlink` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
 USE `omlink`;
 USE `omlink`;
 
 
-CREATE TABLE `distinte` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `idUtente` int(11) NOT NULL DEFAULT -1,
-  `commessa` varchar(255) NOT NULL DEFAULT '',
-  `desccliente` varchar(255) NOT NULL DEFAULT '',
-  `barcode` varchar(255) NOT NULL DEFAULT '',
-  `codcliente` varchar(255) NOT NULL,
-  `descrizione` varchar(255) NOT NULL DEFAULT '',
-  `data_creazione` date NOT NULL DEFAULT current_timestamp(),
-  `time_creazione` time NOT NULL DEFAULT current_timestamp(),
-  `qta_prelevare` int(11) NOT NULL DEFAULT 0,
-  `qta_mancante` int(11) NOT NULL DEFAULT 0,
-  `uds` varchar(255) NOT NULL DEFAULT '',
-  `deleted` tinyint(4) NOT NULL DEFAULT 0,
-  `color` int(11) DEFAULT 1,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
-CREATE TABLE `label_bindings` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `label_id` varchar(255) NOT NULL,
-  `barcode` varchar(255) NOT NULL,
-  `descrizione` varchar(255) NOT NULL,
-  `template_id` varchar(255) NOT NULL DEFAULT '0',
-  `esl_datafields` varchar(5000) NOT NULL COMMENT 'FindBox Articles datafields in JSON format',
-  `qr_code` varchar(255) DEFAULT NULL,
-  `qta_prelevare` int(11) NOT NULL DEFAULT 0,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-
-
 CREATE TABLE `notifications` (
 CREATE TABLE `notifications` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `code` int(11) NOT NULL DEFAULT 0,
   `code` int(11) NOT NULL DEFAULT 0,

+ 1 - 1
src/OpenMind/System/ErrorHandlers.php

@@ -50,7 +50,7 @@ class ErrorHandlers
    * @param string $logmessage
    * @param string $logmessage
    * @param int $tracenumber trace index of debug_backtrace() return array, default 1
    * @param int $tracenumber trace index of debug_backtrace() return array, default 1
    */
    */
-  function WriteLog($logMessage, $traceNumber = 1)
+  private function WriteLog($logMessage, $traceNumber = 1)
   {
   {
     $trace = debug_backtrace();
     $trace = debug_backtrace();
 
 

+ 8 - 0
ui/js/omlink.js

@@ -64,11 +64,19 @@ function SetupConfirmationDialog() {
   });
   });
 }
 }
 
 
+function ForceFocus() {
+  setInterval(function () {
+    $("[autofocus]").focus();
+  }, 1000);
+}
+
 $(function () {
 $(function () {
   SetupConfirmationDialog();
   SetupConfirmationDialog();
 
 
   refreshNotificationArea();
   refreshNotificationArea();
 
 
+  ForceFocus();
+
   $('form').on('submit', function () {
   $('form').on('submit', function () {
     $('form input,select').prop('disabled', false);
     $('form input,select').prop('disabled', false);
     setTimeout(function () {
     setTimeout(function () {