News:

Looking for documentation? Take a look on our wiki

Main Menu

to developers: how about REMOVE class 'modal' from views???

Started by newart, December 22, 2012, 20:25:05 PM

Previous topic - Next topic

newart

how  about REMOVE class 'modal' from views???
it is make collision with TwitterBootstrap style!

JHTML::_('behavior.modal')
allow use second param, and this makes it possible to use it to specify the class name of  links (anchors) with modal behavior. 

veeco

Work On Doxa Web Developer Indonesia - http://doxadigital.com |

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

newart

maybe this is not an exhaustive list
but in the right direction

       [ B ]:[ /components/com_virtuemart/helpers/vmview.php ] - change 'modal' to 'modal_vm2'
        class VmView extends JView{
         function linkIcon($link,$altText ='',$boutonName,$verifyConfigValue=false, $modal = true, $use_icon=true,$use_text=false) {
          if ($verifyConfigValue) {
           if ( !VmConfig::get($verifyConfigValue, 0) ) return '';
          }
          $folder = (JVM_VERSION===1) ? '/images/M_images/' : '/media/system/images/';
          $text='';
          if ( $use_icon ) $text .= JHtml::_('image.site', $boutonName.'.png', $folder, null, null, JText::_($altText));
          if ( $use_text ) $text .= ' '. JText::_($altText);
          if ( $text=='' )  $text .= ' '. JText::_($altText);
          if ($modal) return '<a class="modal_vm2" rel="{handler: \'iframe\', size: {x: 700, y: 550}}" title="'. JText::_($altText).'" href="'.JRoute::_($link).'">'.$text.'</a>';
          else            return '<a title="'. JText::_($altText).'" href="'.JRoute::_($link).'">'.$text.'</a>';
         }
         // . . .
        }
       [ E ]:[ /components/com_virtuemart/helpers/vmview.php ]

. . .

       [ B ]:[ /administrator/components/com_virtuemart/helpers/mediahandler.php ]
       
        // added 5 th empty parameter to a function  $this->displayIt()
        // in order to clear the presence of the class 'modal' at links around product images, for those cases where the image was not found!
        // <a href=" http : / / localhost /components /com_virtuemart / assets / images / vmgeneral / noimage.gif " title="No image ">
         
        function displayMediaThumb($imageArgs='',$lightbox=true,$effect="class='modal' rel='group'",$return = true,$withDescr = false,$absUrl = false){
         if(empty($this->file_name)){
          if($return){
           if($this->file_is_downloadable){
            $file_url = $this->theme_url.'assets/images/vmgeneral/'.VmConfig::get('downloadable','zip.png');
            $file_alt = JText::_('COM_VIRTUEMART_NO_IMAGE_SET').' '.$this->file_description;
            //return $this->displayIt($file_url, $file_alt, '',true,'',$withDescr);
            return $this->displayIt($file_url, $file_alt, '',true,'',$withDescr,''); //(!edit)
           } else {
            $file_url = $this->theme_url.'assets/images/vmgeneral/'.VmConfig::get('no_image_set');
            $file_alt = JText::_('COM_VIRTUEMART_NO_IMAGE_SET').' '.$this->file_description;
            //return $this->displayIt($file_url, $file_alt, $imageArgs,$lightbox);
            return $this->displayIt($file_url, $file_alt, $imageArgs,$lightbox,''); //(!edit)
           }
          }
         }
         // ... etc ...
        }
       
       [ E ]:[ /administrator/components/com_virtuemart/helpers/mediahandler.php ] 

. . .

//  Must modify calls JHtml :: _ ('behavior.modal');
//  clearly specifying name of the class for which to set this behavior, for example:
//  JHtml :: _ ('behavior.modal', 'a.modal_vm2');

. . .

     [ B ]:list of files in which there 'JHtml::_('behavior.modal')' :
   
       
        components/com_virtuemart/views/pluginresponse/tmpl/default.php
        components/com_virtuemart/views/user/tmpl/login.php
        components/com_virtuemart/views/virtuemart/tmpl/default.php
        components/com_virtuemart/views/productdetails/tmpl/default.php
        components/com_virtuemart/views/category/tmpl/default.php

       
     [ E ]:list of files in which there 'JHtml::_('behavior.modal')' :

. . .

     [ B ]:list of files in which there is a class of 'modal' in links :

        components/com_virtuemart/views/virtuemart/tmpl/default_products.php
        components/com_virtuemart/views/productdetails/tmpl/pdf.php
        components/com_virtuemart/views/productdetails/tmpl/default_manufacturer.php
        components/com_virtuemart/views/productdetails/tmpl/default_pdf.php
        components/com_virtuemart/views/recomended/tmpl/form.php

     [ E ]:list of files in which there is a class of 'modal' in links :