Browse Source

After inspecting the html files, two tiny but apparently significant
bugs fixed:
1. one html attribute was finished with an : instead of an = (name:
instead of name= in an <input field).
2. when concatenating html strings, I forgot to put a space between
the lines, resulting in something like "value=fooname=bar"

now the http-params of the edit-task form are send apparently
correctly by elnode in the call to /save-edits, the elnode-dispatcher
is called, but elnode drops before reaching the handler function for
/save-edits. is that related to the ^M dos line endings in the http params?

tj 8 years ago
parent
commit
643495a4f7

+ 8 - 4
controller/bugpile-controller.el

@@ -27,8 +27,10 @@
 (defun bugpile-controller-dispatcher-handler (httpcon)
   "Dispatch requests to the Bugpile application."
   (elnode-log-access "bugpile-controller" httpcon)
-  (message "dispatcher elnode-params: %s"
-           (elnode-http-params httpcon))
+  (message "dispatcher elnode-params: %s, %s, %s"
+           (elnode-http-params httpcon)
+           (elnode-http-pathinfo httpcon)
+           (elnode-http-query httpcon))
   (elnode-dispatcher httpcon
                      (iorg-projects-get-project-urls "bugpile")))
 
@@ -130,8 +132,10 @@ process user edits, and present the modified task to the user."
 (defun bugpile-controller-save-edits-handler (httpcon)
   "Save the modified object data."
   (elnode-log-access "bugpile-controller" httpcon)
-  (message "save-edits elnode-params: %s"
-           (elnode-http-params httpcon))
+  (message "save-edits elnode-params: %s, %s, %s"
+           (elnode-http-params httpcon)
+           (elnode-http-pathinfo httpcon)
+           (elnode-http-query httpcon))
   (let ((view-id "e704e837-62f8-485d-8532-9ca0b6a04ad0")
         (obj-id "2f822a1e-4bb4-43be-bec4-b0c5caaa42a5")
         (prop (elnode-http-param httpcon 'simple-prop))

+ 3 - 3
iorg/lisp/iorg-html.el

@@ -97,7 +97,7 @@ the HEADLINE and INFO arguments"
            (member todo org-todo-keywords-for-agenda))
       (format "%s%s%s"
               (concat "<span class=\"selectbox\">"
-                      "<select name:\"simple-todo\" size=\"1\">"
+                      "<select name=\"simple-todo\" size=\"1\">"
                       ;; FIXME generate unique value
                       "<option value=\"1\" selected>")
               todo
@@ -350,7 +350,7 @@ is an optional list of prefix strings.
                           "<tr>"
                           "<td>%s</td>"
                           ;; FIXME generate unique names
-                          "<td><input type=\"text\" name=\"simple-prop\""
+                          "<td><input type=\"text\" name=\"simple-prop\" "
                           "size=\"40\" maxlength=\"80\" value=\"%s\">"
                           "</input></td>"
                           "</tr>")
@@ -361,7 +361,7 @@ is an optional list of prefix strings.
                "")
               (format
                (concat
-                "<textarea class=\"textarea\" name=\"simple-section\""
+                "<textarea class=\"textarea\" name=\"simple-section\" "
                 "cols=\"80\" rows=\"35\">%s</textarea>")
                (iorg-html--get-org-input
                 section info prop-drawer))))))

+ 1 - 1
iorg/lisp/iorg-projects.el

