You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/07/02 17:09:23 UTC
[08/23] allura git commit: [#7885] Added tooltip config to master
jinja template
[#7885] Added tooltip config to master jinja template
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/85eec26d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/85eec26d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/85eec26d
Branch: refs/heads/hs/7894
Commit: 85eec26d63d6cb1a026f6d666d5ced0d77b5129b
Parents: 1bac728
Author: Heith Seewald <hs...@slashdotmedia.com>
Authored: Mon Jun 8 15:43:53 2015 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Jun 29 18:25:47 2015 +0000
----------------------------------------------------------------------
.../allura/templates/jinja_master/master.html | 227 ++++++++++---------
1 file changed, 125 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/85eec26d/Allura/allura/templates/jinja_master/master.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/master.html b/Allura/allura/templates/jinja_master/master.html
index cc6b548..062d7de 100644
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -20,15 +20,17 @@
<!-- Server: {{g.server_name}} -->
{% import 'allura:templates/jinja_master/lib.html' as lib with context %}
{% if g.theme.jinja_macros %}
- {% import g.theme.jinja_macros as theme_macros with context %}
+ {% import g.theme.jinja_macros as theme_macros with context %}
{% endif %}
{% do g.register_forge_js('js/jquery-base.js', location='head_js') %}
{% do g.register_forge_js('js/jquery.notify.js') %}
+{% do g.register_forge_js('js/jquery.tooltipster.js') %}
{% do g.register_forge_js('js/modernizr.js') %}
{% do g.register_forge_js('js/sylvester.js') %}
{% do g.register_forge_js('js/pb.transformie.min.js') %}
{% do g.register_forge_js('js/allura-base.js') %}
{% do g.register_forge_css('css/forge/hilite.css') %}
+{% do g.register_forge_css('css/forge/tooltipster.css') %}
{% do g.register_css('/nf/tool_icon_css?' + g.build_key, compress=False) %}
{% do g.theme.require() %}
{% do g.resource_manager.register_widgets(c) %}
@@ -37,130 +39,151 @@
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
-<!--[if (gt IE 9)|!(IE)]>--> <html lang="en" class="no-js"> <!--<![endif]-->
- <head>
+<!--[if (gt IE 9)|!(IE)]>-->
+<html lang="en" class="no-js"> <!--<![endif]-->
+<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
<title>{% block title %}Your title goes here{% endblock %}</title>
- {{theme_macros.extra_header(g.theme_href(''))}}
+ {{ theme_macros.extra_header(g.theme_href('')) }}
<script type="text/javascript">
- /*jslint onevar: false, nomen: false, evil: true, css: true, plusplus: false, white: false, forin: true, on: true, immed: false */
- /*global confirm, alert, unescape, window, jQuery, $, net, COMSCORE */
+ /*jslint onevar: false, nomen: false, evil: true, css: true, plusplus: false, white: false, forin: true, on: true, immed: false */
+ /*global confirm, alert, unescape, window, jQuery, $, net, COMSCORE */
</script>
{% for blob in g.resource_manager.emit('head_css') %}
- {{ blob }}
+ {{ blob }}
{% endfor %}
{% for blob in g.resource_manager.emit('head_js') %}
- {{ blob }}
+ {{ blob }}
{% endfor %}
{% if c.project and c.project.neighborhood.css %}
- <style type="text/css">
- {{c.project.neighborhood.get_custom_css()|safe}}
- </style>
+ <style type="text/css">
+ {{c.project.neighborhood.get_custom_css()|safe}}
+ </style>
{% elif neighborhood and neighborhood.css %}
- <style type="text/css">
- {{neighborhood.get_custom_css()}}
- </style>
+ <style type="text/css">
+ {{neighborhood.get_custom_css()}}
+ </style>
{% endif %}
{% block extra_css %}{% endblock %}
- <style>.{{ g.antispam.honey_class }} { display:none }</style>
+ <style>.{{ g.antispam.honey_class }} {
+ display: none
+ }</style>
{% block head %}
{% endblock %}
- {% if g.production_mode %}{{g.analytics.display()}}{% endif %}
- </head>
+ {% if g.production_mode %}{{ g.analytics.display() }}{% endif %}
+</head>
- <body{% block body_attrs %}{% endblock %} id="forge">
- <h2 class="hidden">
- <span style="color:red">Error:</span> CSS did not load.<br>
- This may happen on the first request due to CSS mimetype issues.
- Try clearing your browser cache and refreshing.
- <hr>
- </h2>
- {% block body_top_js %}
+<body{% block body_attrs %}{% endblock %} id="forge">
+<h2 class="hidden">
+ <span style="color:red">Error:</span> CSS did not load.<br>
+ This may happen on the first request due to CSS mimetype issues.
+ Try clearing your browser cache and refreshing.
+ <hr>
+</h2>
+{% block body_top_js %}
{% for blob in g.resource_manager.emit('body_top_js') %}
- {{ blob }}
+ {{ blob }}
{% endfor %}
- {% endblock %}
- {{theme_macros.header(g.login_url, '/auth/logout')}}
- {{theme_macros.site_notification()}}
- {% set flash = tg.flash_obj.render('flash', use_js=False) %}
- <section id="page-body" class="{{g.document_class(neighborhood)}}">
- <div id="nav_menu_holder">
- {% block nav_menu %}
+{% endblock %}
+{{ theme_macros.header(g.login_url, '/auth/logout') }}
+{{ theme_macros.site_notification() }}
+{% set flash = tg.flash_obj.render('flash', use_js=False) %}
+<section id="page-body" class="{{ g.document_class(neighborhood) }}">
+ <div id="nav_menu_holder">
+ {% block nav_menu %}
{% include g.theme.nav_menu %}
- {% endblock %}
- </div>
- <div id="top_nav" class="">
+ {% endblock %}
+ </div>
+ <div id="top_nav" class="">
{% block top_nav %}
- {% include g.theme.top_nav %}
+ {% include g.theme.top_nav %}
+ {% endblock %}
+ </div>
+ <div id="content_base">
+ {% block content_base %}
+ {% if not hide_left_bar %}
+ {% block sidebar_menu %}
+ {% include g.theme.sidebar_menu %}
+ {% endblock %}
+ {% set outer_width = 20 %}
+ {% else %}
+ {% set outer_width = 24 %}
+ {% endif %}
+ {% if show_right_bar %}
+ {% set inner_width = outer_width - 8 %}
+ {% else %}
+ {% set inner_width = outer_width %}
+ {% endif %}
+ <div class="grid-{{ outer_width }} pad">
+ <h2 class="dark{% block header_classes %} title{% endblock %}">{% block header %}{% endblock %}
+ <!-- actions -->
+ <small>
+ {% block actions %}{% endblock %}
+ </small>
+ <!-- /actions -->
+ </h2>
+ {% block edit_box %}{% endblock %}
+ <div{% if show_right_bar %}
+ class="{% block inner_grid %}grid-{{ inner_width }}"{% endblock %}{% endif %}>
+ {% block before_content %}{% endblock %}
+ {% block content %}{% endblock %}
+ </div>
+ {% if show_right_bar %}
+ <div id="sidebar-right" class="grid-6 fright">
+ {% block right_content %}{% endblock %}
+ </div>
+ {% endif %}
+ {% block after_content %}{% endblock %}
+ </div>
{% endblock %}
- </div>
- <div id="content_base">
- {% block content_base %}
- {% if not hide_left_bar %}
- {% block sidebar_menu %}
- {% include g.theme.sidebar_menu %}
- {% endblock %}
- {% set outer_width = 20 %}
- {% else %}
- {% set outer_width = 24 %}
- {% endif %}
- {% if show_right_bar %}
- {% set inner_width = outer_width - 8 %}
- {% else %}
- {% set inner_width = outer_width %}
- {% endif %}
- <div class="grid-{{outer_width}} pad">
- <h2 class="dark{% block header_classes %} title{% endblock %}">{% block header %}{% endblock %}
- <!-- actions -->
- <small>
- {% block actions %}{% endblock %}
- </small>
- <!-- /actions -->
- </h2>
- {% block edit_box %}{% endblock %}
- <div{% if show_right_bar %} class="{% block inner_grid %}grid-{{inner_width}}"{% endblock %}{% endif %}>
- {% block before_content %}{% endblock %}
- {% block content %}{% endblock %}
- </div>
- {% if show_right_bar %}
- <div id="sidebar-right" class="grid-6 fright">
- {% block right_content %}{% endblock %}
- </div>
- {% endif %}
- {% block after_content %}{% endblock %}
- </div>
- {% endblock %}
- </div>
- </section>
- {{theme_macros.footer(g.year(), g.theme_href(''))}}
- <div id="messages">
- {% for n in h.pop_user_notifications() %}
- <section class="message {{ n.subject or 'info' }}">
+ </div>
+</section>
+{{ theme_macros.footer(g.year(), g.theme_href('')) }}
+<div id="messages">
+ {% for n in h.pop_user_notifications() %}
+ <section class="message {{ n.subject or 'info' }}">
<header>Notification:</header>
<div class="content">{{ n.text }}</div>
- </section>
- {% endfor %}
- </div>
- {% if c.show_login_overlay %}
- {{theme_macros.login_overlay()}}
- {% endif %}
- {% for blob in g.resource_manager.emit('body_js') %}
- {{ blob }}
+ </section>
{% endfor %}
- {% for blob in g.resource_manager.emit('body_js_tail') %}
- {{ blob }}
- {% endfor %}
- {% block extra_js %}{% endblock %}
- {% if neighborhood %}
- {{ neighborhood.site_specific_html | safe }}
- {% elif c.project.neighborhood %}
- {{ c.project.neighborhood.site_specific_html | safe }}
- {% endif %}
- {{theme_macros.custom_js()}}
- {% if flash %}
- <script type="text/javascript">{{flash | safe}}</script>
- {% endif %}
- </body>
+</div>
+{% if c.show_login_overlay %}
+ {{ theme_macros.login_overlay() }}
+{% endif %}
+{% for blob in g.resource_manager.emit('body_js') %}
+ {{ blob }}
+{% endfor %}
+{% for blob in g.resource_manager.emit('body_js_tail') %}
+ {{ blob }}
+{% endfor %}
+{% block extra_js %}{% endblock %}
+{% if neighborhood %}
+ {{ neighborhood.site_specific_html | safe }}
+{% elif c.project.neighborhood %}
+ {{ c.project.neighborhood.site_specific_html | safe }}
+{% endif %}
+{{ theme_macros.custom_js() }}
+{% if flash %}
+ <script type="text/javascript">{{ flash | safe }}</script>
+{% endif %}
+<script>
+ $(document).ready(function () {
+ $('.tooltip').tooltipster({
+ animation: 'fade',
+ delay: 200,
+ theme: 'tooltipster-light',
+ trigger: 'hover',
+ onlyOne : false,
+ icon: '?',
+ iconTheme: 'tooltipster-icon',
+ iconDesktop: true,
+ position: 'right',
+ maxWidth: 350
+ });
+ })
+
+</script>
+</body>
</html>