From 09550fba2b07f57970a78f669da8cff6433fe364 Mon Sep 17 00:00:00 2001 From: Antriksh Yadav <“antrikshy@gmail.com”> Date: Tue, 24 Feb 2015 12:49:15 -0800 Subject: [PATCH 01/28] Started responsive font-sizing experiment --- .../distributed/hbtemplates/topics/sidebar.handlebars | 4 +++- kalite/distributed/static/css/distributed/sidebar.css | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/kalite/distributed/hbtemplates/topics/sidebar.handlebars b/kalite/distributed/hbtemplates/topics/sidebar.handlebars index 3c4a38f5e5..307a74b658 100644 --- a/kalite/distributed/hbtemplates/topics/sidebar.handlebars +++ b/kalite/distributed/hbtemplates/topics/sidebar.handlebars @@ -2,7 +2,9 @@ diff --git a/kalite/distributed/static/css/distributed/sidebar.css b/kalite/distributed/static/css/distributed/sidebar.css index ebfcab0ab2..b7fa609b33 100644 --- a/kalite/distributed/static/css/distributed/sidebar.css +++ b/kalite/distributed/static/css/distributed/sidebar.css @@ -1,5 +1,5 @@ .sidebar-icon { - font-size: 10pt; + font-size: 0.7em; padding-right: 10px; background-color: rgba(219, 219, 219, 0.19); border-radius: 3px; @@ -31,6 +31,7 @@ Nav Panel border-right: 1px solid rgba(0, 0, 0, 0.3); top: 0; bottom: 0; + font-size: 100%; } div.fade { @@ -95,7 +96,7 @@ div.fade { background: #5AA685; color: #fff; font-weight: bold; - font-size: 30px; + font-size: 1.9em; padding: 30px 10px; padding-left: 14px; border-color: rgba(0, 0, 0, 0.5); @@ -128,19 +129,19 @@ div.fade { padding-top: 20px; padding-bottom: 20px; border-left: 2px solid #587448; - font-size: 18px; + font-size: 2em; font-weight: bold; color: #CCC; } .sidebar-back { height: 100%; - width: 45px; + width: 2em; padding-top: 100px; text-align: center; color: #fff; background-color: #467471; - font-size: 24px; + font-size: 1.5em; border-right: 1px solid rgba(0, 0, 0, 0.3); position: absolute; z-index: 10000; From c263d6cb083b7435a4e18e6e1e1b4da52c3df434 Mon Sep 17 00:00:00 2001 From: Antriksh Yadav <“antrikshy@gmail.com”> Date: Fri, 27 Feb 2015 12:26:24 -0800 Subject: [PATCH 02/28] Started media queries in sidebar.css --- .../static/css/distributed/sidebar.css | 16 ++++++++++++++++ .../static/js/distributed/topics/views.js | 11 +++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/kalite/distributed/static/css/distributed/sidebar.css b/kalite/distributed/static/css/distributed/sidebar.css index b7fa609b33..e62fab3c2e 100644 --- a/kalite/distributed/static/css/distributed/sidebar.css +++ b/kalite/distributed/static/css/distributed/sidebar.css @@ -277,4 +277,20 @@ div.fade { margin-top: 2px; display:table-cell; vertical-align:middle; +} + +@media only screen and (min-width: 500px) { + .sidebar-panel { font-size: 85%; } +} + +@media only screen and (min-width: 720px) { + .sidebar-panel { font-size: 95%; } +} + +@media only screen and (min-width: 1000px) { + .sidebar-panel { font-size: 100%; } +} + +@media only screen and (min-width: 1300px) { + .sidebar-panel { font-size: 110%; } } \ No newline at end of file diff --git a/kalite/distributed/static/js/distributed/topics/views.js b/kalite/distributed/static/js/distributed/topics/views.js index 6571f8f64a..c941c88440 100644 --- a/kalite/distributed/static/js/distributed/topics/views.js +++ b/kalite/distributed/static/js/distributed/topics/views.js @@ -343,13 +343,12 @@ window.TopicContainerInnerView = BaseView.extend({ var video_ids = $.map(this.$(".icon-Video[data-content-id]"), function(el) { return $(el).data("content-id"); }); if (video_ids.length > 0) { videologs = new VideoLogCollection([], {content_ids: video_ids}); - videologs.fetch() - .then(function() { - videologs.models.forEach(function(model) { - var newClass = model.get("complete") ? "complete" : "partial"; - self.$("[data-video-id='" + model.get("video_id") + "']").removeClass("complete partial").addClass(newClass); - }); + videologs.fetch().then(function() { + videologs.models.forEach(function(model) { + var newClass = model.get("complete") ? "complete" : "partial"; + self.$("[data-video-id='" + model.get("video_id") + "']").removeClass("complete partial").addClass(newClass); }); + }); } // load progress data for all exercises From b99df147e748fc1f2e8fc65f87ebe48811aafe89 Mon Sep 17 00:00:00 2001 From: Michael Gallaspy Date: Fri, 27 Feb 2015 15:47:59 -0800 Subject: [PATCH 03/28] It was the cronserver mgmt command all along cronserver gunks up the works for the other kaserve command. Not clear to me why. I'm calling not executing it a workaround. Does it actually do anything? Also, fixed a bug in the 'status' command. Windows doesn't like an HTTPConnection with "0.0.0.0" address. --- kalitectl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kalitectl.py b/kalitectl.py index b81135056b..f39f1f5b86 100644 --- a/kalitectl.py +++ b/kalitectl.py @@ -219,7 +219,7 @@ def get_pid(): listen_port = getattr(settings, "CHERRYPY_PORT", LISTEN_PORT) # Timeout is 1 second, we don't want the status command to be slow - conn = httplib.HTTPConnection(LISTEN_ADDRESS, listen_port, timeout=3) + conn = httplib.HTTPConnection("127.0.0.1", listen_port, timeout=3) try: conn.request("GET", PING_URL) response = conn.getresponse() @@ -337,7 +337,7 @@ def start(debug=False, args=[], skip_job_scheduler=False): # This command is run before starting the server, in case the server # should be configured to not run in daemon mode or in case the # server fails to go to daemon mode. - if not skip_job_scheduler: + if False: manage( 'cronserver', in_background=True, From 60b62ba36a0a9c11b625ebc28ba0f18c17307a32 Mon Sep 17 00:00:00 2001 From: Michael Gallaspy Date: Tue, 3 Mar 2015 15:53:38 -0800 Subject: [PATCH 04/28] On windows, create new process for cronserver command For some reason, the thread running the cronserver management command (in Windows only) barfs and kills the whole process. This prevents the server from starting. Why does it get sick and die? Who knows? A better solution on windows (better than trying to UNIX-ly daemonize programs) seems to be to create windows services. Then kalitectl.py can simply start and stop those services. Just to be clear, there's no issue on windows with running the cronserver and kaserve command in separate processes (say, in different instances of cmd.exe or using subprocess.Popen), there's only an issue when they are run in different threads belonging to the same process. --- kalitectl.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kalitectl.py b/kalitectl.py index f39f1f5b86..8ddfdc2638 100644 --- a/kalitectl.py +++ b/kalitectl.py @@ -71,6 +71,7 @@ import httplib from urllib2 import URLError from socket import timeout +from subprocess import Popen, CREATE_NEW_PROCESS_GROUP from kalite.version import VERSION # Necessary for loading default settings from kalite @@ -290,8 +291,11 @@ def manage(command, args=[], in_background=False): utility.prog_name = 'kalite manage' utility.execute() else: - thread = ManageThread(command, args=args) - thread.start() + if os.name != "nt": + thread = ManageThread(command, args=args, name=" ".join([command]+args)) + thread.start() + else: + Popen([sys.executable, os.path.abspath(sys.argv[0]), "manage", command] + args, creationflags=CREATE_NEW_PROCESS_GROUP) def start(debug=False, args=[], skip_job_scheduler=False): @@ -337,7 +341,7 @@ def start(debug=False, args=[], skip_job_scheduler=False): # This command is run before starting the server, in case the server # should be configured to not run in daemon mode or in case the # server fails to go to daemon mode. - if False: + if not skip_job_scheduler: manage( 'cronserver', in_background=True, From abdcff070c741f3344df653dda06a15302cac11a Mon Sep 17 00:00:00 2001 From: Michael Gallaspy Date: Tue, 3 Mar 2015 16:06:43 -0800 Subject: [PATCH 05/28] Conditionally import windows-specific stuff --- kalitectl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kalitectl.py b/kalitectl.py index 8ddfdc2638..2738394b1d 100644 --- a/kalitectl.py +++ b/kalitectl.py @@ -71,9 +71,11 @@ import httplib from urllib2 import URLError from socket import timeout -from subprocess import Popen, CREATE_NEW_PROCESS_GROUP from kalite.version import VERSION +if os.name == "nt": + from subprocess import Popen, CREATE_NEW_PROCESS_GROUP + # Necessary for loading default settings from kalite os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kalite.settings") From 030285ab958f0e612b8d17254131547deea1f5e1 Mon Sep 17 00:00:00 2001 From: Antriksh Yadav <“antrikshy@gmail.com”> Date: Wed, 4 Mar 2015 14:40:26 -0800 Subject: [PATCH 06/28] Removed double declaration of last sidebar view's width --- .../static/css/distributed/sidebar.css | 29 +++++++++++++++---- .../static/js/distributed/topics/views.js | 2 +- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/kalite/distributed/static/css/distributed/sidebar.css b/kalite/distributed/static/css/distributed/sidebar.css index bb2b69d2c9..a1461c0d64 100644 --- a/kalite/distributed/static/css/distributed/sidebar.css +++ b/kalite/distributed/static/css/distributed/sidebar.css @@ -145,7 +145,6 @@ div.fade { .topic-container-inner { float: left; width: 200px; - /*max-width: 25%;*/ border-right: 1px solid rgba(0, 0, 0, 0.3); } @@ -262,17 +261,37 @@ div.fade { } @media only screen and (min-width: 500px) { - .sidebar-panel { font-size: 85%; } + .sidebar-panel { + font-size: 85%; + } + .topic-container-inner:last-child { + width: 300px; + } } @media only screen and (min-width: 720px) { - .sidebar-panel { font-size: 95%; } + .sidebar-panel { + font-size: 90%; + } + .topic-container-inner:last-child { + width: 300px; + } } @media only screen and (min-width: 1000px) { - .sidebar-panel { font-size: 100%; } + .sidebar-panel { + font-size: 100%; + } + .topic-container-inner:last-child { + width: 400px; + } } @media only screen and (min-width: 1300px) { - .sidebar-panel { font-size: 110%; } + .sidebar-panel { + font-size: 110%; + } + .topic-container-inner:last-child { + width: 400px; + } } \ No newline at end of file diff --git a/kalite/distributed/static/js/distributed/topics/views.js b/kalite/distributed/static/js/distributed/topics/views.js index d1b7f3c62e..90b27f7023 100644 --- a/kalite/distributed/static/js/distributed/topics/views.js +++ b/kalite/distributed/static/js/distributed/topics/views.js @@ -114,7 +114,7 @@ window.SidebarView = BaseView.extend({ resize_for_narrow: _.debounce(function() { var current_level = this.state_model.get("current_level"); var column_width = this.$(".topic-container-inner").width(); - var last_column_width = 400; + var last_column_width = this.$(".topic-container-inner:last-child").width(); // Hack to give the last child of .topic-container-inner to be 1.5 times the // width of their parents. Also, sidebar overflow out of the left side of screen // is computed and set here. From d7d1ee559d4d9e9873f28392b66d94a53662f71c Mon Sep 17 00:00:00 2001 From: Antriksh Yadav <“antrikshy@gmail.com”> Date: Thu, 5 Mar 2015 13:12:25 -0800 Subject: [PATCH 07/28] Added 4-panel level, auto-resizing on window resize --- .../static/js/distributed/topics/views.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/kalite/distributed/static/js/distributed/topics/views.js b/kalite/distributed/static/js/distributed/topics/views.js index 90b27f7023..98cce5fbc6 100644 --- a/kalite/distributed/static/js/distributed/topics/views.js +++ b/kalite/distributed/static/js/distributed/topics/views.js @@ -57,6 +57,10 @@ window.SidebarView = BaseView.extend({ initialize: function(options) { var self = this; + $(window).on("resize", function() { + self.resize_sidebar(); + }); + this.entity_key = options.entity_key; this.entity_collection = options.entity_collection; @@ -120,12 +124,15 @@ window.SidebarView = BaseView.extend({ // is computed and set here. // THE magic variable that controls number of visible panels - var numOfPanelsToShow = 3; + var numOfPanelsToShow = 4; + + if ($(window).width() < 1120) + numOfPanelsToShow = 3; if ($(window).width() < 920) numOfPanelsToShow = 2; - if ($(window).width() < 720) + if ($(window).width() < 620) numOfPanelsToShow = 1; // Used to get left value in number form @@ -141,9 +148,9 @@ window.SidebarView = BaseView.extend({ var originalBackColor = this.sidebarBack.css('background-color'); this.sidebarBack.css('background-color', this.sidebarTab.css('background-color')).animate({'background-color': originalBackColor}); - var thisTemp = this; + var self = this; this.sidebar.animate({"left": sidebarPanelNewLeft}, 115, function() { - thisTemp.set_sidebar_back(); + self.set_sidebar_back(); }); this.sidebarTab.animate({left: this.sidebar.width() + sidebarPanelNewLeft}, 115); From 8b4be869a7e53ffcdffcd17bfd64feab29f4fae6 Mon Sep 17 00:00:00 2001 From: jtamiace Date: Fri, 6 Mar 2015 14:14:29 -0800 Subject: [PATCH 08/28] fixed 1st and 2nd level navigation bugs --- .../templates/control_panel/data_export.html | 2 +- .../control_panel/device_management.html | 2 +- .../control_panel/facility_management.html | 3 +- .../control_panel/zone_management.html | 2 +- .../css/distributed/bootstrap-overrides.css | 3 -- .../static/css/distributed/khan-lite.css | 45 +------------------ .../templates/distributed/base.html | 10 ++--- .../templates/distributed/base_manage.html | 11 ++--- .../templates/distributed/coachreport.html | 13 +----- .../facility/templates/facility/facility.html | 5 +-- .../facility/facility_selection.html | 3 +- .../templates/facility/facility_user.html | 1 - .../templates/playlist/assign_playlists.html | 4 +- .../templates/updates/update_languages.html | 2 +- .../templates/updates/update_software.html | 2 +- .../templates/updates/update_videos.html | 2 +- 16 files changed, 27 insertions(+), 83 deletions(-) diff --git a/kalite/control_panel/templates/control_panel/data_export.html b/kalite/control_panel/templates/control_panel/data_export.html index 2477f4fc13..598e6fba10 100644 --- a/kalite/control_panel/templates/control_panel/data_export.html +++ b/kalite/control_panel/templates/control_panel/data_export.html @@ -3,7 +3,7 @@ {% load staticfiles %} {% load include_block %} -{% block facility_active %}facility-active active-tab active-nav{% endblock facility_active %} +{% block facility_active %}active{% endblock facility_active %} {% block title %}{{ zone.name }} - {% trans "Data Export" %} {{ block.super }}{% endblock title %} diff --git a/kalite/control_panel/templates/control_panel/device_management.html b/kalite/control_panel/templates/control_panel/device_management.html index 1574d9a6bb..8447a8a8c4 100644 --- a/kalite/control_panel/templates/control_panel/device_management.html +++ b/kalite/control_panel/templates/control_panel/device_management.html @@ -8,7 +8,7 @@ {% block i18n_do_not_translate %} {% block users_active %}active{% endblock users_active %} {% block manage_active %}active{% endblock manage_active %} - {% block facility_active %}facility-active active-tab active-nav{% endblock facility_active %} + {% block facility_active %}active{% endblock facility_active %} {% endblock i18n_do_not_translate %} {% block headcss %}{{ block.super }} diff --git a/kalite/control_panel/templates/control_panel/facility_management.html b/kalite/control_panel/templates/control_panel/facility_management.html index 4665bc847a..628bd10cb4 100644 --- a/kalite/control_panel/templates/control_panel/facility_management.html +++ b/kalite/control_panel/templates/control_panel/facility_management.html @@ -4,8 +4,7 @@ {% load staticfiles %} {% block control_panel_active %}{% endblock %} -{% block users_active %}active{% endblock %} -{% block user_active %}users-active active-tab active-nav{% endblock user_active %} +{% block user_active %}active{% endblock user_active %} {% block title %}{{ facility.name }} - {% trans "Facility Management" %}{% endblock title %} diff --git a/kalite/control_panel/templates/control_panel/zone_management.html b/kalite/control_panel/templates/control_panel/zone_management.html index 72eb5c6672..e01f058b2d 100644 --- a/kalite/control_panel/templates/control_panel/zone_management.html +++ b/kalite/control_panel/templates/control_panel/zone_management.html @@ -7,7 +7,7 @@ {% block users_active %}active{% endblock users_active %} {% block manage_active %}active{% endblock manage_active %} -{% block facility_active %}facility-active active-tab active-nav{% endblock facility_active %} +{% block facility_active %}active{% endblock facility_active %} {% block headcss %}{{ block.super }} {% if clock_set %} diff --git a/kalite/distributed/static/css/distributed/bootstrap-overrides.css b/kalite/distributed/static/css/distributed/bootstrap-overrides.css index ba29e31860..728c0a5f71 100644 --- a/kalite/distributed/static/css/distributed/bootstrap-overrides.css +++ b/kalite/distributed/static/css/distributed/bootstrap-overrides.css @@ -119,9 +119,6 @@ input[type="submit"] { .nav-tabs li a:hover, .nav-tabs li.active a { background-color: white; - border-left: 2px solid #5AA685; - border-top: 2px solid #5AA685; - border-right: 2px solid #5AA685; color: #5AA685; -webkit-transition: all 80ms ease-out; -moz-transition: all 80ms ease-out; diff --git a/kalite/distributed/static/css/distributed/khan-lite.css b/kalite/distributed/static/css/distributed/khan-lite.css index f2611fc9be..7976fd4fe1 100755 --- a/kalite/distributed/static/css/distributed/khan-lite.css +++ b/kalite/distributed/static/css/distributed/khan-lite.css @@ -261,7 +261,6 @@ a:hover { } .manage-nav ul { padding-left: 1%; - margin-bottom: -4px; height: 87px; } .manage-nav li { @@ -294,20 +293,10 @@ a:hover { border-top-left-radius: 5px; border-top-right-radius: 17px; } -.manage-nav li div { - position: relative; - width: 110px; - height: 85px; - /*line-height: 9.5;*/ - margin-left: -3px; - margin-top: 5px; -} .manage-nav li div:hover { color: #5AA685; } .manage-nav li a:hover { - border-top-left-radius: 5px !important; - border-top-right-radius: 16px !important; color: #5AA685; font-weight: bold; text-decoration: none; @@ -318,41 +307,9 @@ a:hover { .active-nav { color: #405D32 !important; background-color: white !important; - border-top-left-radius: 5px !important; - border-top-right-radius: 16px !important; font-weight: bold; } -.users { - background-position: center 7px; - height: 87px; -} -.users:hover, .users-active { - background-position: center 7px; - height: 87px; -} -.video { - background-position: center 7px; - height: 87px; -} -.video:hover, .video-active { - background-position: center 7px; - height: 87px; -} -.languages { - background-position: center 7px; - height: 87px; -} -.languages:hover, .languages-active { - background-position: center 7px; - height: 87px; -} -.facility { - background-position: center 7px; - height: 87px; -} -.facility:hover, .facility-active { - background-position: center 7px; - height: 87px; + } /********* End "Admin" Sub-Navigation bar **********/ diff --git a/kalite/distributed/templates/distributed/base.html b/kalite/distributed/templates/distributed/base.html index a8a9dd7521..b56827514a 100644 --- a/kalite/distributed/templates/distributed/base.html +++ b/kalite/distributed/templates/distributed/base.html @@ -196,7 +196,7 @@ - {% if is_config_package_nalanda %} + {% if is_config_package_nalanda and not request.session.facility_user.facility %} {# Teach for admins => assigning playlists #}
  • @@ -204,10 +204,10 @@
  • {% endif %} - {% if request.is_django_user %} + {% if request.is_django_user and not is_config_package_nalanda %} {# Teach for admins => coachreports #}
  • - + {% trans "Teach" %}
  • @@ -216,7 +216,7 @@ {# Manage for admins => zone control panel #} {% if request.is_django_user %}
  • - + {% trans "Manage" %}
  • @@ -225,7 +225,7 @@ {# Teach for teachers => coachreports #} - {% if request.is_admin and not request.is_django_admin %} + {% if request.is_admin %}
  • {% trans "Teach" %} diff --git a/kalite/distributed/templates/distributed/base_manage.html b/kalite/distributed/templates/distributed/base_manage.html index e8b95de7c6..d4200f33bf 100644 --- a/kalite/distributed/templates/distributed/base_manage.html +++ b/kalite/distributed/templates/distributed/base_manage.html @@ -10,14 +10,15 @@ {% endblock i18n_do_not_translate %} {% block subnavbar %} + {% endblock subnavbar %} \ No newline at end of file diff --git a/kalite/distributed/templates/distributed/coachreport.html b/kalite/distributed/templates/distributed/coachreport.html index 1663af943a..123f680415 100644 --- a/kalite/distributed/templates/distributed/coachreport.html +++ b/kalite/distributed/templates/distributed/coachreport.html @@ -6,15 +6,4 @@ {% block headcss %}{{block.super}}{% endblock headcss %} -{% block subnavbar %}{{block.super}} - - - - -{% endblock subnavbar %} +{% block subnavbar %}{{block.super}}{% endblock subnavbar %} diff --git a/kalite/facility/templates/facility/facility.html b/kalite/facility/templates/facility/facility.html index a49eea0811..3867723cf2 100644 --- a/kalite/facility/templates/facility/facility.html +++ b/kalite/facility/templates/facility/facility.html @@ -12,9 +12,7 @@ {% endblock title %} {% block i18n_do_not_translate %} - {% block facility_active %}facility-active active-tab active-nav{% endblock facility_active %} - {% block update_active %}active{% endblock update_active %} - {% block users_active %}active{% endblock %} + {% block facility_active %}active{% endblock facility_active %} {% endblock i18n_do_not_translate %} {% block headcss %} @@ -183,6 +181,7 @@ {% block content %} {{ block.super }} +

    {% if form.instance.id %}{% trans "Edit a facility" %}{% else %}{% trans "Add a new Facility" %}{% endif %}

    {% trans "Please enter the following information about your facility. Please enter a detailed address, because knowing where you are in the world allows us to better plan for future deployments and partnerships." %}
    diff --git a/kalite/facility/templates/facility/facility_selection.html b/kalite/facility/templates/facility/facility_selection.html index 6958f64a53..5af21cc67c 100644 --- a/kalite/facility/templates/facility/facility_selection.html +++ b/kalite/facility/templates/facility/facility_selection.html @@ -24,7 +24,8 @@ {% block content %} -{% block manage_nav %}{{block.super}}{% endblock manage_nav %} +{{% block manage_nav %}{{block.super}}{% endblock manage_nav %}} +{% block facility_active %}active{% endblock facility_active %} {{ path_template }}
    diff --git a/kalite/facility/templates/facility/facility_user.html b/kalite/facility/templates/facility/facility_user.html index 44421f85ef..1f075dead6 100644 --- a/kalite/facility/templates/facility/facility_user.html +++ b/kalite/facility/templates/facility/facility_user.html @@ -4,7 +4,6 @@ {% block title %}{% trans title %}{% endblock title %} {% block i18n_do_not_translate %} - {% block user_active %}user-active active-tab active-nav{% endblock user_active %} {% block users_active %}active{% endblock %} {% block signup_active %}active{% endblock signup_active %} {% endblock i18n_do_not_translate %} diff --git a/kalite/playlist/templates/playlist/assign_playlists.html b/kalite/playlist/templates/playlist/assign_playlists.html index 5aa46a7320..9b67d84d64 100644 --- a/kalite/playlist/templates/playlist/assign_playlists.html +++ b/kalite/playlist/templates/playlist/assign_playlists.html @@ -3,11 +3,12 @@ {% load i18n %} {% load kalite_staticfiles %} + {% block home_active %}active{% endblock home_active %} {% block playlist_active %}playlists-active active-tab active-nav{% endblock playlist_active %} {% block teacher_active %}active{% endblock teacher_active %} -{% block admin_active %}active{% endblock admin_active %} {% block assign_playlists_active %}active{% endblock assign_playlists_active %} +{% block teach_active_admins-nalanda %}active{% endblock teach_active_admins-nalanda %} {% block headcss %}{{ block.super }} @@ -36,6 +37,7 @@ {% endblock headjs %} {% block content %} +{% block subnavbar %}{{block.super}}{% endblock subnavbar %}
    diff --git a/kalite/updates/templates/updates/update_languages.html b/kalite/updates/templates/updates/update_languages.html index 6a7b7c65bd..3c70b0e6cf 100644 --- a/kalite/updates/templates/updates/update_languages.html +++ b/kalite/updates/templates/updates/update_languages.html @@ -3,7 +3,7 @@ {% load staticfiles %} {% block i18n_do_not_translate %} - {% block languages_active %}languages-active active-tab active-nav{% endblock languages_active %} + {% block languages_active %}active active-tab active-nav{% endblock languages_active %} {% block users_active %}active{% endblock users_active %} {% block manage_active %}active{% endblock manage_active %} {% endblock i18n_do_not_translate %} diff --git a/kalite/updates/templates/updates/update_software.html b/kalite/updates/templates/updates/update_software.html index 54f372145f..16b8b8dfbc 100644 --- a/kalite/updates/templates/updates/update_software.html +++ b/kalite/updates/templates/updates/update_software.html @@ -6,7 +6,7 @@ {% block title %}{% trans "Update Software" %}{% endblock %} {% block i18n_do_not_translate %} - {% block facility_active %}facility-active active-tab active-nav{% endblock facility_active %} + {% block facility_active %}active{% endblock facility_active %} {% endblock i18n_do_not_translate %} {% block headcss %}{{ block.super }} diff --git a/kalite/updates/templates/updates/update_videos.html b/kalite/updates/templates/updates/update_videos.html index ff83b13dd8..33136d6b85 100644 --- a/kalite/updates/templates/updates/update_videos.html +++ b/kalite/updates/templates/updates/update_videos.html @@ -6,7 +6,7 @@ {% block i18n_do_not_translate %} {% block users_active %}active{% endblock users_active %} {% block manage_active %}active{% endblock manage_active %} - {% block video_active %}video-active active-tab active-nav{% endblock video_active %} + {% block video_active %}active{% endblock video_active %} {% endblock i18n_do_not_translate %} {% block title %}{% trans "Update Videos" %}{% endblock %} From 0f87224d3dfe87fb5207865a5bf001c7bd187275 Mon Sep 17 00:00:00 2001 From: jtamiace Date: Fri, 6 Mar 2015 14:29:09 -0800 Subject: [PATCH 09/28] fixed 1st and 2nd level navigation bugs part 2 --- kalite/distributed/templates/distributed/base.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kalite/distributed/templates/distributed/base.html b/kalite/distributed/templates/distributed/base.html index 0ff74dc171..987ac49958 100644 --- a/kalite/distributed/templates/distributed/base.html +++ b/kalite/distributed/templates/distributed/base.html @@ -204,10 +204,10 @@
  • {% endif %} - {% if request.is_django_user and not is_config_package_nalanda %} + {% if request.is_admin and not request.session.facility_user.facility %} {# Teach for admins => coachreports #}
  • - + {% trans "Teach" %}
  • @@ -225,13 +225,11 @@ {# Teach for teachers => coachreports #} - {% if request.is_admin %}
  • {% trans "Teach" %}
  • - {% endif %} {# Manage for teachers => facility management #} {% if request.session.facility_user.facility %} From 4bb882fd5804871697675150413536798ebdd1a3 Mon Sep 17 00:00:00 2001 From: jtamiace Date: Fri, 6 Mar 2015 15:06:06 -0800 Subject: [PATCH 10/28] fixed 1st and 2nd level navigation bugs part... 3 --- kalite/distributed/static/css/distributed/khan-lite.css | 1 - kalite/distributed/templates/distributed/base.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/kalite/distributed/static/css/distributed/khan-lite.css b/kalite/distributed/static/css/distributed/khan-lite.css index ae10bb704b..ab49422fe4 100755 --- a/kalite/distributed/static/css/distributed/khan-lite.css +++ b/kalite/distributed/static/css/distributed/khan-lite.css @@ -213,7 +213,6 @@ a:hover { .reports:hover, .reports-active { background-position: center 7px; height: 87px; - color: #5AA685 !important; } .playlist { background-position: center 7px; diff --git a/kalite/distributed/templates/distributed/base.html b/kalite/distributed/templates/distributed/base.html index 987ac49958..ca964145ed 100644 --- a/kalite/distributed/templates/distributed/base.html +++ b/kalite/distributed/templates/distributed/base.html @@ -204,7 +204,7 @@ {% endif %} - {% if request.is_admin and not request.session.facility_user.facility %} + {% if request.is_admin and not request.session.facility_user.facility and not is_config_package_nalanda %} {# Teach for admins => coachreports #}
  • From 2f2ab4f4d4422354dbe0f24bbb2a3d0411324cc8 Mon Sep 17 00:00:00 2001 From: jtamiace Date: Fri, 6 Mar 2015 17:17:35 -0800 Subject: [PATCH 11/28] fixed 1st and 2nd level navigation FINAL --- .../css/distributed/bootstrap-overrides.css | 5 +- .../static/css/distributed/khan-lite.css | 54 ++++++++----------- .../templates/distributed/base.html | 2 +- .../templates/distributed/base_manage.html | 4 +- .../templates/distributed/base_teach.html | 4 +- 5 files changed, 31 insertions(+), 38 deletions(-) diff --git a/kalite/distributed/static/css/distributed/bootstrap-overrides.css b/kalite/distributed/static/css/distributed/bootstrap-overrides.css index 728c0a5f71..641e88ce73 100644 --- a/kalite/distributed/static/css/distributed/bootstrap-overrides.css +++ b/kalite/distributed/static/css/distributed/bootstrap-overrides.css @@ -101,7 +101,7 @@ input[type="submit"] { } .nav-tabs li a, .nav-tabs li.active a, -.nav-tabls li a:active { +.nav-tabs li a:active { border: 0; border-radius: 5px 15px 0 0; margin: 0; @@ -115,6 +115,9 @@ input[type="submit"] { #points { margin-left: 20px; } +.nav-tabs li.active a:hover { + border: none; +} .nav-tabs li.active a:hover, .nav-tabs li a:hover, .nav-tabs li.active a { diff --git a/kalite/distributed/static/css/distributed/khan-lite.css b/kalite/distributed/static/css/distributed/khan-lite.css index ab49422fe4..cdbbcecc57 100755 --- a/kalite/distributed/static/css/distributed/khan-lite.css +++ b/kalite/distributed/static/css/distributed/khan-lite.css @@ -200,36 +200,19 @@ a:hover { font-weight: bold; } .active-tab { - height: 89px; - width: 110px; + } .active-tab div { color: #5AA685 !important; } -.reports { - background-position: center 7px; - height: 87px; -} -.reports:hover, .reports-active { - background-position: center 7px; - height: 87px; -} -.playlist { - background-position: center 7px; - height: 87px; -} -.playlist:hover, .playlists-active { - background-position: center 7px; - height: 87px; -} -.exams { - background-position: center 7px; - height: 87px; -} -.exams:hover, .exams-active { +.reports, .reports:hover, .reports-active, +.playlist, .playlist:hover, .playlists-active, +.exams, .exams:hover, .exams-active, +.learn, .learn:hover, .learn-active { background-position: center 7px; height: 87px; } + .units { background: url("../../images/distributed/units-icon.png") no-repeat; background-position: center 7px; @@ -240,14 +223,7 @@ a:hover { background-position: center 7px; height: 87px; } -.learn { - background-position: center 7px; - height: 87px; -} -.learn:hover, .learn-active { - background-position: center 7px; - height: 87px; -} + /********* End Sub-Navigation bar **********/ @@ -260,7 +236,7 @@ a:hover { } .manage-nav ul { padding-left: 1%; - height: 87px; + margin-bottom: -1px; } .manage-nav li { background-color: #5AA685; @@ -303,6 +279,20 @@ a:hover { .manage-nav span.icon { font-size: 40pt; } +.top-level-active { + padding-right: 0px !important; + margin-right: 7px; + background-color: white; + color: #5AA685; + border-top: 2px solid #eee; + border-right: 2px solid #eee; + border-left: 2px solid #eee; + border-radius: 5px 15px 0 0; + -webkit-transition: all 80ms ease-out; + -moz-transition: all 80ms ease-out; + -o-transition: all 80ms ease-out; + transition: all 80ms ease-out; +} .active-nav { color: #405D32 !important; background-color: white !important; diff --git a/kalite/distributed/templates/distributed/base.html b/kalite/distributed/templates/distributed/base.html index ca964145ed..07e5724849 100644 --- a/kalite/distributed/templates/distributed/base.html +++ b/kalite/distributed/templates/distributed/base.html @@ -165,7 +165,7 @@