示例#1
0
function Overlay_before_Q_responseExtras()
{
    $app = Q_Config::expect('Q', 'app');
    Q_Response::addStylesheet('plugins/Q/css/Q.css');
    Q_Response::addStylesheet('css/Overlay.css', '@end');
    Q_Response::addStylesheet('http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700');
    if (Q_Config::get('Q', 'firebug', false)) {
        Q_Response::addScript("https://getfirebug.com/firebug-lite-debug.js");
    }
    Q_Response::addScript('js/Overlay.js');
    Q_Response::setMeta("title", "Customize My Pic!");
    Q_Response::setMeta("description", "Make a statement on Facebook by customizing your profile picture, even from your smartphone.");
    Q_Response::setMeta("image", Q_Html::themedUrl('img/icon/icon.png'));
    if (Q_Request::isIE()) {
        header("X-UA-Compatible", "IE=edge");
    }
    header('Vary: User-Agent');
    // running an event for loading action-specific extras (if there are any)
    $uri = Q_Dispatcher::uri();
    $module = $uri->module;
    $action = $uri->action;
    $event = "{$module}/{$action}/response/responseExtras";
    if (Q::canHandle($event)) {
        Q::event($event);
    }
}
function Trump_before_Q_responseExtras()
{
    $app = Q_Config::expect('Q', 'app');
    Q_Response::addStylesheet('plugins/Q/css/Q.css');
    Q_Response::addStylesheet('css/html.css', '@end');
    if (Q_Config::get('Q', 'firebug', false)) {
        Q_Response::addScript("https://getfirebug.com/firebug-lite-debug.js");
    }
    Q_Response::addScript('js/Trump.js');
    if (Q_Request::isIE()) {
        header("X-UA-Compatible: IE=edge");
    }
    header('Vary: User-Agent');
    // running an event for loading action-specific extras (if there are any)
    $uri = Q_Dispatcher::uri();
    $module = $uri->module;
    $action = $uri->action;
    $event = "{$module}/{$action}/response/responseExtras";
    if (Q::canHandle($event)) {
        Q::event($event);
    }
}
示例#3
0
 static function htmlAttributes()
 {
     $touchscreen = Q_Request::isTouchscreen() ? 'Q_touchscreen' : 'Q_notTouchscreen';
     $mobile = Q_Request::isMobile() ? 'Q_mobile' : 'Q_notMobile';
     $cordova = Q_Request::isCordova() ? 'Q_cordova' : 'Q_notCordova';
     $platform = 'Q_' . Q_Request::platform();
     $ie = Q_Request::isIE() ? 'Q_ie' : 'Q_notIE';
     $ie8 = Q_Request::isIE(0, 8) ? 'Q_ie8OrBelow' : 'Q_notIE8OrBelow';
     $uri = Q_Dispatcher::uri();
     $classes = "{$uri->module} {$uri->module}_{$uri->action}";
     $result = 'lang="en" prefix="og: http://ogp.me/ns# object: http://ogp.me/ns/object#" ' . "class='{$touchscreen} {$mobile} {$cordova} {$platform} {$ie} {$ie8} {$classes}'";
     return $result;
 }
示例#4
0
 /**
  * Returns the string containing all the html attributes
  * @method htmlAttributes
  * @static
  * @return {string}
  */
 static function htmlAttributes()
 {
     $touchscreen = Q_Request::isTouchscreen() ? 'Q_touchscreen' : 'Q_notTouchscreen';
     $mobile = Q_Request::isMobile() ? 'Q_mobile' : 'Q_notMobile';
     $cordova = Q_Request::isCordova() ? 'Q_cordova' : 'Q_notCordova';
     $platform = 'Q_' . Q_Request::platform();
     $ie = Q_Request::isIE() ? 'Q_ie' : 'Q_notIE';
     $ie8 = Q_Request::isIE(0, 8) ? 'Q_ie8OrBelow' : 'Q_notIE8OrBelow';
     $uri = Q_Dispatcher::uri();
     $classes = "{$uri->module} {$uri->module}_{$uri->action}";
     foreach (self::$htmlCssClasses as $k => $v) {
         $classes .= Q_Html::text(" {$k}");
     }
     $language = self::language();
     return 'lang="' . $language . '" ' . 'prefix="og: http://ogp.me/ns# object: http://ogp.me/ns/object#" ' . "class='{$touchscreen} {$mobile} {$cordova} {$platform} {$ie} {$ie8} {$classes}'";
 }
示例#5
0
 static function htmlAttributes()
 {
     $touchscreen = Q_Request::isTouchscreen() ? 'Q_touchscreen' : 'Q_notTouchscreen';
     $mobile = Q_Request::isMobile() ? 'Q_mobile' : 'Q_notMobile';
     $ie = Q_Request::isIE() ? 'Q_ie' : 'Q_notIE';
     $ie8 = Q_Request::isIE(0, 8) ? 'Q_ie8OrBelow' : 'Q_notIE8OrBelow';
     $result = 'lang="en" prefix="og: http://ogp.me/ns# object: http://ogp.me/ns/object#" ' . "class='{$touchscreen} {$mobile} {$ie} {$ie8}'";
     return $result;
 }