@@ -17,7 +17,7 @@
 ;;; Other stuff we need
 ;; remember this directory
 (setq iorg-projects-dir
-      (expand-file-name
+      (expand-qfile-name
        (file-name-directory
         (directory-file-name
          (file-name-directory

+ 2 - 2
objects/bug-obj.org

@@ -34,10 +34,10 @@
   :END:
 
 
-* TODO bug                                                     :iorg:dee:doo:
+* TODO bug                                                             :iorg:
   :PROPERTIES:
   :COLUMNS:  %40ITEM(Task) %TODO %task-author %task-opened %task-project %bug-need-skills %TAGS
-  :object-foo: whats up
+  :object-foo:
   :html-form: http://localhost:8008/save-edits
   :html-button-value: submit
   :html-button-name: 2f822a1e-4bb4-43be-bec4-b0c5caaa42a5

+ 3 - 3
view/bugpile-view-edit-task.html

@@ -8,7 +8,7 @@
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
 <meta name="title" content="Bugpile - Edit Task"/>
 <meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2012-07-10 20:19:16 CEST"/>
+<meta name="generated" content="2012-07-10 23:48:47 CEST"/>
 <meta name="author" content="nil"/>
 <meta name="description" content="nil"/>
 <meta name="keywords" content="nil"/>
@@ -132,8 +132,8 @@
 
 <div id="outline-container-2f822a1e-4bb4-43be-bec4-b0c5caaa42a5" class="outline-2"><form method=post action="http://localhost:8008/save-edits">
 
-<h2 id="2f822a1e-4bb4-43be-bec4-b0c5caaa42a5"><a id="sec-" name="sec-"></a><span class="selectbox"><select name:"simple-todo" size="1"><option value="1" selected>TODO</option><option>NEXT</option><option>DONE</option><option>WAITING</option><option>HOLD</option><option>CANCELLED</option><option>PHONE</option></select></span>&nbsp;bug&nbsp;&nbsp;&nbsp;<span class="textfield"><input type="text" name="simple-tag" size="10"maxlenght="20" value=":dee:doo:"></input></span></h2>
-<table border="0"><tr><td>object-foo</td><td><input type="text" name="simple-prop"size="40" maxlength="80" value="whats up"></input></td></tr></table><textarea class="textarea" name="simple-section"cols="80" rows="35"># When changing this ID, you need to change it in
+<h2 id="2f822a1e-4bb4-43be-bec4-b0c5caaa42a5"><a id="sec-" name="sec-"></a><span class="selectbox"><select name="simple-todo" size="1"><option value="1" selected>TODO</option><option>NEXT</option><option>DONE</option><option>WAITING</option><option>HOLD</option><option>CANCELLED</option><option>PHONE</option></select></span>&nbsp;bug&nbsp;&nbsp;&nbsp;<span class="textfield"><input type="text" name="simple-tag" size="10"maxlenght="20" value=":"></input></span></h2>
+<table border="0"><tr><td>object-foo</td><td><input type="text" name="simple-prop" size="40" maxlength="80" value=""></input></td></tr></table><textarea class="textarea" name="simple-section" cols="80" rows="35"># When changing this ID, you need to change it in
 # bugpile-controller-edit-task-handler too. 
 
 Trying to change the agenda-file-list leads to problems. First, there

+ 2 - 2
view/bugpile-view-edit-task.org

@@ -39,10 +39,10 @@
 # When changing this ID, you need to change it in
 # bugpile-controller-edit-task-handler too. 
 
-* TODO bug                                                     :iorg:dee:doo:
+* TODO bug                                                             :iorg:
   :PROPERTIES:
   :COLUMNS:  %40ITEM(Task) %TODO %task-author %task-opened %task-project %bug-need-skills %TAGS
-  :object-foo: whats up
+  :object-foo:
   :html-form: http://localhost:8008/save-edits
   :html-button-value: submit
   :html-button-name: 2f822a1e-4bb4-43be-bec4-b0c5caaa42a5

+ 1 - 1
view/bugpile-view-index.html

@@ -8,7 +8,7 @@
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
 <meta name="title" content="Bugpile - A Bugtracker for Org Mode"/>
 <meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2012-07-10 20:00:42 CEST"/>
+<meta name="generated" content="2012-07-10 23:44:19 CEST"/>
 <meta name="author" content="nil"/>
 <meta name="description" content="nil"/>
 <meta name="keywords" content="nil"/>

+ 1 - 1
view/bugpile-view-search-tasklist.html

@@ -8,7 +8,7 @@
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
 <meta name="title" content="Bugpile - Search Tasklist"/>
 <meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2012-07-10 20:18:31 CEST"/>
+<meta name="generated" content="2012-07-10 23:44:42 CEST"/>
 <meta name="author" content="nil"/>
 <meta name="description" content="nil"/>
 <meta name="keywords" content="nil"/>

+ 3 - 3
view/bugpile-view-show-task.html

@@ -8,7 +8,7 @@
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
 <meta name="title" content="Bugpile - Show Task"/>
 <meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2012-07-10 20:18:43 CEST"/>
+<meta name="generated" content="2012-07-10 23:47:45 CEST"/>
 <meta name="author" content="nil"/>
 <meta name="description" content="nil"/>
 <meta name="keywords" content="nil"/>
@@ -173,7 +173,7 @@ The task in column view (is it possible to include the content text?):</p>
 <td class="right">09-07-2012</td>
 <td class="left">org-agenda</td>
 <td class="left">intermediate</td>
-<td class="left">:dee:doo:</td>
+<td class="left">&nbsp;</td>
 </tr>
 </tbody>
 </table>
@@ -184,7 +184,7 @@ The task in outline view:</p>
 </div>
 </div>
 <div id="outline-container-2f822a1e-4bb4-43be-bec4-b0c5caaa42a5" class="outline-2">
-<h2 id="2f822a1e-4bb4-43be-bec4-b0c5caaa42a5"><a id="sec-2" name="sec-2"></a><span class="todo TODO">TODO</span> bug&nbsp;&nbsp;&nbsp;<span class="tag"><span class="dee">dee</span>&nbsp;<span class="doo">doo</span></span></h2>
+<h2 id="2f822a1e-4bb4-43be-bec4-b0c5caaa42a5"><a id="sec-2" name="sec-2"></a><span class="todo TODO">TODO</span> bug</h2>
 <div class="outline-text-2" id="text-2f822a1e-4bb4-43be-bec4-b0c5caaa42a5">
 <p>
 Trying to change the agenda-file-list leads to problems. First, there

+ 12 - 5
view/bugpile-view-show-task.org

@@ -39,9 +39,9 @@
 The task in column view (is it possible to include the content text?):
 
 #+BEGIN: columnview :hlines 1 :id 2f822a1e-4bb4-43be-bec4-b0c5caaa42a5
-| Task  | TODO | task-author | task-opened | task-project | bug-need-skills | TAGS      |
-|-------+------+-------------+-------------+--------------+-----------------+-----------|
-| * bug | TODO | tj          |  09-07-2012 | org-agenda   | intermediate    | :foo:bar: |
+| Task  | TODO | task-author | task-opened | task-project | bug-need-skills | TAGS |
+|-------+------+-------------+-------------+--------------+-----------------+------|
+| * bug | TODO | tj          |  09-07-2012 | org-agenda   | intermediate    |      |
 #+END:
 
 
@@ -52,8 +52,9 @@ The task in outline view:
   :PROPERTIES:
   :COLUMNS:  %40ITEM(Task) %TODO %task-author %task-opened %task-project %bug-need-skills %TAGS
   :object-foo:
-  :html-form: iorg-controller-edit-handler
+  :html-form: http://localhost:8008/save-edits
   :html-button-value: submit
+  :html-button-name: 2f822a1e-4bb4-43be-bec4-b0c5caaa42a5
   :task-author: tj
   :task-closed: nil
   :task-opened: 09-07-2012
@@ -63,9 +64,11 @@ The task in outline view:
   :bug-is-upstream: no
   :bug-need-skills: intermediate
   :ID:       2f822a1e-4bb4-43be-bec4-b0c5caaa42a5
-  :EXPORT_OPTIONS: d:t
   :END:
 
+# When changing this ID, you need to change it in
+# bugpile-controller-edit-task-handler too. 
+
 Trying to change the agenda-file-list leads to problems. First, there
 is an error message like 'file list can't be a single directory', but
 it can. Second, the old directory and the new directory for the
@@ -75,6 +78,10 @@ new replacing the old).
 But this may not be a bug, because there might be some undetected
 configuration conflict somewhere that causes the misbehaviour.  
 
+
+
+
+
 #+END:
 
 [[http://localhost:8008/edit-task][Edit]] this task.

+ 1 - 1
view/bugpile-view-take-action-on-selected-tasks.html

@@ -8,7 +8,7 @@
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
 <meta name="title" content="Bugpile - Take Action on Selected Tasks"/>
 <meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2012-07-10 20:18:36 CEST"/>
+<meta name="generated" content="2012-07-10 23:45:12 CEST"/>
 <meta name="author" content="nil"/>
 <meta name="description" content="nil"/>
 <meta name="keywords" content="nil"/>