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

.idea/misc.xml
.idea/workspace.xml
Resources/Public/Js/PowermailCond.js
doc/manual.sxw [new file with mode: 0644]
oldDoc/manual.sxw [deleted file]

index ec615b9..2d7e672 100644 (file)
   </component>\r
   <component name="ProjectRootManager" version="2" />\r
   <component name="SvnBranchConfigurationManager">\r
+    <option name="myConfigurationMap">\r
+      <map>\r
+        <entry key="$PROJECT_DIR$">\r
+          <value>\r
+            <SvnBranchConfiguration>\r
+              <option name="trunkUrl" value="https://svn.typo3.org/TYPO3v4/Extensions/powermail_cond/trunk" />\r
+            </SvnBranchConfiguration>\r
+          </value>\r
+        </entry>\r
+      </map>\r
+    </option>\r
     <option name="mySupportsUserInfoFilter" value="true" />\r
   </component>\r
 </project>\r
index a42bc16..c8b3919 100644 (file)
@@ -2,12 +2,21 @@
 <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/EidReadSession.php" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldFiles\js\powermail_cond.js" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldFiles\static\constants.txt" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldFiles\static\setup.txt" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldLib\class.tx_powermailcond_ajaxFieldList_eid.php" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldLib\class.tx_powermailcond_ajaxWriteInSession_eid.php" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldLib\class.tx_powermailcond_div.php" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldLib\class.tx_powermailcond_fields_be.php" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldLib\class.tx_powermailcond_pidContainer.php" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldFiles\js" afterPath="" />\r
+      <change type="DELETED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldFiles\static" afterPath="" />\r
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />\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/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
+      <change type="MOVED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldDoc\manual.sxw" afterPath="$PROJECT_DIR$/doc/manual.sxw" />\r
+      <change type="MOVED" beforePath="C:\Users\einpraegsam\PhpstormProjects\powermail_cond@powermailt347.in2code.de\oldDoc" afterPath="$PROJECT_DIR$/doc" />\r
     </list>\r
     <ignored path="powermail_cond@powermailt347.in2code.de.iws" />\r
     <ignored path=".idea/workspace.xml" />\r
@@ -32,7 +41,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="9" column="12" selection-start="455" selection-end="455" vertical-scroll-proportion="0.0">\r
+            <state line="219" column="2" selection-start="7653" selection-end="7653" vertical-scroll-proportion="-148.92">\r
               <folding />\r
             </state>\r
           </provider>\r
@@ -41,7 +50,7 @@
       <file leaf-file-name="EidSaveInSession.php" pinned="false" current="false" current-in-tab="false">\r
         <entry file="file://$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="68" column="65" selection-start="2082" selection-end="2140" vertical-scroll-proportion="-8.269231">\r
+            <state line="61" column="33" selection-start="1888" selection-end="1888" vertical-scroll-proportion="-3.6923077">\r
               <folding>\r
                 <element signature="e#1285#1516#0" expanded="false" />\r
               </folding>\r
           </provider>\r
         </entry>\r
       </file>\r
-      <file leaf-file-name="EidReadSession.php" pinned="false" current="true" current-in-tab="true">\r
+      <file leaf-file-name="EidReadSession.php" pinned="false" current="false" current-in-tab="false">\r
         <entry file="file://$PROJECT_DIR$/Classes/Utility/EidReadSession.php">\r
           <provider selected="true" editor-type-id="text-editor">\r
-            <state line="65" column="0" selection-start="2074" selection-end="2074" vertical-scroll-proportion="0.57127196">\r
+            <state line="73" column="6" selection-start="2262" selection-end="2262" vertical-scroll-proportion="-25.26923">\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
+      <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="9" selection-start="2563" selection-end="2563" vertical-scroll-proportion="-22.0">\r
+            <state line="25" column="0" selection-start="986" selection-end="986" vertical-scroll-proportion="0.64705884">\r
               <folding>\r
                 <element signature="e#6#984#0" expanded="true" />\r
               </folding>\r
         <option value="$PROJECT_DIR$/ext_emconf.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/Div.php" />\r
         <option value="$PROJECT_DIR$/Classes/Utility/EidReadSession.php" />\r
