1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00
phorge-phorge/webroot/rsrc/js/application/conpherence/behavior-pontificate.js
Bob Trahan 2373185e9b Conpherence - introduce ConpherenceThreadManager
Summary:
Ref T7014. Fixes T7473. This adds a class to handle thread state about what thread is loaded and what transaction we've seen last. It is deployed 100% in the durable column and only partially deployed in the regular view. Future diff(s) should clean up regular view. Note ConpherenceThreadManager API might change a bit at that time.

Also includes a bonus bug fix so logged out users can't toggle this column

Test Plan: tried to use durable column while logged out and nothing happened. sent messages, aphlict-received messages, added people, and changed title from both views

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7473, T7014

Differential Revision: https://secure.phabricator.com/D12029
2015-03-10 12:20:29 -07:00

25 lines
605 B
JavaScript

/**
* @provides javelin-behavior-conpherence-pontificate
* @requires javelin-behavior
* javelin-dom
* javelin-util
* javelin-workflow
* javelin-stratcom
* conpherence-thread-manager
*/
JX.behavior('conpherence-pontificate', function() {
var onsubmit = function(e) {
e.kill();
var form = e.getNode('tag:form');
var threadManager = JX.ConpherenceThreadManager.getInstance();
threadManager.sendMessage(form, {});
};
JX.Stratcom.listen(
['submit', 'didSyntheticSubmit'],
'conpherence-pontificate',
onsubmit);
});