Sharing: add NSYN
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 1 Jul 2012 09:48:19 +0000 (11:48 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 1 Jul 2012 09:48:19 +0000 (11:48 +0200)
  - expose the NSYN command to the webcit room sharing interface.

webcit/static/t/room/edit/shared_room_removal.html
webcit/static/t/room/edit/tab_share.html
webcit/static/wclib.js

index 39d4e9c759238e24e8766b4b78bf647a18583f96..9d1026ec29a897f08febfffe94e322b2cf0acf66 100644 (file)
@@ -11,6 +11,7 @@
                        <input type="hidden" name="tab" value="sharing" />
                        <input type="hidden" name="cmd" value="remove" />
                        <input type="submit" name="unshare_button" value="<?_("Unshare")>" />
+                       <a href="javascript:NetworkSynchronizeRoom('<?CONTEXTSTRARR(#"GNET_IGNET_NODE", "X")>')"><img src="static/webcit_icons/essen/16x16/refresh.png" alt='<?_("resend messages to this node")>' width="16" height="16"></a>
 <script type="text/javascript">
 <?#("if we already have this room, you can't add it anymore.")>
 remove_something('ignet_share_node_add__<?CONTEXTSTRARR(#"GNET_IGNET_NODE", "U")>', "hidden");
index 5b0715eaec0e6bdcfd4d28049287d1ef74f9a207..efe04a3a668054752fb43b2d1e133bac606bbd2c 100644 (file)
@@ -38,6 +38,8 @@
                          <?_("If the remote room name is blank, it is assumed that the room name is identical on the remote node.")>
                        </li> <li>
                          <?_("If the remote room name is different, the remote node must also configure the name of the room here.")>
+                       </li> <li>
+                         (<img src="static/webcit_icons/essen/16x16/refresh.png" alt='<?_("resend messages to this node")>' width="16" height="16">)<?_("Re-sharing may stress your system and produce large spoolfiles that need to be transmitted; All messages in this room not originating from this node are re-spooled and re-sent with the next networker run.")>
                        </li>
                </ul></div>
        </div>
index ae7d20c8af1a3cc2eba3df82f3299676407c41d5..63215312651561e41a4bafb202fa8ab0cb10db5d 100644 (file)
@@ -89,6 +89,17 @@ function SMTPRunQueue()
     });
 }
 
+function NetworkSynchronizeRoom(NodeName)
+{
+    var p;
+
+    p= encodeURI('g_cmd=NSYN ' + NodeName);
+    new Ajax.Request('ajax_servcmd', {
+       method: 'post',
+       parameters: p,
+       onComplete: function(transport) { ajax_important_message(transport.responseText.substr(4));}
+    });
+}
 function ToggleVisibility ($Which)
 {
        if (document.getElementById)