+        <option value="$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js" />\r
       </list>\r
     </option>\r
   </component>\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
             <PATH_ELEMENT>\r
-              <option name="myItemId" value="oldFiles" />\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="oldFiles" />\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
-          <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="Classes" />\r
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
             </PATH_ELEMENT>\r
-            <PATH_ELEMENT>\r
-              <option name="myItemId" value="Utility" />\r
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />\r
-            </PATH_ELEMENT>\r
           </PATH>\r
         </subPane>\r
       </pane>\r
       <created>1350471950102</created>\r
       <updated>1350471950102</updated>\r
     </task>\r
-    <option name="localTasksCounter" value="7" />\r
+    <task id="LOCAL-00007" summary="Working Copy">\r
+      <created>1350476011103</created>\r
+      <updated>1350476011103</updated>\r
+    </task>\r
+    <option name="localTasksCounter" value="8" />\r
     <servers />\r
   </component>\r
   <component name="ToolWindowManager">\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="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="true" 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.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.14727855" sideWeight="0.67082036" order="0" side_tool="false" content_ui="combo" />\r
     <breakpoint-manager />\r
   </component>\r
   <component name="editorHistoryManager">\r
-    <entry file="file://$PROJECT_DIR$/ext_tables.php">\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
-      </provider>\r
-    </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/FieldlistingBackend.php">\r
-      <provider selected="true" editor-type-id="text-editor">\r
-        <state line="32" column="50" selection-start="1196" selection-end="1240" vertical-scroll-proportion="0.114035085" />\r
-      </provider>\r
-    </entry>\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="0" column="0" selection-start="0" selection-end="12383" vertical-scroll-proportion="-0.0" />\r
-      </provider>\r
-    </entry>\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
         <state line="0" column="0" selection-start="0" selection-end="30724" vertical-scroll-proportion="0.0" />\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_div.php">\r
-      <provider selected="true" editor-type-id="text-editor">\r
-        <state line="106" column="5" selection-start="1219" selection-end="3352" vertical-scroll-proportion="0.7576754" />\r
-      </provider>\r
-    </entry>\r
     <entry file="file://D:/SVN/powermail@forge/ext_tables.sql">\r
       <provider selected="true" editor-type-id="text-editor">\r
         <state line="44" column="44" selection-start="1420" selection-end="1451" vertical-scroll-proportion="0.090618335" />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/oldLib/class.tx_powermailcond_ajaxWriteInSession_eid.php">\r
-      <provider selected="true" editor-type-id="text-editor">\r
-        <state line="0" column="0" selection-start="0" selection-end="5031" 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
-      <provider selected="true" editor-type-id="text-editor">\r
-        <state line="0" column="17" selection-start="17" selection-end="17" vertical-scroll-proportion="0.0">\r
-          <folding />\r
-        </state>\r
-      </provider>\r
-    </entry>\r
     <entry file="file://$PROJECT_DIR$/Classes/Utility/EidGetFieldlist.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
         <state line="74" column="36" selection-start="2518" selection-end="2518" vertical-scroll-proportion="0.2246941">\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/EidReadSession.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="9" column="12" selection-start="455" selection-end="455" vertical-scroll-proportion="0.0">\r
+        <state line="73" column="6" selection-start="2262" selection-end="2262" vertical-scroll-proportion="-25.26923">\r
           <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
     <entry file="file://$PROJECT_DIR$/Classes/Utility/EidSaveInSession.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="68" column="65" selection-start="2082" selection-end="2140" vertical-scroll-proportion="-8.269231">\r
+        <state line="61" column="33" selection-start="1888" selection-end="1888" vertical-scroll-proportion="-3.6923077">\r
           <folding>\r
             <element signature="e#1285#1516#0" expanded="false" />\r
           </folding>\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
+    <entry file="file://$PROJECT_DIR$/Resources/Public/Js/PowermailCond.js">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="85" column="9" selection-start="2563" selection-end="2563" vertical-scroll-proportion="-22.0">\r
-          <folding>\r
-            <element signature="e#6#984#0" expanded="true" />\r
-          </folding>\r
+        <state line="219" column="2" selection-start="7653" selection-end="7653" vertical-scroll-proportion="-148.92">\r
+          <folding />\r
         </state>\r
       </provider>\r
     </entry>\r
