Working Copy
authorwunschtacho <wunschtacho@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 18 Oct 2012 13:40:20 +0000 (13:40 +0000)
committerwunschtacho <wunschtacho@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 18 Oct 2012 13:40:20 +0000 (13:40 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/powermail_cond/trunk@67279 735d13b6-9817-0410-8766-e36946ffe9aa

.idea/workspace.xml
Classes/Utility/Div.php
Classes/Utility/EidClearSession.php [new file with mode: 0644]
Classes/Utility/EidSaveInSession.php
Resources/Public/Js/PowermailCond.js
ext_localconf.php

index e234df0..5ea1e80 100644 (file)
@@ -2,9 +2,12 @@
 <project version="4">\r
   <component name="ChangeListManager">\r
     <list default="true" readonly="true" id="500e5988-e13b-4ba1-8a60-e63a97f737a1" name="Default" comment="">\r
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Classes/Utility/EidClearSession.php" />\r
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />\r
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php" afterPath="$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php" />\r
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Classes/Utility/Div.php" afterPath="$PROJECT_DIR$/Classes/Utility/Div.php" />\r
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php" afterPath="$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php" />\r
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js" afterPath="$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js" />\r
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/ext_localconf.php" afterPath="$PROJECT_DIR$/ext_localconf.php" />\r
     </list>\r
     <ignored path="powermail_cond@powermailt347.in2code.de.iws" />\r
     <ignored path=".idea/workspace.xml" />\r
   </component>\r
   <component name="FileEditorManager">\r
     <leaf>\r
-      <file leaf-file-name="PowermailCond.js" pinned="false" current="true" current-in-tab="true">\r
+      <file leaf-file-name="PowermailCond.js" pinned="false" current="false" current-in-tab="false">\r
         <entry file="file://$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="169" column="78" selection-start="6176" selection-end="6176" vertical-scroll-proportion="0.66812706">\r
+            <state line="250" column="5" selection-start="8735" selection-end="8735" vertical-scroll-proportion="0.0">\r
               <folding />\r
             </state>\r
           </provider>\r
         </entry>\r
       </file>\r
-      <file leaf-file-name="Condition.php" pinned="false" current="false" current-in-tab="false">\r
-        <entry file="file://$PROJECT_DIR$/Configuration/TCA/Condition.php">\r
+      <file leaf-file-name="EidClearSession.php" pinned="false" current="false" current-in-tab="false">\r
+        <entry file="file://$PROJECT_DIR$/Classes/Utility/EidClearSession.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="103" column="30" selection-start="3295" selection-end="3295" vertical-scroll-proportion="-8.5">\r
-              <folding />\r
+            <state line="63" column="64" selection-start="2085" selection-end="2085" vertical-scroll-proportion="-17.653847">\r
+              <folding>\r
+                <element signature="e#1285#1472#0" expanded="false" />\r
+              </folding>\r
             </state>\r
           </provider>\r
         </entry>\r
       </file>\r
-      <file leaf-file-name="FieldlistingBackend.php" pinned="false" current="false" current-in-tab="false">\r
-        <entry file="file://$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php">\r
+      <file leaf-file-name="Div.php" pinned="false" current="true" current-in-tab="true">\r
+        <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="85" column="6" selection-start="3255" selection-end="3255" vertical-scroll-proportion="-15.692307">\r
+            <state line="157" column="43" selection-start="4687" selection-end="4687" vertical-scroll-proportion="0.9627193">\r
               <folding />\r
             </state>\r
           </provider>\r
   <component name="IdeDocumentHistory">\r
     <option name="changedFiles">\r
       <list>\r
-        <option value="$PROJECT_DIR$/Resources/Private/Language/locallang_db.xml" />\r
         <option value="$PROJECT_DIR$/Configuration/TCA/Rule.php" />\r
         <option value="$PROJECT_DIR$/oldFiles/js/powermail_cond.js" />\r
         <option value="$PROJECT_DIR$/Configuration/TypoScript/PowermailCond.js" />\r
         <option value="$PROJECT_DIR$/oldFiles/static/setup.txt" />\r
         <option value="$PROJECT_DIR$/ext_tables.php" />\r
         <option value="$PROJECT_DIR$/ext_emconf.php" />\r
-        <option value="$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php" />\r
         <option value="$PROJECT_DIR$/Classes/Utility/EidReadSession.php" />\r
-        <option value="$PROJECT_DIR$/Classes/Utility/Div.php" />\r
         <option value="$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php" />\r
-        <option value="$PROJECT_DIR$/ext_localconf.php" />\r
         <option value="$PROJECT_DIR$/Resources/Public/Css/PowermailCond.css" />\r
         <option value="$PROJECT_DIR$/Configuration/TypoScript/setup.txt" />\r
         <option value="$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php" />\r
+        <option value="$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php" />\r
+        <option value="$PROJECT_DIR$/ext_localconf.php" />\r
         <option value="$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js" />\r
+        <option value="$PROJECT_DIR$/Classes/Utility/EidClearSession.php" />\r
+        <option value="$PROJECT_DIR$/Classes/Utility/Div.php" />\r
       </list>\r
     </option>\r
   </component>\r
       <sortByType />\r
     </navigator>\r
     <panes>\r
-      <pane id="Scope">\r
-        <subPane subId="Project Files">\r
-          <PATH>\r
-            <PATH_ELEMENT USER_OBJECT="Root">\r
-              <option name="myItemId" value="" />\r
-              <option name="myItemType" value="" />\r
-            </PATH_ELEMENT>\r
-          </PATH>\r
-        </subPane>\r
-      </pane>\r
       <pane id="ProjectPane">\r
         <subPane>\r
           <PATH>\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
             <PATH_ELEMENT>\r
-              <option name="myItemId" value="Configuration" />\r
+              <option name="myItemId" value="Resources" />\r
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
+            </PATH_ELEMENT>\r
+            <PATH_ELEMENT>\r
+              <option name="myItemId" value="Public" />\r
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
+            </PATH_ELEMENT>\r
+            <PATH_ELEMENT>\r
+              <option name="myItemId" value="Js" />\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
           </PATH>\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
             <PATH_ELEMENT>\r
-              <option name="myItemId" value="Configuration" />\r
+              <option name="myItemId" value="Resources" />\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
             <PATH_ELEMENT>\r
-              <option name="myItemId" value="TCA" />\r
+              <option name="myItemId" value="Public" />\r
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
+            </PATH_ELEMENT>\r
+          </PATH>\r
+          <PATH>\r
+            <PATH_ELEMENT>\r
+              <option name="myItemId" value="powermail_cond@powermailt347.in2code.de" />\r
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />\r
+            </PATH_ELEMENT>\r
+            <PATH_ELEMENT>\r
+              <option name="myItemId" value="powermail_cond@powermailt347.in2code.de" />\r
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
+            </PATH_ELEMENT>\r
+            <PATH_ELEMENT>\r
+              <option name="myItemId" value="Resources" />\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
           </PATH>\r
           </PATH>\r
         </subPane>\r
       </pane>\r
+      <pane id="Scope">\r
+        <subPane subId="Project Files">\r
+          <PATH>\r
+            <PATH_ELEMENT USER_OBJECT="Root">\r
+              <option name="myItemId" value="" />\r
+              <option name="myItemType" value="" />\r
+            </PATH_ELEMENT>\r
+          </PATH>\r
+        </subPane>\r
+      </pane>\r
     </panes>\r
   </component>\r
   <component name="PropertiesComponent">\r
     <property name="options.splitter.main.proportions" value="0.3" />\r
     <property name="WebServerToolWindowFactoryState" value="true" />\r
     <property name="options.lastSelected" value="web.server" />\r
-    <property name="options.searchVisible" value="true" />\r
     <property name="options.splitter.details.proportions" value="0.2" />\r
+    <property name="options.searchVisible" value="true" />\r
   </component>\r
   <component name="PublishConfig" serverName="in2code" serverId="3ca6b370-8a73-4525-bbbd-e6d3cdda1d7f" autoUpload="true" autoUploadExternalChanges="true">\r
     <servers>\r
       <created>1350554846103</created>\r
       <updated>1350554846103</updated>\r
     </task>\r
-    <option name="localTasksCounter" value="13" />\r
+    <task id="LOCAL-00013" summary="Working Copy">\r
+      <created>1350556401102</created>\r
+      <updated>1350556401102</updated>\r
+    </task>\r
+    <option name="localTasksCounter" value="14" />\r
     <servers />\r
   </component>\r
   <component name="ToolWindowManager">\r
     <frame x="1592" y="-262" width="1936" height="1096" extended-state="6" />\r
     <editor active="true" />\r
     <layout>\r
+      <window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32822478" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
       <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />\r
-      <window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917964" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
       <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />\r
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.15048026" sideWeight="0.3271028" order="1" side_tool="true" content_ui="tabs" />\r
       <window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />\r
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.12646745" sideWeight="0.6717752" order="0" side_tool="false" content_ui="combo" />\r
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />\r
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />\r
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />\r
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917964" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />\r
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.15048026" sideWeight="0.3271028" order="1" side_tool="true" content_ui="tabs" />\r
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.15048026" sideWeight="0.66562825" order="0" side_tool="false" content_ui="combo" />\r
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />\r
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />\r
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />\r
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />\r
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />\r
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917964" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />\r
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917964" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />\r
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />\r
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />\r
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php">\r
+    <entry file="file://$PROJECT_DIR$/ext_tables.sql">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="61" column="33" selection-start="1888" selection-end="1888" vertical-scroll-proportion="0.10526316">\r
-          <folding>\r
-            <element signature="e#1285#1516#0" expanded="false" />\r
-          </folding>\r
-        </state>\r
+        <state line="1" column="68" selection-start="31" selection-end="70" vertical-scroll-proportion="0.018123668" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="44" column="18" selection-start="1343" selection-end="1343" vertical-scroll-proportion="16.666666">\r
+        <state line="134" column="21" selection-start="4430" selection-end="4430" vertical-scroll-proportion="-10.666667">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/ext_tables.sql">\r
+    <entry file="file://$PROJECT_DIR$/Configuration/TypoScript/setup.txt">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="1" column="68" selection-start="31" selection-end="70" vertical-scroll-proportion="0.018123668">\r
+        <state line="7" column="51" selection-start="352" selection-end="352" vertical-scroll-proportion="0.0">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/ext_localconf.php">\r
+    <entry file="file://$PROJECT_DIR$/Resources/Public/Css/PowermailCond.css">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="6" column="101" selection-start="194" selection-end="194" vertical-scroll-proportion="0.1118421">\r
+        <state line="2" column="11" selection-start="50" selection-end="50" vertical-scroll-proportion="0.0">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php">\r
+    <entry file="file://$PROJECT_DIR$/Configuration/TCA/Condition.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="134" column="21" selection-start="4430" selection-end="4430" vertical-scroll-proportion="-10.666667">\r
+        <state line="103" column="30" selection-start="3295" selection-end="3295" vertical-scroll-proportion="0.02364395">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Configuration/TypoScript/setup.txt">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="7" column="51" selection-start="352" selection-end="352" vertical-scroll-proportion="0.0">\r
+        <state line="85" column="6" selection-start="3255" selection-end="3255" vertical-scroll-proportion="0.023224045">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Resources/Public/Css/PowermailCond.css">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="2" column="11" selection-start="50" selection-end="50" vertical-scroll-proportion="0.0">\r
-          <folding />\r
+        <state line="30" column="3" selection-start="1288" selection-end="1288" vertical-scroll-proportion="0.2090164">\r
+          <folding>\r
+            <element signature="e#1285#1518#0" expanded="false" />\r
+          </folding>\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php">\r
+    <entry file="file://$PROJECT_DIR$/ext_localconf.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="85" column="6" selection-start="3255" selection-end="3255" vertical-scroll-proportion="-15.692307">\r
+        <state line="24" column="76" selection-start="993" selection-end="1019" vertical-scroll-proportion="0.4473684">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Configuration/TCA/Condition.php">\r
+    <entry file="file://$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="103" column="30" selection-start="3295" selection-end="3295" vertical-scroll-proportion="-8.5">\r
+        <state line="250" column="5" selection-start="8735" selection-end="8735" vertical-scroll-proportion="0.0">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidClearSession.php">\r
+      <provider selected="true" editor-type-id="text-editor">\r
+        <state line="63" column="64" selection-start="2085" selection-end="2085" vertical-scroll-proportion="-17.653847">\r
+          <folding>\r
+            <element signature="e#1285#1472#0" expanded="false" />\r
+          </folding>\r
+        </state>\r
+      </provider>\r
+    </entry>\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="169" column="78" selection-start="6176" selection-end="6176" vertical-scroll-proportion="0.66812706">\r
+        <state line="157" column="43" selection-start="4687" selection-end="4687" vertical-scroll-proportion="0.9627193">\r
           <folding />\r
         </state>\r
       </provider>\r
index d352a54..e35c799 100644 (file)
@@ -141,5 +141,22 @@ class Tx_PowermailCond_Utility_Div {
 
                return $uid . ':' . substr($uids, 0, -1); // return without last ;
        }
+
+       /**
+        * Get all fields in a commaseparated list from a fieldset uid
+        *
+        * @param int $formUid                  UID of related form
+        * @return void
+        */
+       public function cleanfullSession($formUid = null) {
+               if (intval($formUid) > 0) {
+                       $array = $GLOBALS['TSFE']->fe_user->getKey('ses', $this->extKey);
+                       $array['form_' . $formUid] = array();
+               } else {
+                       $array = array();
+               }
+               $GLOBALS['TSFE']->fe_user->setKey('ses', $this->extKey, $array); // Generate Session with piVars array
+               $GLOBALS['TSFE']->storeSessionData(); // Save session
+       }
 }
 ?>
