Files @ 31f510a88584
Branch filter:

Location: kallithea/rhodecode/templates/base/root.html

Bradley M. Kuhn
Update minified YUI to version 2.9 built from Source.

yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated
it to something else and applied more aggresive minification. We stick to a
clean but minified version 2.9.

The license of YUI is BSD 3-clause, as described on
http://yuilibrary.com/license/ .

Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd
compliant to distribute this Object Code version with the Corresponding Source
(or offer therefor).

This yui.2.9.js is built from Source this way:
git clone https://github.com/yui/builder
git clone https://github.com/yui/yui2
cd yui2/
git checkout hudson-yui2-2800
ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
rm -f tmp.js
for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
done
java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js

The source is mirrored and available on https://kallithea-scm.org/repos/mirror .
## -*- coding: utf-8 -*-
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>${self.title()}</title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <meta name="robots" content="index, nofollow"/>
        <link rel="icon" href="${h.url('/images/favicon.ico')}" type="image/png" />

        ## CSS ###
        <%def name="css()">
            <link rel="stylesheet" type="text/css" href="${h.url('/css/fontawesome_extension.css')}" media="screen"/>
            <link rel="stylesheet" type="text/css" href="${h.url('/css/fontawesome.css')}" media="screen"/>
            <link rel="stylesheet" type="text/css" href="${h.url('/js/select2/select2.css', ver=c.rhodecode_version)}"/>
            <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
            <link rel="stylesheet" type="text/css" href="${h.url('/css/newstyle.css', ver=c.rhodecode_version)}" media="screen"/>
            <link rel="stylesheet" type="text/css" href="${h.url('/css/bootstrap.css', ver=c.rhodecode_version)}" media="screen"/>
            ## EXTRA FOR CSS
            ${self.css_extra()}
        </%def>

        <%def name="css_extra()"></%def>

        ${self.css()}

        %if c.ga_code:
        <!-- Analytics -->
        <script type="text/javascript">
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', '${c.ga_code}']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                })();
        </script>
        %endif

        ## JAVASCRIPT ##
        <%def name="js()">
            <script type="text/javascript">
            //JS translations map
            var TRANSLATION_MAP = {
                'Add another comment':'${_("Add another comment")}',
                'Stop following this repository':"${_('Stop following this repository')}",
                'Start following this repository':"${_('Start following this repository')}",
                'Group':"${_('Group')}",
                'members':"${_('members')}",
                'Loading ...':"${_('Loading ...')}",
                'loading ...':"${_('loading ...')}",
                'Search truncated': "${_('Search truncated')}",
                'No matching files': "${_('No matching files')}",
                'Open new pull request': "${_('Open new pull request')}",
                'Open new pull request for selected changesets':  "${_('Open new pull request for selected changesets')}",
                'Show selected changesets __S -> __E': "${_('Show selected changesets __S -> __E')}",
                'Show selected changeset __S': "${_('Show selected changeset __S')}",
                'Selection link': "${_('Selection link')}",
                'Collapse diff': "${_('Collapse diff')}",
                'Expand diff': "${_('Expand diff')}",
                'Failed to revoke permission': "${_('Failed to revoke permission')}",
                'Confirm to revoke permission for {0}: {1} ?': "${_('confirm to revoke permission for {0}: {1} ?')}",
                'enabled': "${_('enabled')}",
                'disabled': "${_('disabled')}",
                'Select changeset': "${_('Select changeset')}",
                'specify changeset': "${_('specify changeset')}",
                'MSG_SORTASC': "${_('Click to sort ascending')}",
                'MSG_SORTDESC': "${_('Click to sort descending')}",
                'MSG_EMPTY': "${_('No records found.')}",
                'MSG_ERROR': "${_('Data error.')}",
                'MSG_LOADING': "${_('Loading...')}",


            };
            var _TM = TRANSLATION_MAP;

            var TOGGLE_FOLLOW_URL  = "${h.url('toggle_following')}";

            var REPO_NAME = "";
            %if hasattr(c, 'repo_name'):
                var REPO_NAME = "${c.repo_name}";
            %endif
            </script>
            <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/jquery-1.10.2.min.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/select2/select2.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/mousetrap.js', ver=c.rhodecode_version)}"></script>
            <!--[if lt IE 9]>
               <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
            <![endif]-->
            <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script>
            <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script>
           ## EXTRA FOR JS
           ${self.js_extra()}
            <script type="text/javascript">
            (function(window,undefined){
                // Prepare
                var History = window.History; // Note: We are using a capital H instead of a lower h
                if ( !History.enabled ) {
                     // History.js is disabled for this browser.
                     // This is because we can optionally choose to support HTML4 browsers or not.
                    return false;
                }
            })(window);

            YUE.onDOMReady(function(){
              tooltip_activate();
              show_more_event();
              show_changeset_tooltip();
              // routes registration
              pyroutes.register('home', "${h.url('home')}", []);
              pyroutes.register('new_gist', "${h.url('new_gist')}", []);
              pyroutes.register('gists', "${h.url('gists')}", []);
              pyroutes.register('new_repo', "${h.url('new_repo')}", []);

              pyroutes.register('summary_home', "${h.url('summary_home', repo_name='%(repo_name)s')}", ['repo_name']);
              pyroutes.register('changelog_home', "${h.url('changelog_home', repo_name='%(repo_name)s')}", ['repo_name']);
              pyroutes.register('files_home', "${h.url('files_home', repo_name='%(repo_name)s',revision='%(revision)s',f_path='%(f_path)s')}", ['repo_name', 'revision', 'f_path']);
              pyroutes.register('edit_repo', "${h.url('edit_repo', repo_name='%(repo_name)s')}", ['repo_name']);
              pyroutes.register('edit_repo_perms', "${h.url('edit_repo_perms', repo_name='%(repo_name)s')}", ['repo_name']);
              pyroutes.register('pullrequest_home', "${h.url('pullrequest_home', repo_name='%(repo_name)s')}", ['repo_name']);

              pyroutes.register('toggle_following', "${h.url('toggle_following')}");
              pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
              pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']);
              pyroutes.register('changeset_comment_preview', "${h.url('changeset_comment_preview', repo_name='%(repo_name)s')}", ['repo_name']);
              pyroutes.register('repo_refs_data', "${h.url('repo_refs_data', repo_name='%(repo_name)s')}", ['repo_name']);
           })
            </script>
        </%def>
        <%def name="js_extra()"></%def>
        ${self.js()}
        <%def name="head_extra()"></%def>
        ${self.head_extra()}
    </head>
    <body id="body">
     ## IE hacks
      <!--[if IE 7]>
      <script>YUD.addClass(document.body,'ie7')</script>
      <![endif]-->
      <!--[if IE 8]>
      <script>YUD.addClass(document.body,'ie8')</script>
      <![endif]-->
      <!--[if IE 9]>
      <script>YUD.addClass(document.body,'ie9')</script>
      <![endif]-->

      ${next.body()}
    </body>
</html>