-    <entry file="file://$PROJECT_DIR$/Classes/Utility/EidReadSession.php">\r
+    <entry file="file://$PROJECT_DIR$/Classes/Utility/Div.php">\r
       <provider selected="true" editor-type-id="text-editor">\r
-        <state line="65" column="0" selection-start="2074" selection-end="2074" vertical-scroll-proportion="0.57127196">\r
-          <folding />\r
+        <state line="25" column="0" selection-start="986" selection-end="986" vertical-scroll-proportion="0.64705884">\r
+          <folding>\r
+            <element signature="e#6#984#0" expanded="true" />\r
+          </folding>\r
         </state>\r
       </provider>\r
     </entry>\r
index f276dfc..20aadf7 100644 (file)
@@ -13,6 +13,11 @@ jQuery(document).ready(function() {
                success: function(data) { // return values
                        if (data) { // if there is a response
                                $('form.powermail_form').append(data);
+                               var sets = data.split(';');
+                               for (var i=0; i < sets.length; i++) { // for each field which should be filled
+                                       var tmp_value = sets[i].split(':');
+                                       fieldValue(tmp_value[0], tmp_value[1]);
+                               }
                        }
                }
        });
@@ -44,6 +49,21 @@ jQuery(document).ready(function() {
 });
 
 /**
+ * Fill a field with a value
+ *
+ * @param int fieldUid         Field Uid
+ * @param int fieldValue               Field Value
+ */
+function fieldValue(fieldUid, fieldValue) {
+       $('.powermail_field[name="tx_powermail_pi1[field][' + fieldUid + ']"]').val(fieldValue); // select, input, textarea
+       $('.powermail_radio[name="tx_powermail_pi1[field][' + fieldUid + ']"], .powermail_checkbox_' + fieldUid).each(function() { // radio, check
+               if ($(this).attr('value') == fieldValue) {
+                       $(this).attr('checked', 'checked');
+               }
+       })
+}
+
+/**
  * Main function to check conditions and do something (if necessary)
  *
  * @param      integer uid: Field uid (if available)
@@ -197,16 +217,15 @@ function getBaseUrl() {
 
 /**
  * Clear session of a uid
- * TODO
  *
  * @param      integer uid: uid of the element
  * @return     void
  */
 function clearSession(uid) {
-       var pid = 5;
        var url = base + '/index.php';
+       var formUid = $('input[name="tx_powermail_pi1[form]"]').val(); // form uid
        var timestamp = Number(new Date()); // timestamp is needed for a internet explorer workarround (always change a parameter)
-       var params = 'eID=' + 'powermailcond_saveToSession' + '&id=' + pid + '&tx_powermailcond_pi1[uid]=' + uid + '&tx_powermailcond_pi1[value]=&ts=' + timestamp;
+       var params = 'eID=' + 'powermailcond_saveToSession' + '&tx_powermailcond_pi1[form]=' + formUid + '&tx_powermailcond_pi1[uid]=' + uid + '&tx_powermailcond_pi1[value]=&ts=' + timestamp;
 
        $.ajax({
                type: 'GET', // type
@@ -215,8 +234,7 @@ function clearSession(uid) {
                cache: false, // disable cache (for ie)
                success: function(data) { // return values
                        if (data != '') { // if there is a response
-                               //alert(data); // alert the response
-                               $('form.tx_powermail_pi1_form').append('Error in powermail_cond.js in clearSession function:' + data);
+                               $('form.powermail_form').append('Error in powermail_cond.js in clearSession function:' + data);
                        }
                        checkConditions(uid); // check if something should be changed
                }
diff --git a/doc/manual.sxw b/doc/manual.sxw
new file mode 100644 (file)
index 0000000..1d9116d
Binary files /dev/null and b/doc/manual.sxw differ
diff --git a/oldDoc/manual.sxw b/oldDoc/manual.sxw
deleted file mode 100644 (file)
index 1d9116d..0000000
Binary files a/oldDoc/manual.sxw and /dev/null differ