Changeset 561 in t29-www


Ignore:
Timestamp:
May 30, 2014, 3:35:30 AM (5 years ago)
Author:
sven
Message:
  • lib: Weitere Fixes, um externe Einbindungen auch ueber Hostgrenzen zu schaffen
  • de/geraete: Zeichensatzfixes
  • menu.js: Keine Buttons, wenn in der Seitenleiste kein Menü eingeblendet wird
  • preferences.js: Versucht, den Bug anzugehen, dass mehrere Cookies angelegt werden
  • mobile.css: Breite vergrößert, ab der man das Tablet-Design angezeigt bekommt
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • de/geraete/HEADER.php

    r559 r561  
    22<html>
    33<head>
    4     <title>technikum29.de Geräte</title>
     4    <title>technikum29.de Geräte</title>
    55    <meta name="t29.SVN" content="$Id$">
    66    <meta http-equiv="content-type" content="text/html; charset=utf-8">
     
    1212
    1313<div id="page">
    14 <h2>Detailseiten zu Geräten</h2>
     14<h2>Detailseiten zu Geräten</h2>
    1515
    1616<p>Im Folgenden eine Auflistung aller Detailseiten zu Geräten. Weitere Inhalte erreichen Sie über die
  • lib/host.php

    r517 r561  
    144144                return $publichost;
    145145        }
     146
     147        /**
     148         * "Factory" for creating an instance of $className as a singleton.
     149         * You should really use detect() for auto-detection instead of
     150         * forcing a host.
     151         * Only useful for explicitely calling t29ExternalHost by $external call.
     152         **/
     153        static function create($className) {
     154                return self::new_singleton($className)->setup();
     155        }
    146156       
    147157        /**
     
    154164         *   1. if this host does Clean URLs (Suffix rewriting)
    155165         *   2. if this host is *not* installed in its own virtualhost (i.e. on docroot).
     166         *
     167         * @returns $this for chaining
    156168         **/
    157169        private function setup() {
     
    223235               
    224236                //phpinfo(); exit;
     237                return $this; // Chaining
    225238        }
    226239       
     
    308321        }
    309322}
     323
     324/**
     325 * Ein "external" Host, der Links mit voller URL angeben muss, etwa bei der
     326 * Einbindung von CSS/JS, aber auch von Links.
     327 * Genutzt fuer $external-Einbindung von technikum29.php
     328 **/
     329class t29ExternalHost extends t29Host {
     330        public $hostname = "external";
     331        public $target_host = 'http://www.technikum29.de';
     332
     333        function rewrite_link($link_target, $also_rewrite_prefix=false) {
     334                $link_target = parent::rewrite_link($link_target, $also_rewrite_prefix);
     335       
     336                if($also_rewrite_prefix) {
     337                        // check if link has host part
     338                        if(!preg_match('#^http:#i', $link_target)) {
     339                                $sep = ($link_target{0} == '/') ? '' : '/';
     340                                $link_target = $this->target_host . $sep . $link_target;
     341                        }
     342                }
     343
     344                return $link_target;
     345        }
     346
     347        function fillup_template_conf(&$template_conf) {
     348                $template_conf['header_prepend'][] =
     349                        '<meta name="t29.host.from" content="'.$_SERVER['SERVER_NAME'].'">';
     350        }
     351}
  • lib/technikum29.php

    r560 r561  
    2626// early import host specific settings for making low level corrections like Bugfix #32
    2727require "$lib/host.php";
    28 $host = t29Host::detect();
     28$host = $external ? t29Host::create('t29ExternalHost') : t29Host::detect();
    2929
    3030$file = $host->script_filename; # e.g.: "/de/page.php"
  • lib/template.php

    r560 r561  
    490490                                // do the host link renaming conversion. This is more important if
    491491                                // there is a web_prefix than for the suffix rewriting.
    492                                 //$link = $this->conf['host']->rewrite_link($link, true);
     492                                $link = $this->conf['host']->rewrite_link($link, true);
    493493                                printf($template, $link);
    494494                        }
  • shared/css-v6/modules/31-mobile.css

    r436 r561  
    1212 *
    1313 **/
    14 @media all and (max-width: 1199px) {
     14@media all and (max-width: 1250px) { /* was: 1199px */
    1515        body {
    1616                background: #F4F4F4; /* BG von footer.attached */
  • shared/js-v6/modules/menu.js

    r480 r561  
    2020        t29.menu.beam = $("nav.guide");  // Strahlnavigation/Guide (Kopie von side)
    2121        t29.menu.rel = $("nav.rel");     // relative navigation im footer (vor/zurück)
    22         t29.menu.collapsed.setup();
    23         t29.menu.scroll.setup();
     22       
     23        if(t29.menu.side.hasClass("contains-menu")) {
     24                t29.menu.collapsed.setup();
     25                t29.menu.scroll.setup();
     26        } // else: hasClass("contains-custom") -> keine Navigation
    2427       
    2528        // t29v6 launch: Guide-Menü erst mal deaktiviert
  • shared/js-v6/modules/preferences.js

    r278 r561  
    3333t29.prefs.setup = function() {
    3434        c = t29.prefs.conf;
     35        $.cookie.defaults = t29.prefs.cookie_options; // TEST/TODO: Bugfix cookie path ignored!
    3536        // read initial data
    3637        json_str = $.cookie(c.cookie_name);
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License