Working Copy
authorwunschtacho <wunschtacho@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 17 Oct 2012 07:47:27 +0000 (07:47 +0000)
committerwunschtacho <wunschtacho@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 17 Oct 2012 07:47:27 +0000 (07:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/powermail_cond/trunk@67172 735d13b6-9817-0410-8766-e36946ffe9aa

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

index 48a3a6b..78e4c7b 100644 (file)
@@ -2,15 +2,11 @@
 <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$/Configuration/TypoScript" />\r
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Resources/Public/Js" />\r
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Configuration/TypoScript/setup.txt" />\r
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js" />\r
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Classes/Utility/Div.php" />\r
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php" />\r
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />\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
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/ext_tables.php" afterPath="$PROJECT_DIR$/ext_tables.php" />\r
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/oldFiles/js/powermail_cond.js" afterPath="$PROJECT_DIR$/oldFiles/js/powermail_cond.js" />\r
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/oldFiles/static/setup.txt" afterPath="$PROJECT_DIR$/oldFiles/static/setup.txt" />\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="class.tx_powermailcond_ajaxFieldList_eid.php" pinned="false" current="false" current-in-tab="false">\r
-        <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_ajaxFieldList_eid.php">\r
+      <file leaf-file-name="EidGetFieldlist.php" pinned="false" current="true" current-in-tab="true">\r
+        <entry file="file://$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.0">\r
-              <folding />\r
+            <state line="78" column="0" selection-start="2731" selection-end="2731" vertical-scroll-proportion="0.2836485">\r
+              <folding>\r
+                <element signature="e#6#984#0" expanded="true" />\r
+              </folding>\r
+            </state>\r
+          </provider>\r
+        </entry>\r
+      </file>\r
+      <file leaf-file-name="Div.php" pinned="false" current="false" current-in-tab="false">\r
+        <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
+          <provider selected="true" editor-type-id="text-editor">\r
+            <state line="32" column="34" selection-start="1188" selection-end="1216" vertical-scroll-proportion="-13.076923">\r
+              <folding>\r
+                <element signature="e#6#984#0" expanded="true" />\r
+              </folding>\r
             </state>\r
           </provider>\r
         </entry>\r
       </file>\r
-      <file leaf-file-name="class.tx_powermailcond_div.php" pinned="false" current="true" current-in-tab="true">\r
+      <file leaf-file-name="class.tx_powermailcond_div.php" pinned="false" current="false" current-in-tab="false">\r
         <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_div.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="33" column="51" selection-start="1266" selection-end="1266" vertical-scroll-proportion="0.2269188">\r
+            <state line="106" column="5" selection-start="1219" selection-end="3352" vertical-scroll-proportion="-26.576923">\r
+              <folding />\r
+            </state>\r
+          </provider>\r
+        </entry>\r
+      </file>\r
+      <file leaf-file-name="ext_tables.sql" pinned="false" current="false" current-in-tab="false">\r
+        <entry file="file://$PROJECT_DIR$/ext_tables.sql">\r
+          <provider selected="true" editor-type-id="text-editor">\r
+            <state line="33" column="63" selection-start="957" selection-end="991" vertical-scroll-proportion="0.0">\r
               <folding />\r
             </state>\r
           </provider>\r
@@ -53,7 +71,7 @@
       <file leaf-file-name="ext_localconf.php" pinned="false" current="false" current-in-tab="false">\r
         <entry file="file://$PROJECT_DIR$/ext_localconf.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="22" column="0" selection-start="920" selection-end="920" vertical-scroll-proportion="-14.384615">\r
+            <state line="18" column="134" selection-start="689" selection-end="689" vertical-scroll-proportion="-11.769231">\r
               <folding />\r
             </state>\r
           </provider>\r
@@ -62,7 +80,7 @@
       <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="33" column="60" selection-start="1123" selection-end="1123" vertical-scroll-proportion="0.0">\r
+            <state line="22" column="96" selection-start="694" selection-end="694" vertical-scroll-proportion="0.0">\r
               <folding />\r
             </state>\r
           </provider>\r
@@ -78,8 +96,6 @@
   <component name="IdeDocumentHistory">\r
     <option name="changedFiles">\r
       <list>\r
-        <option value="$PROJECT_DIR$/Resources/Private/Language/locallang_csh_tx_powermailcond_domain_model_condition.xml" />\r
-        <option value="$PROJECT_DIR$/Resources/Private/Language/locallang_csh_tx_powermailcond_domain_model_rule.xml" />\r
         <option value="$PROJECT_DIR$/Configuration/TCA/Rules.php" />\r
         <option value="$PROJECT_DIR$/Configuration/TCA/Conditions.php" />\r
         <option value="$PROJECT_DIR$/ext_tables.sql" />\r
         <option value="$PROJECT_DIR$/oldFiles/static/setup.txt" />\r
         <option value="$PROJECT_DIR$/ext_tables.php" />\r
         <option value="$PROJECT_DIR$/Configuration/TypoScript/setup.txt" />\r
-        <option value="$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js" />\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/Div.php" />\r
+        <option value="$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php" />\r
       </list>\r
     </option>\r
   </component>\r
     <property name="options.splitter.main.proportions" value="0.3" />\r
     <property name="WebServerToolWindowFactoryState" value="true" />\r
     <property name="options.lastSelected" value="reference.settings.deploy.options" />\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
     </configuration>\r
     <configuration default="true" type="JavascriptDebugSession" factoryName="Remote">\r
       <JSRemoteDebuggerConfigurationSettings>\r
-        <option name="engineId" />\r
+        <option name="engineId" value="embedded" />\r
         <option name="fileUrl" />\r
       </JSRemoteDebuggerConfigurationSettings>\r
       <method />\r
     </configuration>\r
-    <configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server">\r
+    <configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server" server_id="3ca6b370-8a73-4525-bbbd-e6d3cdda1d7f" server_name="in2code">\r
       <method>\r
         <option name="FtpUpload" enabled="false">\r
           <server_id />\r
       <created>1350402759102</created>\r
       <updated>1350402759102</updated>\r
     </task>\r
-    <option name="localTasksCounter" value="4" />\r
+    <task id="LOCAL-00004" summary="Working Copy">\r
+      <created>1350404233102</created>\r
+      <updated>1350404233102</updated>\r
+    </task>\r
+    <option name="localTasksCounter" value="5" />\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="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="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="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.25" sideWeight="0.5" 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.1755603" sideWeight="0.67082036" 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.33" sideWeight="0.5" order="-1" 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.25" sideWeight="0.5" 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.20917822" sideWeight="0.67082036" 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.33" 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.33" 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
     <breakpoint-manager />\r
   </component>\r
   <component name="editorHistoryManager">\r
-    <entry file="file://D:/SVN/powermail@forge/Configuration/TCA/Fields.php">\r
+    <entry file="file://D:/SVN/powermail@forge/ext_tables.sql">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="199" column="14" selection-start="7056" selection-end="7106" vertical-scroll-proportion="0.567297">\r
-          <folding />\r
-        </state>\r
+        <state line="3" column="44" selection-start="79" selection-end="110" vertical-scroll-proportion="-0.054371003" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Resources/Private/Language/locallang_db.xml">\r
+    <entry file="file://$PROJECT_DIR$/Configuration/TCA/Rule.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="51" column="85" selection-start="3753" selection-end="3753" vertical-scroll-proportion="0.22068231">\r
-          <folding />\r
-        </state>\r
+        <state line="43" column="35" selection-start="1404" selection-end="1422" vertical-scroll-proportion="0.5294772" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Configuration/TCA/Condition.php">\r
+    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_pidContainer.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="100" column="139" selection-start="3240" selection-end="3240" vertical-scroll-proportion="0.6429366">\r
-          <folding />\r
-        </state>\r
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://D:/SVN/powermail@forge/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="3" column="44" selection-start="79" selection-end="110" vertical-scroll-proportion="-0.054371003">\r
-          <folding />\r
-        </state>\r
+        <state line="6" column="93" selection-start="300" selection-end="300" vertical-scroll-proportion="0.13456464" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php">\r
+    <entry file="file://$PROJECT_DIR$/oldFiles/static/setup.txt">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="65" column="32" selection-start="2522" selection-end="2522" vertical-scroll-proportion="0.7083333">\r
-          <folding>\r
-            <element signature="e#987#1189#0" expanded="false" />\r
-          </folding>\r
-        </state>\r
+        <state line="4" column="39" selection-start="0" selection-end="300" vertical-scroll-proportion="0.089709766" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/ext_tables.sql">\r
+    <entry file="file://$PROJECT_DIR$/ext_tables.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="3" column="52" selection-start="87" selection-end="126" vertical-scroll-proportion="0.054371003">\r
-          <folding />\r
-        </state>\r
+        <state line="11" column="63" selection-start="318" selection-end="318" vertical-scroll-proportion="0.26008344" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Configuration/TCA/Rule.php">\r
+    <entry file="file://$PROJECT_DIR$/oldFiles/js/powermail_cond.js">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="43" column="35" selection-start="1404" selection-end="1422" vertical-scroll-proportion="0.5294772">\r
-          <folding />\r
-        </state>\r
+        <state line="54" column="27" selection-start="2261" selection-end="2261" vertical-scroll-proportion="-0.108742006" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_pidContainer.php">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">\r
+        <state line="32" column="50" selection-start="1196" selection-end="1240" vertical-scroll-proportion="0.114035085">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Configuration/TypoScript/setup.txt">\r
+    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_ajaxFieldList_eid.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="6" column="93" selection-start="300" selection-end="300" vertical-scroll-proportion="0.13456464">\r
+        <state line="0" column="0" selection-start="0" selection-end="12383" vertical-scroll-proportion="-0.0">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldFiles/static/setup.txt">\r
+    <entry file="file://$PROJECT_DIR$/ext_localconf.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="4" column="39" selection-start="0" selection-end="300" vertical-scroll-proportion="0.089709766">\r
+        <state line="18" column="134" selection-start="689" selection-end="689" vertical-scroll-proportion="-11.769231">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/ext_tables.php">\r
+    <entry file="file://$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="11" column="63" selection-start="318" selection-end="318" vertical-scroll-proportion="0.26008344">\r
+        <state line="22" column="96" selection-start="694" selection-end="694" vertical-scroll-proportion="0.0">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldFiles/js/powermail_cond.js">\r
+    <entry file="file://$PROJECT_DIR$/ext_tables.sql">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="54" column="27" selection-start="2261" selection-end="2261" vertical-scroll-proportion="-0.108742006">\r
+        <state line="33" column="63" selection-start="957" selection-end="991" 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://D:/SVN/powermail@forge/Classes/Utility/Div.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="33" column="60" selection-start="1123" selection-end="1123" vertical-scroll-proportion="0.0">\r
+        <state line="0" column="0" selection-start="0" selection-end="30724" 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$/oldLib/class.tx_powermailcond_div.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="22" column="0" selection-start="920" selection-end="920" vertical-scroll-proportion="-14.384615">\r
+        <state line="106" column="5" selection-start="1219" selection-end="3352" vertical-scroll-proportion="-26.576923">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_ajaxFieldList_eid.php">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">\r
-          <folding />\r
+        <state line="32" column="34" selection-start="1188" selection-end="1216" vertical-scroll-proportion="-13.076923">\r
+          <folding>\r
+            <element signature="e#6#984#0" expanded="true" />\r
+          </folding>\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_div.php">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="33" column="51" selection-start="1266" selection-end="1266" vertical-scroll-proportion="0.2269188">\r
-          <folding />\r
+        <state line="78" column="0" selection-start="2731" selection-end="2731" vertical-scroll-proportion="0.2836485">\r
+          <folding>\r
+            <element signature="e#6#984#0" expanded="true" />\r
+          </folding>\r
         </state>\r
       </provider>\r
     </entry>\r
diff --git a/Classes/Utility/Div.php b/Classes/Utility/Div.php
new file mode 100644 (file)
index 0000000..99a3147
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Alex Kellner <alexander.kellner@in2code.de>, in2code.de
+ *
+ *  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 3 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!
+ ***************************************************************/
+
+
+/**
+ * Div is a class for a collection of misc functions
+ *
+ * @package powermail_cond
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class Tx_PowermailCond_Utility_Div {
+
+       /**
+        * Extension Key
+        *
+        * @var string
+        */
+       public $extKey = 'powermail_cond';
+
+       /**
+        * Prefix Id
+        *
+        * @var string
+        */
+       public $prefixId = 'tx_powermailcond_pi1';
+
+       /**
+        * Write values to session
+        *
+        * @param       array   $array: Array for session store
+        * @param       string  $sesName: Session name
+        * @return      void
+        */
+       public function saveInSession($array, $sesName) {
+               // get current stored values from session
+               $oldArray = $GLOBALS['TSFE']->fe_user->getKey('ses', $sesName);
+
+               // merge old with new values
+               $array = array_merge((array) $oldArray, (array) $array);
+
+               // store new session
+               $GLOBALS['TSFE']->fe_user->setKey('ses', $sesName, $array); // Generate Session with piVars array
+               $GLOBALS['TSFE']->storeSessionData(); // Save session
+       }
+
+       /**
+        * Return all values from the session (could be used for debugging, etc..)
+        *
+        * @param       string  $sesName: Session name
+        * @return      array   $array: with session values
+        */
+       public function getAllSessionValues($sesName) {
+               // get current stored values from session
+               $array = $GLOBALS['TSFE']->fe_user->getKey('ses', $sesName);
+               return $array;
+       }
+
+       /**
+        * Get tt_content UID from field UID
+        *
+        * @param       integer $fuid: UID of tx_powermail_fields
+        * @return      integer $uid: tt_content UID
+        */
+       public function getTtcontentUid($fuid) {
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery ( // DB query
+                       'tt_content.uid',
+                       'tx_powermail_fieldsets LEFT JOIN tx_powermail_fields ON tx_powermail_fieldsets.uid = tx_powermail_fields.fieldset LEFT JOIN tt_content ON tx_powermail_fieldsets.tt_content = tt_content.uid',
+                       'tx_powermail_fields.uid = ' . intval($fuid),
+                       '',
+                       '',
+                       1
+               );
+               if (!$res) { // If there is a result
+                       return false;
+               }
+
+               $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+               return $row['uid'];
+       }
+
+       /**
+        * Write values to session
+        *
+        * @param       array   $conf: Configuration Array
+        * @return      array   $array: With all Startfields
+        */
+       public function getStartFields($conf) {
+               $array = array();
+               foreach ((array) $conf as $confLevel1) {
+                       foreach ((array) $confLevel1 as $confLevel2) {
+                               if (!empty($confLevel2['startField'])) {
+                                       $array[] = $confLevel2['startField'];
+                               }
+                       }
+               }
+               return $array;
+       }
+}
+?>
\ No newline at end of file
diff --git a/Classes/Utility/EidGetFieldlist.php b/Classes/Utility/EidGetFieldlist.php
new file mode 100644 (file)
index 0000000..927803d
--- /dev/null
@@ -0,0 +1,352 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010 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(PATH_tslib . 'class.tslib_fe.php');
+require_once(PATH_t3lib . 'class.t3lib_page.php');
+require_once(t3lib_extMgm::extPath('powermail_cond') . 'Classes/Utility/Div.php');
+
+/**
+ * This class tells jQuery which field are allowed in which are not allowed
+ *
+ * @author     Alex Kellner <alexander.kellner@in2code.de>, in2code.
+ * @package    TYPO3
+ * @subpackage tx_powermailcond_ajaxWriteInSession_eid
+ */
+class Tx_PowermailCond_Utility_EidGetFieldlist extends tslib_pibase {
+
+       /**
+        * Extension Key
+        *
+        * @var string
+        */
+       public $extKey = 'powermail_cond';
+
+       /**
+        * Prefix ID for Plugin Vars
+        *
+        * @var string
+        */
+       public $prefixId = 'tx_powermailcond_pi1';
+
+       /**
+        * Plugin Vars
+        *
+        * @var array
+        */
+       public $piVars;
+
+       /**
+        * Return list with fields which are not allowed (should be hidden)
+        *
+        * @return      string  $content:       commaseparated field list (1,2,3)
+        *                                                              complex list could be:
+        *                                                              filter:12:option1;option2,12,13,fieldset:2:18;19
+        *                                                              explanation - filter select.uid12, hide uid12, hide uid3, hide fieldset uid2 and clear uid18 and uid19
+        */
+       public function main() {
+               $content = '';
+               $this->cObj = $this->getCObj(); // enable TSFE globals
+               $conditions = $this->getConditionsFromForm($this->piVars['formUid']); // get related conditions
+               $targetFields = $this->div->getStartFields($conditions); // get all startfields in an array
+               if ($this->piVars['uid'] > 0 && !in_array($this->piVars['uid'], $targetFields)) { // if current field uid given and this
+                       return 'nochange';
+               }
+
+               foreach ((array) $conditions as $conf) { // one loop for every single target field
+                       $content .= $this->checkRules($conf) . ','; // add list to content object
+               }
+
+               $content = rtrim($content, ','); // remove last ,
+               $content = t3lib_div::uniqueList($content); // remove double values
+
+               return $content;
+       }
+
+       /**
+        * Preflight function checks the rules if there should be an action (show/hide) or not
+        *
+        * @param       array   $conf: Configuration of current field
+        * @return      boolean true:hide false:show(nothing)
+        */
+       public function checkRules($conf) {
+               $content = '';
+               $do = 0; // start with 0
+               if ($conf[0]['conjunction'] == 'AND') {
+                       $do = 1; // start with 1
+               }
+
+               foreach ((array) $conf as $key => $subconf) { // one loop for every rule of current target field
+                       $ttcontentUid = $this->div->getTtcontentUid($conf[$key]['startField']);
+
+                       // special case: hide a field from the beginning
+                       if ($conf[$key]['actions'] == 1) { // show
+                               $content .= $this->getFieldsFromFieldset($conf[$key]['targetField'], $ttcontentUid) . ',';
+                       }
+
+                       // operations
+                       $act = 0;
+                       $startFieldSession = $GLOBALS['TSFE']->fe_user->sesData['powermail_' . $ttcontentUid]['uid' . $conf[$key]['startField']]; // get startfield value from session
+                       if (is_array($startFieldSession)) { // if second level
+                               $startFieldSession = implode(',', $startFieldSession); // get all values in a commaseparated list
+                       }
+                       switch ($conf[$key]['ops']) {
+                               case 0: // "not empty"
+                                       if ($startFieldSession != '') { // if start field value in session is not empty
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 1: // "empty"
+                                       if ($startFieldSession == '') { // if start field value in session is empty
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 2: // "contains"
+                                       if (stristr($startFieldSession, $conf[$key]['condstring'])) { // if start field value in session contains condstring
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 3: // "not contains"
+                                       if (!stristr($startFieldSession, $conf[$key]['condstring'])) { // if start field value in session contains not condstring
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 4: // "is"
+                                       if ($startFieldSession === $conf[$key]['condstring']) { // if start field value in session === condstring
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 5: // "is not"
+                                       if ($startFieldSession !== $conf[$key]['condstring']) { // if start field value in session is not condstring
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 6: // "is greater than"
+                                       if (intval($startFieldSession) > intval($conf[$key]['condstring'])) { // if start field value in session is greater than condstring
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 7: // "is less than"
+                                       if (intval($startFieldSession) < intval($conf[$key]['condstring'])) { // if start field value in session is greater than condstring
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 8: // "contains value from field"
+                                       $comparisonFieldSession = $GLOBALS['TSFE']->fe_user->sesData['powermail_' . $ttcontentUid]['uid' . $conf[$key]['equalField']]; // get comparisonfield value from session
+                                       if (stristr($comparisonFieldSession, $startFieldSession)) {
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+
+                               case 9: // "contains not value from field"
+                                       $comparisonFieldSession = $GLOBALS['TSFE']->fe_user->sesData['powermail_' . $ttcontentUid]['uid' . $conf[$key]['equalField']]; // get comparisonfield value from session
+                                       if (!stristr($comparisonFieldSession, $startFieldSession)) {
+                                               $act = 1;
+                                               $tmp_conf = $conf[$key];
+                                       }
+                                       break;
+                       }
+
+                       $do = $this->setDo(($act ? 1 : 0), $do, $conf[$key]['conjunction']); // $do = 1;
+               }
+
+               $content = $this->doAction($do, $content, $ttcontentUid, $tmp_conf); // add new field if needed
+               return rtrim($content, ','); // return commaseparated list
+       }
+
+       /**
+        * This function return current field uid if this field should be hidden (and removes value from session)
+        *
+        * @param       boolean $do: If something should be done or not
+        * @param       string  $content: List with all fields which should be hidden
+        * @param       integer $ttcontentUid: UID of this tt_content
+        * @param       array   $conf: Configuration of current field
+        * @return      string list
+        */
+       public function doAction($do, $content, $ttcontentUid, $conf) {
+               if (!$do) {
+                       return $content;
+               }
+
+               switch ($conf['actions']) {
+                       case 0: // hide
+                               $this->div->saveInSession(array('uid' . $conf['targetField'] => ''), 'powermail_' . $ttcontentUid); // remove value from session of this field
+                               $content .= $this->getFieldsFromFieldset($conf['targetField'], $ttcontentUid, 1) . ','; // hide this field
+                               break;
+
+                       case 1: // show
+                               $content = t3lib_div::rmFromList($this->getFieldsFromFieldset($conf['targetField'], $ttcontentUid), $content); // remove from hidelist (show this field)
+                               break;
+
+                       case 2: // filter from selectbox
+                               $content .= 'filter:' . $conf['targetField'] . ':' . str_replace(',', ';', $conf['filterSelectField']);
+                               break;
+               }
+
+               return $content;
+       }
+
+       /**
+        * Set a value to 0 or 1 depending on previous value and on conjunction (AND/OR)
+        *
+        * @param       boolean $newStatus: New status
+        * @param       boolean $oldStatus: Old status
+        * @param       string  $conjunction: AND or OR
+        * @return      boolean
+        */
+       private function setDo($newStatus, $oldStatus = 0, $conjunction = 'OR') {
+               //t3lib_div::debug(array($newStatus, $oldStatus), $conjunction);
+               if ($conjunction == 'OR') {
+                       if ($newStatus || $oldStatus) {
+                               return 1;
+                       } else {
+                               return 0;
+                       }
+               } elseif ($conjunction == 'AND') {
+                       if ($newStatus && $oldStatus) {
+                               return 1;
+                       } else {
+                               return 0;
+                       }
+               }
+       }
+
+       /**
+        * get condition as array from current page
+        *
+        * @return      array   $arr: Array with all conditions of the current page
+        */
+       private function getConditionsFromForm($formUid) {
+               $arr = array();
+               $select = '
+                               tx_powermailcond_domain_model_condition.targetField, tx_powermailcond_domain_model_condition.actions, tx_powermailcond_domain_model_condition.conjunction,
+                               tx_powermailcond_domain_model_condition.filterSelectField, tx_powermailcond_domain_model_rule.startField, tx_powermailcond_domain_model_rule.ops,
+                               tx_powermailcond_domain_model_rule.condstring, tx_powermailcond_domain_model_rule.equalField
+               ';
+               $from = '
+                       tx_powermailcond_domain_model_condition
+                       LEFT JOIN tx_powermailcond_domain_model_rule ON tx_powermailcond_domain_model_condition.uid = tx_powermailcond_domain_model_rule.conditions
+               ';
+               $where = (intval($formUid) ? 'tx_powermailcond_domain_model_condition.form = ' . intval($formUid) : '1') . $this->cObj->enableFields('tx_powermailcond_domain_model_condition') . $this->cObj->enableFields('tx_powermailcond_domain_model_rule');
+               $groupBy = 'tx_powermailcond_domain_model_rule.uid';
+               $orderBy = '';
+               $limit = 1000;
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $from, $where, $groupBy, $orderBy, $limit);
+               if ($res) { // If there is a result
+                       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // One loop for every rule on current page
+                               $arr[$row['targetField']][] = $row;
+                       }
+
+                       return $arr;
+               }
+       }
+
+       /**
+        * Get all fields in a commaseparated list from a fieldset uid
+        *
+        * @param       integer $uid: Fieldset UID
+        * @param       integer $ttcontentUid: UID of this tt_content
+        * @param       boolean $clearSession: Clear cache of each of this fields
+        * @return      string  $list: Commaseparated List with field uids
+        */
+       private function getFieldsFromFieldset($uid, $ttcontentUid, $clearSession = 0) {
+               if (is_numeric($uid)) { // if this uid don't contains fs (for fs123)
+                       return $uid;
+               }
+
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery (
+                       'tx_powermail_fields.uid',
+                       'tx_powermail_fieldsets LEFT JOIN tx_powermail_fields ON tx_powermail_fieldsets.uid = tx_powermail_fields.fieldset',
+                       $where = 'tx_powermail_fieldsets.uid = ' . intval(str_replace('fieldset:', '', $uid)),
+                       $groupBy = '',
+                       $orderBy = '',
+                       $limit = '1000'
+               );
+               if ($res) { // If there is a result
+                       $uids = '';
+                       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // One loop for every field
+                               $uids .= $row['uid'] . ';';
+                               $this->div->saveInSession(array('uid' . $row['uid'] => ''), 'powermail_' . $ttcontentUid); // remove value from session of this field
+                       }
+               }
+
+               if (!isset($uids)) {
+                       return $uid;
+               }
+
+               return $uid . ':' . substr($uids, 0, -1); // return without last ;
+       }
+
+       /**
+        * Initialize cObj and TSFE Globals
+        *
+        * @return      object  cObj
+        */
+       private function getCObj() {
+               $this->piVars = t3lib_div::_GET($this->prefixId);
+               $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, 0, 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');
+       }
+
+}
+
+if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/powermail_cond/lib/class.tx_powermailcond_ajaxFieldList_eid.php'])    {
+       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/powermail_cond/lib/class.tx_powermailcond_ajaxFieldList_eid.php']);
+}
+
+$SOBE = t3lib_div::makeInstance('Tx_PowermailCond_Utility_EidGetFieldlist'); // make instance
+echo $SOBE->main(); // print content
+?>
\ No newline at end of file
index dd3c952..8208313 100644 (file)
@@ -1,5 +1,5 @@
 jQuery(document).ready(function() {
-       base = $('base').attr('href');
+       base = getBaseUrl();
        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
        }
@@ -20,7 +20,7 @@ function checkConditions(uid) {
        $.ajax({
                type: 'GET', // type
                url: url, // send to this url
-               data: 'eID=' + 'powermailcond_getFieldStatus' + params, // add params
+               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
@@ -29,6 +29,7 @@ function checkConditions(uid) {
                        document.body.style.cursor = 'auto'; // normal cursor
                },
                success: function(data) { // return values
+                       $('form.powermail_form').append(data);
 //                     if (data != 'nochange') {
 //                             $('.powermail_select option').show(); // show all options at the beginning
 //                             $('.powermail_select option').removeAttr('disabled'); // enable all options at the beginning
@@ -46,4 +47,17 @@ function checkConditions(uid) {
                        $('form.powermail_form').append('Error in PowermailCond.js in checkCondtions function by opening the given url');
                }
        });
+}
+
+/**
+ * Read BaseUrl
+ *
+ * @return string      BaseUrl from Tag in DOM
+ */
+function getBaseUrl() {
+       var base = $('base').attr('href');
+       if (!base || base == undefined) {
+               base = '';
+       }
+       return base;
 }
\ No newline at end of file
index 7c7e8e6..960f94a 100644 (file)
@@ -16,7 +16,7 @@ $TYPO3_CONF_VARS['EXTCONF']['cms']['db_layout']['addTables']['tx_powermailcond_c
 //$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['powermailcond_saveToSession'] = 'EXT:powermail_cond/lib/class.tx_powermailcond_ajaxWriteInSession_eid.php';
 
 // EID for telling jQuery which values are allowed and which not (via AJAX)
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['powermailcond_getFieldStatus'] = 'EXT:powermail_cond/lib/class.tx_powermailcond_ajaxFieldList_eid.php';
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['powermailcond_getFieldStatus'] = 'EXT:powermail_cond/Classes/Utility/EidGetFieldlist.php';
 
 // Hook to add a pid container
 //$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['powermail']['PM_FormWrapMarkerHook'][] = 'EXT:powermail_cond/lib/class.tx_powermailcond_pidContainer.php:tx_powermailcond_pidContainer';