1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-30 16:38:21 +01:00

Fix Conphernce sometimes searching wrong room

Summary: I passed this in as a config, but need to parse it live when threads change, otherwise the wrong room could be searched.

Test Plan: Search in one room, click a second, search again, see correct results.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16707
This commit is contained in:
Chad Little 2016-10-14 09:25:15 -07:00
parent 3593be4f7b
commit 52dd354dad
3 changed files with 14 additions and 16 deletions

View file

@ -436,7 +436,7 @@ return array(
'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f', 'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f',
'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408', 'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408',
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2',
'rsrc/js/application/conpherence/behavior-conpherence-search.js' => '3bc9d2b1', 'rsrc/js/application/conpherence/behavior-conpherence-search.js' => 'dfa4e1ac',
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'c5238acb', 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'c5238acb',
'rsrc/js/application/conpherence/behavior-menu.js' => '07928ca3', 'rsrc/js/application/conpherence/behavior-menu.js' => '07928ca3',
'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8',
@ -666,7 +666,7 @@ return array(
'javelin-behavior-conpherence-menu' => '07928ca3', 'javelin-behavior-conpherence-menu' => '07928ca3',
'javelin-behavior-conpherence-participant-pane' => '8604caa8', 'javelin-behavior-conpherence-participant-pane' => '8604caa8',
'javelin-behavior-conpherence-pontificate' => 'f2e58483', 'javelin-behavior-conpherence-pontificate' => 'f2e58483',
'javelin-behavior-conpherence-search' => '3bc9d2b1', 'javelin-behavior-conpherence-search' => 'dfa4e1ac',
'javelin-behavior-countdown-timer' => 'e4cc26b3', 'javelin-behavior-countdown-timer' => 'e4cc26b3',
'javelin-behavior-dark-console' => 'f411b6ae', 'javelin-behavior-dark-console' => 'f411b6ae',
'javelin-behavior-dashboard-async-panel' => '469c0d9e', 'javelin-behavior-dashboard-async-panel' => '469c0d9e',
@ -1219,13 +1219,6 @@ return array(
'javelin-dom', 'javelin-dom',
'javelin-magical-init', 'javelin-magical-init',
), ),
'3bc9d2b1' => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-workflow',
'javelin-stratcom',
),
'3cb0b2fc' => array( '3cb0b2fc' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',
@ -2095,6 +2088,13 @@ return array(
'df5e11d2' => array( 'df5e11d2' => array(
'javelin-install', 'javelin-install',
), ),
'dfa4e1ac' => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-workflow',
'javelin-stratcom',
),
'e0ec7f2f' => array( 'e0ec7f2f' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-dom', 'javelin-dom',

View file

@ -113,11 +113,7 @@ abstract class ConpherenceController extends PhabricatorController {
->setHref('#') ->setHref('#')
->addClass('conpherence-participant-toggle')); ->addClass('conpherence-participant-toggle'));
Javelin::initBehavior( Javelin::initBehavior('conpherence-search');
'conpherence-search',
array(
'searchURI' => '/conpherence/threadsearch/'.$conpherence->getID().'/',
));
$header->addActionItem( $header->addActionItem(
id(new PHUIIconCircleView()) id(new PHUIIconCircleView())
@ -187,6 +183,7 @@ abstract class ConpherenceController extends PhabricatorController {
'action' => '/conpherence/threadsearch/'.$id.'/', 'action' => '/conpherence/threadsearch/'.$id.'/',
'sigil' => 'conpherence-search-form', 'sigil' => 'conpherence-search-form',
'class' => 'conpherence-search-form', 'class' => 'conpherence-search-form',
'id' => 'conpherence-search-form',
), ),
array( array(
$bar, $bar,

View file

@ -7,7 +7,7 @@
* javelin-stratcom * javelin-stratcom
*/ */
JX.behavior('conpherence-search', function(config) { JX.behavior('conpherence-search', function() {
var shown = true; var shown = true;
var request = null; var request = null;
@ -24,13 +24,14 @@ JX.behavior('conpherence-search', function(config) {
function _doSearch(e) { function _doSearch(e) {
e.kill(); e.kill();
var search_text = JX.$('conpherence-search-input').value; var search_text = JX.$('conpherence-search-input').value;
var search_uri = JX.$('conpherence-search-form').action;
var search_node = JX.$('conpherence-search-results'); var search_node = JX.$('conpherence-search-results');
if (request || !search_text) { if (request || !search_text) {
return; return;
} }
request = new JX.Request(config.searchURI, function(response) { request = new JX.Request(search_uri, function(response) {
JX.DOM.setContent(search_node, JX.$H(response)); JX.DOM.setContent(search_node, JX.$H(response));
request = null; request = null;
}); });