]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'mobile-style' of git://gitorious.org/laconica/meitar into review
authorSarven Capadisli <csarven@controlyourself.ca>
Tue, 17 Feb 2009 20:32:19 +0000 (20:32 +0000)
committerSarven Capadisli <csarven@controlyourself.ca>
Tue, 17 Feb 2009 20:32:19 +0000 (20:32 +0000)
Conflicts:

lib/action.php

1  2 
config.php.sample
lib/action.php

Simple merge
diff --cc lib/action.php
index 79e8c95471a40bae84a4601feaee6e981a00df2f,3e236d7146ba82675de08ba7dc007b4d8fe3e251..8ff9e646b8cb769e3c60bc4bdde2e99af07c9daa
@@@ -151,40 -151,31 +151,45 @@@ class Action extends HTMLOutputter // l
       */
      function showStylesheets()
      {
 -        $this->element('link', array('rel' => 'stylesheet',
 -                                     'type' => 'text/css',
 -                                     'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION,
 -                                     'media' => 'screen, projection, tv'));
 -        $this->element('link', array('rel' => 'stylesheet',
 -                                     'type' => 'text/css',
 -                                     'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION,
 -                                     'media' => 'screen, projection, tv'));
 -        $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
 -                       'href="'.theme_path('css/ie.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
 -        foreach (array(6,7) as $ver) {
 -            if (file_exists(theme_file('css/ie'.$ver.'.css', 'base'))) {
 -                // Yes, IE people should be put in jail.
 -                $this->comment('[if lte IE '.$ver.']><link rel="stylesheet" type="text/css" '.
 -                               'href="'.theme_path('css/ie'.$ver.'.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
 +        if (Event::handle('StartShowStyles', array($this))) {
 +            if (Event::handle('StartShowLaconicaStyles', array($this))) {
 +
 +                $this->element('link', array('rel' => 'stylesheet',
 +                                             'type' => 'text/css',
 +                                             'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION,
 +                                             'media' => 'screen, projection, tv'));
 +                $this->element('link', array('rel' => 'stylesheet',
 +                                             'type' => 'text/css',
 +                                             'href' => theme_path('css/modal.css', 'base') . '?version=' . LACONICA_VERSION,
 +                                             'media' => 'screen, projection, tv'));
 +                $this->element('link', array('rel' => 'stylesheet',
 +                                             'type' => 'text/css',
 +                                             'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION,
 +                                             'media' => 'screen, projection, tv'));
++                if (common_config('site', 'mobile')) {
++                    $this->element('link', array('rel' => 'stylesheet',
++                                                 'type' => 'text/css',
++                                                 'href' => theme_path('css/mobile.css', 'base') . '?version=' . LACONICA_VERSION,
++                                                 // TODO: "handheld" CSS for other mobile devices
++                                                 'media' => 'only screen and (max-device-width: 480px)')); // Mobile WebKit
++                }
 +                Event::handle('EndShowLaconicaStyles', array($this));
              }
 -        }
 -        $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
 -                       'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]');
 -        if (common_config('site', 'mobile')) {
 -            $this->element('link', array('rel' => 'stylesheet',
 -                                         'type' => 'text/css',
 -                                         'href' => theme_path('css/mobile.css', 'base') . '?version=' . LACONICA_VERSION,
 -                                         // TODO: "handheld" CSS for other mobile devices
 -                                         'media' => 'only screen and (max-device-width: 480px)')); // Mobile WebKit
 +            if (Event::handle('StartShowUAStyles', array($this))) {
 +                $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
 +                               'href="'.theme_path('css/ie.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
 +                foreach (array(6,7) as $ver) {
 +                    if (file_exists(theme_file('css/ie'.$ver.'.css', 'base'))) {
 +                        // Yes, IE people should be put in jail.
 +                        $this->comment('[if lte IE '.$ver.']><link rel="stylesheet" type="text/css" '.
 +                                       'href="'.theme_path('css/ie'.$ver.'.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
 +                    }
 +                }
 +                $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
 +                               'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]');
 +                Event::handle('EndShowUAStyles', array($this));
 +            }
 +            Event::handle('EndShowStyles', array($this));
          }
      }