Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 12:02 pm (All times are UTC )

 




Post new topic Reply to topic  [ 3 posts ] 
Author Message
Posted: Wed Sep 20, 2006 6:38 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 10:32 pm
Posts: 334
Location: la Rochelle - France
Description:
For component developers mosCommonHTML::menuLinksContent() contains specific javascript which needs generalisation

Reported on:
Joomla 1.0.11

Classification:
Enhancement

Affected functions:
Any 3rd party component that wants to call this function and which doesnt have an image list on their admin page

Related files:
includes/joomla.php

Steps to replicate:
Download mosforms 0.4b install add a table, link table to menu, click on the 'menu' or 'link name' links - gives js error "form.imagelist.options not defined"

Analysis:


Proposed fix(es):
In mosCommonHTML::menuLinksContent()  replace
Code:
      <script language="javascript" type="text/javascript">
      function go2( pressbutton, menu, id ) {
         var form = document.adminForm;

         // assemble the images back into one field
         var temp = new Array;
         
         for (var i=0, n=form.imagelist.options.length; i < n; i++) {
            temp[i] = form.imagelist.options[i].value;
         }
         form.images.value = temp.join( '\n' );

         if (pressbutton == 'go2menu') {
            form.menu.value = menu;
            submitform( pressbutton );
            return;
         }

         if (pressbutton == 'go2menuitem') {
            form.menu.value    = menu;
            form.menuid.value    = id;
            submitform( pressbutton );
            return;
         }
      }
      </script>


with

Code:
      <script language="javascript" type="text/javascript">
      function go2( pressbutton, menu, id ) {
         var form = document.adminForm;

         // assemble the images back into one field
         var temp = new Array;
         if(form.imagelist){
            for (var i=0, n=form.imagelist.options.length; i < n; i++) {
               temp[i] = form.imagelist.options[i].value;
            }
            form.images.value = temp.join( '\n' );
         }
         if (pressbutton == 'go2menu') {
            form.menu.value = menu;
            submitform( pressbutton );
            return;
         }

         if (pressbutton == 'go2menuitem') {
            form.menu.value    = menu;
            form.menuid.value    = id;
            submitform( pressbutton );
            return;
         }
      }
      </script>




System info:
n/a

_________________
aka


Top
   
 
Posted: Sat Oct 28, 2006 10:56 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1318
Location: New Orleans, LA, USA
This is a feature request which is not in the scope of 1.0.x.

Q&T Note; Status> Known Issue.  Moving to appropriate forum.

_________________
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions


Top
  E-mail  
 
Posted: Sun Oct 29, 2006 11:07 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 10:32 pm
Posts: 334
Location: la Rochelle - France
sniff  8)

hardly a "feature" just some basic checking of dom!

_________________
aka


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group