* add defines for IGNET parts
authorWilfried Göesgens <willi@citadel.org>
Sat, 31 Jul 2010 18:49:34 +0000 (18:49 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 31 Jul 2010 18:49:34 +0000 (18:49 +0000)
 * shared_room_add needs to iterate over the available configured remote nodes, as display_ignetconf/aide_ignetconf_section do
 * shared_room_add: add ID to the table column, so we can later find it
 * shared_room_removal: here I need some help, some little js code to hide the matching column in the add-table.

libcitadel/lib/libcitadel.h
webcit/roomops.c
webcit/static/t/room/edit/shared_room_add.html
webcit/static/t/room/edit/shared_room_removal.html
webcit/static/t/room/edit/tab_share.html

index 998a76d269474c33ca318fba0dcb6cd99610ec28..3949e87525149948b8db4490940ef84946b09073 100644 (file)
@@ -68,7 +68,7 @@ enum RoomNetCfg {
        maxRoomNetCfg
 };
 
-enum GNET_POP3_PARTS { /* pop3client split into these columns: */
+enum GNET_POP3_PARTS { /* pop3client splits into these columns: */
        GNET_POP3_HOST = 1,
        GNET_POP3_USER = 2,
        GNET_POP3_PASS = 4,
@@ -76,6 +76,10 @@ enum GNET_POP3_PARTS { /* pop3client split into these columns: */
        GNET_POP3_INTERVAL = 5
 };
 
+enum GNET_PUSH_SHARE { /* ignet_push_share splits into these columns: */
+       GNET_IGNET_NODE = 1,
+       GNET_IGNET_ROOM = 2
+};
 
 typedef enum __GPEXWhichPolicy {
        roompolicy,
index b8c6d1e078ee2108315a40aed9b7888db9938ed3..6305ea00df5dfca05b428694510fea0de14af4d3 100644 (file)
@@ -3535,6 +3535,10 @@ InitModule_ROOMOPS
 
        /* GNET types: */
        REGISTERTokenParamDefine(ignet_push_share);
+       { /* these are the parts of an IGNET push config */
+               REGISTERTokenParamDefine(GNET_IGNET_NODE);
+               REGISTERTokenParamDefine(GNET_IGNET_ROOM);
+       }
        REGISTERTokenParamDefine(listrecp);
        REGISTERTokenParamDefine(digestrecp);
        REGISTERTokenParamDefine(pop3client);
index a9e5a8b38f2105a6bdfe21a31bec9ae9b0bcfcf9..1d5a6d6ba706126d7eb3a0a2fb5376c5645b6fd3 100644 (file)
@@ -1,10 +1,10 @@
 <form method="post" action="netedit">
        <input type="hidden" name="nonce" value="<?NONCE>" />
-       <tr>   
-               <td><?CONTEXTARR(#"NODE","X")></td>
+       <tr id="ignet_share_node_add__<?CFG:IGNET:NODE("U")>">
+               <td><?CFG:IGNET:NODE("X")></td>
                <td><input type="input" name="suffix" maxlength="128" /></td>
                <td>
-                       <input type="hidden" name="line" value="ignet_push_share|<?CONTEXTARR(#"NODE","U")>|" /> 
+                       <input type="hidden" name="line" value="ignet_push_share|<?CFG:IGNET:NODE("U")>|" /> 
                        <input type="hidden" name="tab" value="sharing" />
                        <input type="hidden" name="cmd" value="add" />
                        <input type="submit" name="add_button" value="<?_("Share")>" />
index 2b207e55a0f0ed91a297a6d85f8b22eab4db977d..5dd132c09ff23ee2b05207d1478d3109742a5edf 100644 (file)
@@ -1,10 +1,19 @@
+<script type="text/javascript">
+/*
+TODO: hide from the other table the column with this ID:
+ignet_share_node_add__<?CONTEXTARR(#"GNET_IGNET_NODE", "U")>
+*/
+</script>
 <form method="post" action="netedit">
        <input type="hidden" name="nonce" value="<?NONCE>" />
        <tr>
-               <td><?CONTEXTARR(#"CFG:IGNET:NODE")></td>
-               <td><?CONTEXTARR(#"REMOTE_ROOM")></td>
+               <td><?CONTEXTARR(#"GNET_IGNET_NODE")></td>
+               <td><?CONTEXTARR(#"GNET_IGNET_ROOM")></td>
                <td>
-                       <input type="hidden" name="line" value="ignet_push_share|<?CONTEXTARR(#"NODE", "U")>|<?CONTEXTARR(#"REMOTE_ROOM", "U")> />
+                       <input type="hidden" 
+                              name="line" 
+                              value="ignet_push_share|<?CONTEXTARR(#"GNET_IGNET_ROOM", "U")>|<?CONTEXTARR(#"GNET_IGNET_ROOM", "U")>"
+                       />
                        <input type="hidden" name="tab" value="sharing" />
                        <input type="hidden" name="cmd" value="remove" />
                        <input type="submit" name="unshare_button" value="<?_("Unshare")>" />
index c74662ce382ce381ad597a35e9969f9e23d1c13a..5568c02ecd2be7febb05b23f949f5d099e44fb58 100644 (file)
@@ -22,7 +22,7 @@
                                                <td><?_("Remote room name")></td>
                                                <td><?_("Actions")></td>
                                        </tr>
-                                       <?ITERATE("ITERATE:THISROOM:GNET", ="room_edit_shared_room_add", 0, 0, -1, #"ignet_push_share")>
+                                       <?ITERATE("NODECONFIG", ="room_edit_shared_room_add")>
                                </table>
                        </td>
                </tr>