From: Michael M Slusarz Date: Mon, 9 Aug 2010 20:24:32 +0000 (-0600) Subject: Horde::link -> Horde_Url#link() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1eaaddf449a13054a59ec97680d59af8a46748fb;p=horde.git Horde::link -> Horde_Url#link() --- diff --git a/imp/compose.php b/imp/compose.php index f3aa9efe6..d724f2f25 100644 --- a/imp/compose.php +++ b/imp/compose.php @@ -696,6 +696,8 @@ $t->setOption('gettext', true); $t->set('post_action', Horde::applicationUrl('compose.php')->unique()); $t->set('allow_compose', !$compose_disable); +$blank_url = new Horde_Url('#'); + if ($redirect) { /* Prepare the redirect template. */ $t->set('cacheid', $composeCacheID); @@ -707,8 +709,11 @@ if ($redirect) { $t->set('status', Horde::endBuffer()); if ($registry->hasMethod('contacts/search')) { - $t->set('has_search', true); - $t->set('abook', Horde::link('#', _("Address Book"), 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '
' . _("Address Book") . ''); + $t->set('abook', $blank_url->copy()->link(array( + 'class' => 'widget', + 'onclick.raw' => 'window.open("' . Horde::applicationUrl('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '", "contacts", "toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;', + 'title' => _("Address Book") + )) . Horde::img('addressbook_browse.png') . '
' . _("Address Book") . ''); } $t->set('to', Horde::label('to', _("To"))); @@ -856,20 +861,28 @@ if ($redirect) { $compose_options = array(); if ($registry->hasMethod('contacts/search')) { $compose_options[] = array( - 'url' => Horde::link('#', '', 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;'), + 'url' => $blank_url->copy()->link(array( + 'class' => 'widget', + 'onclick.raw' => 'window.open("' . Horde::applicationUrl('contacts.php') . '","contacts","toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;' + )), 'img' => Horde::img('addressbook_browse.png'), 'label' => $show_text ? _("Address Book") : '' ); } if ($spellcheck) { $compose_options[] = array( - 'url' => Horde::link('#', '', 'widget', '', 'return false', '', '', - array('id' => 'spellcheck')), - 'img' => '', 'label' => ''); + 'url' => $blank_url->copy()->link(array( + 'class' => 'widget', + 'id' => 'spellcheck' + )), + 'img' => '', + 'label' => '' + ); } if ($_SESSION['imp']['file_upload']) { + $url = new Horde_Url('#attachments'); $compose_options[] = array( - 'url' => Horde::link('#attachments', '', 'widget'), + 'url' => $url->link(array('class' => 'widget')), 'img' => Horde::img('manage_attachments.png'), 'label' => $show_text ? _("Attachments") : '' ); @@ -922,7 +935,10 @@ if ($redirect) { $t->set('compose_html', (!is_null($rtemode) && !$prefs->isLocked('compose_html'))); if ($t->get('compose_html')) { $t->set('html_img', Horde::img('compose.png', _("Switch Composition Method"))); - $t->set('html_switch', Horde::link('#', _("Switch Composition Method"), '', '', "$('rtemode').value='" . ($rtemode ? 0 : 1) . "';ImpCompose.uniqSubmit('toggle_editor');return false;")); + $t->set('html_switch', $blank_url->copy()->link(array( + 'onclick.raw' => "$('rtemode').value='" . ($rtemode ? 0 : 1) . "';ImpCompose.uniqSubmit('toggle_editor');return false;", + 'title' => _("Switch Composition Method") + ))); $t->set('rtemode', $rtemode); } @@ -1006,7 +1022,11 @@ if ($redirect) { 'composeCache' => $composeCacheID, 'id' => $atc_num )); - $entry['name'] = Horde::link($preview_url, _("Preview") . ' ' . $entry['name'], 'link', 'compose_preview_window') . $entry['name'] . ''; + $entry['name'] = $preview_url->link(array( + 'class' => 'link', + 'target' => 'compose_preview_window', + 'title' => _("Preview") + )) . $entry['name'] . ''; } $atc[] = $entry; diff --git a/imp/folders.php b/imp/folders.php index 698a68d65..d1310b901 100644 --- a/imp/folders.php +++ b/imp/folders.php @@ -387,7 +387,10 @@ $refresh_title = Horde::stripAccessKey($refresh_title); if (!empty($refresh_ak)) { $refresh_title .= sprintf(_(" (Accesskey %s)"), $refresh_ak); } -$head_template->set('refresh', Horde::link($folders_url_ob, $refresh_title, '', '', '', $refresh_title, $refresh_ak)); +$head_template->set('refresh', $folder_url_ob->link(array( + 'accesskey' => $refresh_ak, + 'title' => $refresh_title +))); $head_template->set('folders_token', $folders_token); /* Prepare the actions template. */ @@ -439,8 +442,8 @@ foreach ($raw_rows as $key => $val) { $val['nocheckbox'] = !empty($val['vfolder']); if (!empty($val['vfolder']) && $val['editvfolder']) { $imp_search = $injector->getInstance('IMP_Search'); - $val['delvfolder'] = Horde::link($imp_search->deleteUrl($val['value']), _("Delete Virtual Folder")) . _("Delete") . ''; - $val['editvfolder'] = Horde::link($imp_search->editUrl($val['value']), _("Edit Virtual Folder")) . _("Edit") . ''; + $val['delvfolder'] = $imp_search->deleteUrl($val['value'])->link(array('title' => _("Delete Virtual Folder"))) . _("Delete") . ''; + $val['editvfolder'] = $imp_search->editUrl($val['value'])->link(array('title' => _("Edit Virtual Folder"))) . _("Edit") . ''; } $val['cname'] = (++$rowct % 2) ? 'item0' : 'item1'; @@ -457,7 +460,7 @@ foreach ($raw_rows as $key => $val) { if (!empty($val['unseen'])) { $val['name'] = '' . $val['name'] . ''; } - $val['name'] = Horde::link($name_url->copy()->add('mailbox', $val['value']), $val['vfolder'] ? $val['base_elt']['l'] : $val['display']) . $val['name'] . ''; + $val['name'] = $name_url->copy()->add('mailbox', $val['value'])->link(array('title' => $val['vfolder'] ? $val['base_elt']['l'] : $val['display'])) . $val['name'] . ''; } $val['line'] = $tree_imgs[$key]; diff --git a/imp/templates/imp/compose/redirect.html b/imp/templates/imp/compose/redirect.html index 230dca01f..c3dccf48d 100644 --- a/imp/templates/imp/compose/redirect.html +++ b/imp/templates/imp/compose/redirect.html @@ -9,7 +9,7 @@ - +
  @@ -20,7 +20,7 @@
- +