Use RedBox instead of Glow library for Quick Add dialog
authorChuck Hagenbuch <chuck@horde.org>
Sat, 2 Oct 2010 21:42:34 +0000 (17:42 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 2 Oct 2010 21:44:16 +0000 (17:44 -0400)
nag/lib/Application.php
nag/templates/common-header.inc
nag/themes/screen.css

index b217256..45429e0 100644 (file)
@@ -88,7 +88,8 @@ class Nag_Application extends Horde_Registry_Application
              $injector->getInstance('Horde_Perms')->hasAppPermission('max_tasks') > Nag::countTasks())) {
             $menu->add(Horde::url('task.php')->add('actionID', 'add_task'), _("_New Task"), 'add.png', null, null, null, Horde_Util::getFormData('task') ? '__noselection' : null);
             if ($GLOBALS['browser']->hasFeature('dom')) {
-                $menu->add(new Horde_Url(''), _("_Quick Add"), 'add.png', null, null, 'Nag.quickAddPanel.show(); $(\'quickText\').focus(); return false;', Horde_Util::getFormData('task') ? 'quickAdd __noselection' : 'quickAdd');
+                Horde::addScriptFile('redbox.js', 'horde', true);
+                $menu->add(new Horde_Url(''), _("_Quick Add"), 'add.png', null, null, 'RedBox.showInline(\'quickAddInfoPanel\'); $(\'quickText\').focus(); return false;', Horde_Util::getFormData('task') ? 'quickAdd __noselection' : 'quickAdd');
             }
         }
 
index e3e8118..2abfc8c 100644 (file)
@@ -26,22 +26,14 @@ $bc = $prefs->getValue('show_panel')
 <link href="<?php echo Horde_Themes::img('favicon.ico', array('nohorde' => true)) ?>" rel="SHORTCUT ICON" />
 <?php Horde_Themes::includeStylesheetFiles() ?>
 <link href="<?php echo Horde::url('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
-<script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/core/core.js" type="text/javascript"></script>
-<script src="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/widgets/widgets.js" type="text/javascript"></script>
-<link href="<?php echo $GLOBALS['registry']->get('jsuri', 'horde') ?>/glow/1.5.1/widgets/widgets.css" type="text/css" rel="stylesheet" />
 <script type="text/javascript">
 var Nag = {};
-
-glow.ready(function() {
-    $('quickAddInfoPanel').style.display = 'block';
-    Nag.quickAddPanel = new glow.widgets.InfoPanel('#quickAddInfoPanel', { context: '.quickAdd', pointerPosition: 't' });
-});
 </script>
 </head>
 
 <body<?php if ($bc) echo ' class="' . $bc . '"' ?>>
 
-<div id="quickAddInfoPanel" style="display:none;">
+<div id="quickAddInfoPanel" class="quickAddInfoPanel" style="display:none;">
  <h2><?php echo _("Quick Task Creation") ?></h2>
  <form method="post" action="quick.php">
   <p><?php echo _("Enter one task per line. Create child tasks by indenting them below their parent task. Include due dates like \"laundry tomorrow\" or \"get dry cleaning next Thursday\".") ?></p>
index c8b11c0..0ca98bc 100644 (file)
     padding: 2px 4px;
 }
 
-#quickAddInfoPanel textarea {
+/* Redbox styles. */
+#RB_window {
+    top: 50px !important;
+}
+.quickAddInfoPanel {
+    width: 30em;
+    padding: 1em;
+    border: 1px solid #ccc;
+    background: #ffc;
+}
+.quickAddInfoPanel textarea {
     width: 100%;
     height: 10em;
     margin-top: .5em;
 }
-#quickAddInfoPanel p {
+.quickAddInfoPanel p {
     margin-top: .5em;
     margin-bottom: .5em;
 }