]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
YammerImport admin UI now auto-refreshes during running BG progress, whee
authorBrion Vibber <brion@pobox.com>
Tue, 28 Sep 2010 22:54:44 +0000 (15:54 -0700)
committerBrion Vibber <brion@pobox.com>
Tue, 28 Sep 2010 22:54:44 +0000 (15:54 -0700)
plugins/YammerImport/lib/yammerprogressform.php

index add8d9ab2f39005be942db6b6153da10cc74000e..9bf8332261a383a150eb6fd79647b4561a25744e 100644 (file)
@@ -19,7 +19,16 @@ class YammerProgressForm extends Form
      */
     function formClass()
     {
-        return 'form_settings';
+        $classes = array('form_settings');
+        $runner = YammerRunner::init();
+        if ($runner->lastError()) {
+            $classes[] = 'import-error';
+        } else if ($runner->state() == 'done') {
+            $classes[] = 'import-done';
+        } else {
+            $classes[] = 'import-progress';
+        }
+        return implode(' ', $classes);
     }
 
     /**