# HG changeset patch # User ymh # Date 1380329726 -7200 # Node ID 6ec0300b626e795fc80d8dbeaceeaa9c645e37d9 # Parent ece69ca3ac24b59ca98ba41fb460d9d9782c1048 - update django - clear search input - footer diff -r ece69ca3ac24 -r 6ec0300b626e .hgignore --- a/.hgignore Thu Sep 26 15:24:41 2013 +0200 +++ b/.hgignore Sat Sep 28 02:55:26 2013 +0200 @@ -6,4 +6,6 @@ ^virtualenv/web/project-boot\.py$ ^virtualenv/web/env$ ^\.settings$ -^web/static$ \ No newline at end of file +^web/static$ +syntax: regexp +^doc/_build$ \ No newline at end of file diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/__init__.py --- a/src/p4l/__init__.py Thu Sep 26 15:24:41 2013 +0200 +++ b/src/p4l/__init__.py Sat Sep 28 02:55:26 2013 +0200 @@ -0,0 +1,15 @@ +VERSION = (0, 1, 0, "alpha", 0) + + +def get_version(): + version = '%s.%s' % (VERSION[0], VERSION[1]) + if VERSION[2]: + version = '%s.%s' % (version, VERSION[2]) + if VERSION[3:] == ('alpha', 0): + version = '%s alpha' % version + else: + if VERSION[3] != 'final': + version = '%s %s %s' % (version, VERSION[3], VERSION[4]) + return version + +__version__ = get_version() diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/context_processors.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/p4l/context_processors.py Sat Sep 28 02:55:26 2013 +0200 @@ -0,0 +1,4 @@ +from p4l import get_version + +def version(request): + return { 'VERSION': get_version() } diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/settings.py --- a/src/p4l/settings.py Thu Sep 26 15:24:41 2013 +0200 +++ b/src/p4l/settings.py Sat Sep 28 02:55:26 2013 +0200 @@ -143,6 +143,7 @@ TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( 'django.core.context_processors.i18n', 'django.core.context_processors.request', + 'p4l.context_processors.version', ) # A sample logging configuration. The only tangible logging diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/static/p4l/css/p4l.css --- a/src/p4l/static/p4l/css/p4l.css Thu Sep 26 15:24:41 2013 +0200 +++ b/src/p4l/static/p4l/css/p4l.css Sat Sep 28 02:55:26 2013 +0200 @@ -2,6 +2,12 @@ * modif from bootstrap for p4l */ +html, +body { + height: 100%; + /* The html and body elements cannot have any padding or margin. */ +} + .container { margin: 0 auto; width: 950px; @@ -22,8 +28,10 @@ .two_buttons{ min-width: 100px; } + footer { - padding-bottom: 20px; + padding-bottom: 20px; + border-top: 1px solid gray; } .bottom-5 { margin-bottom: 5px; @@ -93,3 +101,55 @@ [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; } + + +.version { + text-align: right; + color: white; + font-size:9px; +} + +.version:hover { + color: inherit; + text-decoration: none; + border-bottom-width: 0px; + border-bottom-style: none; +} + +#wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + /* Negative indent footer by it's height */ + margin: 0 auto -70px; +} + +/* Set the fixed height of the footer here */ +#push, +footer { + height: 70px; +} + +.footer-img { + padding: 10px 0; +} + +#search-input { + padding-right: 24px; +} + +#search-input-cancel { + text-indent: -1000em; + top: 3px; + right: 0.5em; +} + +#langselect { + padding-bottom: 10px; +} + + +#copyright-version a { + text-decoration: none; + color: inherit; +} \ No newline at end of file diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/static/p4l/img/logo_IRI_footer.png Binary file src/p4l/static/p4l/img/logo_IRI_footer.png has changed diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/static/p4l/js/p4l.js --- a/src/p4l/static/p4l/js/p4l.js Thu Sep 26 15:24:41 2013 +0200 +++ b/src/p4l/static/p4l/js/p4l.js Sat Sep 28 02:55:26 2013 +0200 @@ -185,7 +185,9 @@ // Get queries attributes from $scope listname and context query dict var attr_dict = context.query_dicts[$scope.listname]; for (var k in attr_dict){ - $scope[k] = attr_dict[k]; + if (attr_dict.hasOwnProperty(k)) { + $scope[k] = attr_dict[k]; + } } $scope.formVisible = false; // initalize autocomplete and browse thesaurus events @@ -239,12 +241,9 @@ link: function($scope, $element, $attrs) { // Get queries attributes from $scope listname and context query dict var attr_dict = context.query_dicts[$scope.listname]; - for (var k in attr_dict){ - if (attr_dict.hasOwnProperty(k)) { - $scope[k] = attr_dict[k]; - } - } + angular.extend($scope, attr_dict); $scope.formVisible = false; + // initalize autocomplete and browse thesaurus events // We have to timeout because init_browse needs the real ids and not {{ $id }} // NB : scope.apply generates bug diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/static/p4l/js/p4l_home.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/p4l/static/p4l/js/p4l_home.js Sat Sep 28 02:55:26 2013 +0200 @@ -0,0 +1,19 @@ +"use strict"; + +$(function() { + $("#search-input").on('input', function(e) { + if($("#search-input").val().length) { + $("#search-input-cancel").show(); + } + else { + $("#search-input-cancel").hide(); + } + }); + $("#search-input-cancel").click(function(e) { + if($("#search-input").val().length) { + $("#search-input").val(""); + $("#search-input-cancel").hide(); + } + }); + +}); \ No newline at end of file diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/templates/p4l/base.html --- a/src/p4l/templates/p4l/base.html Thu Sep 26 15:24:41 2013 +0200 +++ b/src/p4l/templates/p4l/base.html Sat Sep 28 02:55:26 2013 +0200 @@ -19,6 +19,7 @@ {% block body %} +
+ {% block js_common %} diff -r ece69ca3ac24 -r 6ec0300b626e src/p4l/templates/p4l/home.html --- a/src/p4l/templates/p4l/home.html Thu Sep 26 15:24:41 2013 +0200 +++ b/src/p4l/templates/p4l/home.html Sat Sep 28 02:55:26 2013 +0200 @@ -5,13 +5,18 @@ {% block page_title %}{% trans 'Record List' %} - {% trans 'Page' %} {{ page.number }}{% endblock %} +{% block js_page %} + + +{% endblock %} + {% block content %}

{% trans 'Record List' %}

- +
diff -r ece69ca3ac24 -r 6ec0300b626e virtualenv/res/src/django-1.5.4-IRI.tar.gz Binary file virtualenv/res/src/django-1.5.4-IRI.tar.gz has changed