Permalink
Browse files

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@3853 6…

…f6e1ebd-4c2b-0410-823f-f34bde69bce9
  • Loading branch information...
1 parent cc7a65d commit 051ff8bceaae4c1284d05d352d1b01f11f94e2fd @eddieajau eddieajau committed Jun 5, 2006
@@ -33,10 +33,10 @@ function init($type='component')
{
// Create the JWizard object
jimport('joomla.presentation.wizard');
- $app =& $this->getApplication();
- $type = $app->getUserStateFromRequest('menuwizard.type', 'type', $type);
- $menutype = $app->getUserStateFromRequest('menuwizard.menutype', 'menutype');
- $id = $app->getUserStateFromRequest('menuwizard.id', 'id', false);
+ $app =& $this->getApplication();
+ $type = $app->getUserStateFromRequest('menuwizard.type', 'type', $type);
+ $menutype = $app->getUserStateFromRequest('menuwizard.menutype', 'menutype');
+ $id = $app->getUserStateFromRequest('menuwizard.id', 'id', false);
// Include and create the helper object
if ($type) {
@@ -112,16 +112,12 @@ function MenuOutputBottom( &$lists, &$menu ) {
<?php echo $lists['parent']; ?>
</td>
</tr>
-<?php
- // build html select list for target window
- $lists['target'] = JMenuHelper::Target( $menu );
-?>
<tr>
<td valign="top" align="right">
<?php echo JText::_( 'On Click, Open in' ); ?>:
</td>
<td>
- <?php echo $lists['target']; ?>
+ <?php echo JMenuHelper::Target( $menu ); ?>
</td>
</tr>
<?php
@@ -67,12 +67,14 @@ function edit()
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
+ var type = form.type.value;
+
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
- if ( (trim( form.type.value ) != "separator") && (trim( form.name.value ) == "") ){
+ if ( type != "separator") && (trim( form.name.value ) == "") ){
alert( "<?php echo JText::_( 'Item must have a name', true ); ?>" );
} else {
submitform( pressbutton );
@@ -106,7 +108,15 @@ function submitbutton(pressbutton) {
<?php echo JText::_( 'Name' ); ?>:
</td>
<td>
- <input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php echo $item->name; ?>" />
+ <input class="inputbox" type="text" name="name" size="50" maxlength="255" value="<?php echo $item->name; ?>" />
+ </td>
+ </tr>
+ <tr>
+ <td class="key" align="right">
+ <?php echo JText::_( 'Link' ); ?>:
+ </td>
+ <td>
+ <input class="inputbox" type="text" name="link" size="50" maxlength="255" value="<?php echo $item->link; ?>" />
</td>
</tr>
<tr>
@@ -149,6 +159,14 @@ function submitbutton(pressbutton) {
<?php echo mosAdminMenus::Access( $item ); ?>
</td>
</tr>
+ <tr>
+ <td class="key" valign="top" align="right">
+ <?php echo JText::_( 'On Click, Open in' ); ?>:
+ </td>
+ <td>
+ <?php echo JMenuHelper::Target( $item ); ?>
+ </td>
+ </tr>
</table>
</fieldset>
<fieldset>
@@ -196,7 +214,7 @@ function submitbutton(pressbutton) {
?>
<input type="hidden" name="option" value="com_menus" />
<input type="hidden" name="id" value="<?php echo $item->id; ?>" />
- <input type="hidden" name="link" value="<?php echo $item->link; ?>" />
+ <input type="hidden" name="componentid" value="<?php echo $item->componentid; ?>" />
<input type="hidden" name="menutype" value="<?php echo $item->menutype; ?>" />
<input type="hidden" name="type" value="<?php echo $item->type; ?>" />
<input type="hidden" name="task" value="" />
@@ -33,7 +33,6 @@ function doStart()
$document->addStyleSheet('components/com_menumanager/includes/popup.css');
$document->setTitle(JText::_('New Menu Item Wizard'));
-
$app = &$this->get('Application');
$type = $app->getUserStateFromRequest('menuwizard.type', 'type', 'component');
$menuType = $app->getUserStateFromRequest('menuwizard.menutype', 'menutype');
@@ -598,17 +598,31 @@ function pdfIcon($row, $params, $linkOn, $hideJS)
function emailIcon($row, $params, $hideJS)
{
if ($params->get('email') && !$params->get('popup') && !$hideJS) {
- $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=400,height=250,directories=no,location=no';
- $link = 'index2.php?option=com_content&amp;task=emailform&amp;id='.$row->id;
- $acclink = 'index.php?option=com_content&amp;task=emailform&amp;id='.$row->id;
if ($params->get('icons')) {
$image = mosAdminMenus::ImageCheck('emailButton.png', '/images/M_images/', NULL, NULL, JText::_('Email'), JText::_('Email'));
} else {
$image = '&nbsp;'.JText::_('Email');
}
?>
<td align="right" width="100%" class="buttonheading">
- <a href="<?php echo $acclink; ?>" onclick="window.open('<?php echo $link; ?>','win2','<?php echo $status; ?>'); return false;" title="<?php echo JText::_( 'Email' );?>">
+ <script language="JavaScript" type="text/javascript">
+ <!--
+ function mailToFriend() {
+ if (document.mailToFriend) {
+ window.open('about:blank',
+ 'MailToFriend',
+ 'width=400,height=300,menubar=yes,resizable=yes');
+ document.mailToFriend.submit();
+ }
+ }
+ -->
+ </script>
+ <form action="index2.php" name="mailToFriend" method="post" target="MailToFriend" style="display:inline">
+ <input type="hidden" name="option" value="com_mailto" />
+ <input type="hidden" name="link" value="<?php echo urlencode( JRequest::getUrl());?>" />
+ </form>
+
+ <a href="javascript:void mailToFriend()" title="<?php echo JText::_( 'Email' );?>">
<?php echo $image; ?></a>
</td>
<?php
@@ -7,6 +7,7 @@
<name>Article View</name>
<description>Article view parameters...</description>
<params>
+ <param name="article_id" type="text" default="" label="Article ID" description="Article" />
<param name="menu_image" type="imagelist" directory="/images/stories" hide_default="1" default="" label="Menu Image" description="PARAMMENUIMAGE" />
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="secure" type="radio" default="0" label="SSL Enabled" description="PARAMSECURE">
View
@@ -52,25 +52,18 @@
//}
$Itemid = JRequest::getVar( 'Itemid', 0, '', 'int' );
-
if ($option == '' || $option == 'login' || $option == 'logout')
{
- if ($Itemid) {
- $query = "SELECT id, link"
- . "\n FROM #__menu"
- . "\n WHERE menutype = 'mainmenu'"
- . "\n AND id = '$Itemid'"
- . "\n AND published = '1'"
- ;
- $database->setQuery( $query );
- } else {
- $query = "SELECT id, link"
- . "\n FROM #__menu"
- . "\n WHERE home = 1"
- . "\n LIMIT 1"
- ;
- $database->setQuery( $query );
- }
+ $query = "SELECT id, link"
+ . "\n FROM #__menu"
+ // . "\n WHERE menutype = 'mainmenu'" ?? huh?
+ . "\n WHERE (id = $Itemid OR home = 1)"
+ . "\n AND published = 1"
+ . "\n ORDER BY home"
+ . "\n LIMIT 1"
+ ;
+ $database->setQuery( $query );
+
$menu =& JTable::getInstance('menu', $database );
if ($database->loadObject( $menu )) {
$Itemid = $menu->id;
@@ -54,7 +54,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=archive\nmodel_name=category',
+ `control` = 'view_name=archive\nmodel_name=category',
`params` = CONCAT_WS( '', params, '\ncategory_id=', componentid ),
`type` = 'component'
WHERE
@@ -64,7 +64,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=archive\nmodel_name=section',
+ `control` = 'view_name=archive\nmodel_name=section',
`params` = CONCAT_WS( '', params, '\nsection_id=', componentid ),
`type` = 'component'
WHERE
@@ -74,7 +74,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=blog\nmodel_name=category',
+ `control` = 'view_name=blog\nmodel_name=category',
`params` = CONCAT_WS( '', params, '\ncategory_id=', componentid ),
`type` = 'component'
WHERE
@@ -84,7 +84,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=blog\nmodel_name=section',
+ `control` = 'view_name=blog\nmodel_name=section',
`params` = CONCAT_WS( '', params, '\nsection_id=', componentid ),
`type` = 'component'
WHERE
@@ -94,7 +94,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=category',
+ `control` = 'view_name=category',
`params` = CONCAT_WS( '', params, '\ncategory_id=', componentid ),
`type` = 'component'
WHERE
@@ -104,7 +104,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=article',
+ `control` = 'view_name=article',
`params` = CONCAT_WS( '', params, '\narticle_id=', componentid ),
`type` = 'component'
WHERE
@@ -114,7 +114,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=section',
+ `control` = 'view_name=section',
`params` = CONCAT_WS( '', params, '\nsection_id=', componentid ),
`type` = 'component'
WHERE
@@ -124,7 +124,7 @@ UPDATE `jos_menu`
UPDATE `jos_menu`
SET
- `control` = 'view=article',
+ `control` = 'view_name=article',
`params` = CONCAT_WS( '', params, '\narticle_id=', componentid ),
`type` = 'component'
WHERE

0 comments on commit 051ff8b

Please sign in to comment.