\ No newline at end of file
diff --git a/Classes/Utility/EidClearSession.php b/Classes/Utility/EidClearSession.php
new file mode 100644 (file)
index 0000000..879bf9f
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Alexander Kellner <alexander.kellner@in2code.de>, in2code.
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project 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 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script 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.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+require_once(PATH_t3lib . 'class.t3lib_befunc.php');
+require_once(PATH_t3lib . 'stddb/tables.php');
+require_once(t3lib_extMgm::extPath('cms', 'ext_tables.php'));
+require_once(PATH_tslib . 'class.tslib_pibase.php');
+require_once(t3lib_extMgm::extPath('powermail_cond') . 'Classes/Utility/Div.php');
+
+/**
+ * This class cleans the full session
+ *
+ * @author     Alex Kellner <alexander.kellner@in2code.de>, in2code.
+ * @package    TYPO3
+ * @subpackage Tx_PowermailCond_Utility_EidClearSession
+ */
+class Tx_PowermailCond_Utility_EidClearSession extends tslib_pibase {
+
+       /**
+        * The extension key
+        *
+        * @var string
+        */
+       public $extKey = 'powermail_cond'; // Extension key
+
+       /**
+        * Prefix Id
+        *
+        * @var string
+        */
+       public $prefixId = 'tx_powermailcond_pi1';
+
+       /**
+        * Write values to session - main method called via AJAX
+        *
+        * @return      void
+        */
+       public function main() {
+               // config
+               $this->getCObj(); // enable TSFE globals
+               $GLOBALS['TSFE']->sesData = tslib_eidtools::initFeUser();
+               $piVars = t3lib_div::_GP($this->prefixId); // GET param
+               $form = intval($piVars['form']); // uid of current field
+               $this->div->cleanfullSession($form);
+       }
+
+       /**
+        * Initialize cObj and TSFE Globals
+        *
+        * @return      object  cObj
+        */
+       private function getCObj() {
+               $this->div = t3lib_div::makeInstance('Tx_PowermailCond_Utility_Div'); // Create new instance for div class
+               $userObj = tslib_eidtools::initFeUser();
+               $temp_TSFEclassName = t3lib_div::makeInstance('tslib_fe');
+               $GLOBALS['TSFE'] = new $temp_TSFEclassName($TYPO3_CONF_VARS, 32, 0, true);
+               $GLOBALS['TSFE']->connectToDB();
+               $GLOBALS['TSFE']->fe_user = $userObj;
+               $GLOBALS['TSFE']->id = t3lib_div::_GET('id');
+               $GLOBALS['TSFE']->determineId();
+               $GLOBALS['TSFE']->getCompressedTCarray();
+               $GLOBALS['TSFE']->initTemplate();
+               $GLOBALS['TSFE']->getConfigArray();
+               $GLOBALS['TSFE']->includeTCA();
+
+               return t3lib_div::makeInstance('tslib_cObj');
+       }
+
+}
+
+$SOBE = t3lib_div::makeInstance('Tx_PowermailCond_Utility_EidClearSession'); // make instance
+echo $SOBE->main(); // print content
+?>
\ No newline at end of file
index 4ee897e..11cddb9 100644 (file)
@@ -33,7 +33,7 @@ require_once(t3lib_extMgm::extPath('powermail_cond') . 'Classes/Utility/Div.php'
  *
  * @author     Alex Kellner <alexander.kellner@in2code.de>, in2code.
  * @package    TYPO3
- * @subpackage tx_powermailcond_ajaxWriteInSession_eid
+ * @subpackage Tx_PowermailCond_Utility_EidSaveInSession
  */
 class Tx_PowermailCond_Utility_EidSaveInSession extends tslib_pibase {
 
index 1e04efa..91c6002 100644 (file)
@@ -1,5 +1,6 @@
 jQuery(document).ready(function() {
        base = getBaseUrl();
+       clearFullSession();
        if ($('form.powermail_form').length > 0) { // only if the powermail form is on the page (not for confirmation page)
                checkConditions(0); // check if something should be changed
        }
@@ -80,12 +81,6 @@ function checkConditions(uid) {
                url: url, // send to this url
                data: 'eID=' + 'powermailcond_getFieldStatus' + params + '&tx_powermailcond_pi1[formUid]=' + $('input[name="tx_powermail_pi1[form]"]').val(), // add params
                cache: false, // disable cache (for ie)
-//             beforeSend: function() {
-//                     document.body.style.cursor = 'progress'; // change cursor to busy
-//             },
-//             complete: function() {
-//                     document.body.style.cursor = 'auto'; // normal cursor
-//             },
                success: function(data) { // return values
                        if (data != 'nochange') {
                                $('.powermail_fieldwrap select option').show(); // show all options at the beginning
@@ -239,4 +234,19 @@ function clearSession(uid) {
                        checkConditions(uid); // check if something should be changed
                }
        });
-};
\ No newline at end of file
+};
+
+/**
+ * Clear session values if form is submitted
+ *
+ * @return void
+ */
+function clearFullSession() {
+       if ($('.powermail_create').length) {
+               var url = base + '/index.php?eID=powermailcond_clearSession';
+               $.ajax({
+                       url: url, // send to this url
+                       cache: false
+               });
+       }
+}
\ No newline at end of file
index 542e087..b16c64b 100644 (file)
@@ -21,4 +21,7 @@ $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['powermailcond_saveToSession']
 // EID for reading existing values from session (via AJAX)
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['powermailcond_readSession'] = 'EXT:powermail_cond/Classes/Utility/EidReadSession.php';
 
+// EID to clean session to a form completely (via AJAX)
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['powermailcond_clearSession'] = 'EXT:powermail_cond/Classes/Utility/EidClearSession.php';
+
 ?>
\ No newline at end of file