1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00

Made progress on pagination

Summary: Pagination occurs once

Test Plan: Tested on conpherences I made with myself. Lot of bugs still remain, but shows older messages in gaps of 2.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T2428

Differential Revision: https://secure.phabricator.com/D5183

Conflicts:

	src/applications/conpherence/controller/ConpherenceViewController.php
	webroot/rsrc/js/application/conpherence/behavior-menu.js
This commit is contained in:
deedydas 2013-03-29 17:51:22 -07:00 committed by epriestley
parent 3b7203dc9f
commit c29dbf8189
2 changed files with 10 additions and 7 deletions

View file

@ -1190,7 +1190,7 @@ celerity_register_resource_map(array(
),
'javelin-behavior-conpherence-menu' =>
array(
'uri' => '/res/e04bb055/rsrc/js/application/conpherence/behavior-menu.js',
'uri' => '/res/ec121ad7/rsrc/js/application/conpherence/behavior-menu.js',
'type' => 'js',
'requires' =>
array(

View file

@ -132,12 +132,15 @@ JX.behavior('conpherence-menu', function(config) {
JX.Stratcom.listen('click', 'show-older-messages', function(e) {
e.kill();
console.log(document.URL);
new JX.Request('/conpherence/view/1/', function(r) {
console.log('100');
})
.setData({offset: 100}) // get the next page
.send();
var last_offset = e.getNodeData('show-older-messages').offset;
var conf_id = e.getNodeData('show-older-messages').ID;
JX.DOM.remove(e.getNode('show-older-messages'));
var messages_root = JX.$(config.messages);
new JX.Request('/conpherence/view/'+conf_id+'/', function(r) {
var messages = JX.$H(r.messages);
JX.DOM.prependContent(messages_root,
JX.$H(messages));
}).setData({ offset: last_offset+1 }).send();
});
// select the current message