From 4450170790de3999dc9c6f8876074e76edee8241 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 23 Aug 2017 21:26:09 -0700 Subject: partial support (unfinished) for ajax loading cards with liveupdate; page still functions even though this isn't finished --- Zotlabs/Module/Cards.php | 5 ++--- Zotlabs/Module/Update_cards.php | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 Zotlabs/Module/Update_cards.php (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Cards.php b/Zotlabs/Module/Cards.php index f354544d5..19932769f 100644 --- a/Zotlabs/Module/Cards.php +++ b/Zotlabs/Module/Cards.php @@ -19,8 +19,7 @@ class Cards extends \Zotlabs\Web\Controller { } - - function get() { + function get($update = 0, $load = false) { if(observer_prohibited(true)) { return login(); @@ -173,7 +172,7 @@ class Cards extends \Zotlabs\Web\Controller { $items = []; } - $mode = 'channel'; + $mode = 'cards'; $content = conversation($items,$mode,false,'traditional'); diff --git a/Zotlabs/Module/Update_cards.php b/Zotlabs/Module/Update_cards.php new file mode 100644 index 000000000..bb87357e8 --- /dev/null +++ b/Zotlabs/Module/Update_cards.php @@ -0,0 +1,39 @@ + 1) && (argv(1) == 'load')) ? 1 : 0); + + header("Content-type: text/html"); + echo "
\r\n"; + + killme(); + + + $mod = new Cards(); + + $text = $mod->get($profile_uid,$load); + + /** + * reportedly some versions of MSIE don't handle tabs in XMLHttpRequest documents very well + */ + + echo str_replace("\t",' ',$text); + echo (($_GET['msie'] == 1) ? '' : ''); + echo "\r\n"; + killme(); + +} +} -- cgit v1.2.3