Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
[Issue 243] Remove "urth" references from HTML & CSS
Browse files Browse the repository at this point in the history
(c) Copyright IBM Corp. 2016
  • Loading branch information
dalogsdon committed May 25, 2016
1 parent 248b37e commit d7f6baf
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
* Distributed under the terms of the Modified BSD License.
*/

.urth-dashboard .container div.output_wrapper {
.jupyter-dashboard .container div.output_wrapper {
z-index: auto; /* override `z-index:1` set by Notebook */
}

.urth-dashboard .container div.output_subarea {
.jupyter-dashboard .container div.output_subarea {
max-width: 100%; /* override Notebook CSS so it takes up full width */
overflow: visible; /* ensure contents overflow, needed for widgets such as dropdown menus */
}

/* disable display of paragraph anchor text*/
.urth-dashboard .container h1 .anchor-link,
.urth-dashboard .container h2 .anchor-link,
.urth-dashboard .container h3 .anchor-link,
.urth-dashboard .container h4 .anchor-link,
.urth-dashboard .container h5 .anchor-link,
.urth-dashboard .container h6 .anchor-link {
.jupyter-dashboard .container h1 .anchor-link,
.jupyter-dashboard .container h2 .anchor-link,
.jupyter-dashboard .container h3 .anchor-link,
.jupyter-dashboard .container h4 .anchor-link,
.jupyter-dashboard .container h5 .anchor-link,
.jupyter-dashboard .container h6 .anchor-link {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,63 @@
* Distributed under the terms of the Modified BSD License.
*/

.urth-dashboard-menu-item {
.jupyter-dashboard-menu-item {
position: relative;
}
.urth-dashboard-menu-item.selected::before {
.jupyter-dashboard-menu-item.selected::before {
font-family: FontAwesome;
content: '\f00c';
position: absolute;
left: 4px;
top: 3px;
}

.urth-dashboard-toolbar-buttons {
.jupyter-dashboard-toolbar-buttons {
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
#maintoolbar .urth-dashboard-toolbar-buttons .navbar-text {
#maintoolbar .jupyter-dashboard-toolbar-buttons .navbar-text {
margin: 0 5px;
}

/* Dashboard authoring button with embedded layout dropdown */
#urth-dashboard-view-toolbar-buttons > button:first-of-type {
#jupyter-dashboard-view-toolbar-buttons > button:first-of-type {
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
}
#urth-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container {
#jupyter-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container {
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
border-width: 0;
padding: 0;
}
#urth-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .dashboard-authoring-btn,
#urth-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .db-embedded-dropdown-toggle {
#jupyter-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .dashboard-authoring-btn,
#jupyter-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .db-embedded-dropdown-toggle {
border-radius: 0;
border-color: inherit;
}
#urth-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .dashboard-authoring-btn {
#jupyter-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .dashboard-authoring-btn {
border-right: none;
background-color: transparent;
}
#urth-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .db-embedded-dropdown-toggle {
#jupyter-dashboard-view-toolbar-buttons > .dashboard-authoring-btn-container .db-embedded-dropdown-toggle {
border-left: none;
background-color: transparent;
}
#urth-dashboard-view-toolbar-buttons .dashboard-layout-menu-item {
#jupyter-dashboard-view-toolbar-buttons .dashboard-layout-menu-item {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
#urth-dashboard-view-toolbar-buttons .dashboard-layout-menu-item a {
#jupyter-dashboard-view-toolbar-buttons .dashboard-layout-menu-item a {
flex-grow: 1;
padding-left: 10px;
}
#urth-dashboard-view-toolbar-buttons .dashboard-layout-menu-item a i {
#jupyter-dashboard-view-toolbar-buttons .dashboard-layout-menu-item a i {
margin-right: 8px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ define([
DASHBOARD_PREVIEW: 'preview'
});
var currentState = STATE.NOTEBOOK;
var toolbarBtnsSelector = '#urth-dashboard-view-toolbar-buttons';
var toolbarBtnsSelector = '#jupyter-dashboard-view-toolbar-buttons';
var isHeaderVisible = true, isToolbarVisible = true;
var opts, scrollToBottom;

Expand All @@ -54,7 +54,7 @@ define([
return /^fa-/.test(value);
})[0];
}

function updateAuthoringButtonState(state) {
if (state &&
state !== STATE.NOTEBOOK &&
Expand Down Expand Up @@ -88,7 +88,7 @@ define([

// disable show/hide menu items when in preview state
$('.dashboard-submenu-item').toggleClass('disabled', state === STATE.NOTEBOOK || state === STATE.DASHBOARD_PREVIEW);
$('#urth-dashboard-show-all').toggleClass('disabled', state === STATE.NOTEBOOK || state === STATE.DASHBOARD_PREVIEW || state === STATE.DASHBOARD_AUTH_REPORT);
$('#jupyter-dashboard-show-all').toggleClass('disabled', state === STATE.NOTEBOOK || state === STATE.DASHBOARD_PREVIEW || state === STATE.DASHBOARD_AUTH_REPORT);
}

function setDashboardState(newState) {
Expand Down Expand Up @@ -180,7 +180,7 @@ define([
.click(function() {
var $el = $(this);
var state = $el.attr('data-dashboard-state');
if ($el.parents('#urth-dashboard-layout-menu').length) {
if ($el.parents('#jupyter-dashboard-layout-menu').length) {
Metadata.dashboardLayout = state;
}
setDashboardState(state);
Expand All @@ -191,9 +191,9 @@ define([

// Cell menu items to show/hide cells
$('#cell_menu').append('<li class="divider"/>', $subMenuTemplate.clone());
$('#urth-dashboard-show-all').click(opts.showAllCallback);
$('#urth-dashboard-show-all-stacked').click(opts.showAllStackedCallback);
$('#urth-dashboard-hide-all').click(opts.hideAllCallback);
$('#jupyter-dashboard-show-all').click(opts.showAllCallback);
$('#jupyter-dashboard-show-all-stacked').click(opts.showAllStackedCallback);
$('#jupyter-dashboard-hide-all').click(opts.hideAllCallback);
};

DashboardActions.prototype.addToolbarItems = function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@
*/
/**
* This module provides an API to manage notebook dashboard layout cell metadata.
*
* Dashboard metadata structure:
* https://github.com/jupyter-incubator/dashboards/wiki/Dashboard-Metadata-and-Rendering
*/
/*************
Dashboard metadata structure:
"metadata": {
"urth": {
"dashboard": {
"layout": {
"col":
...
},
"hidden": false
}
}
}
**************/
define([
'jquery',
'base/js/namespace'
Expand Down Expand Up @@ -148,7 +137,7 @@ define([
function _showCell(cells) {
$(cells).each(function() {
var metadata = _getCellMetadata($(this));
// add a layout object to indicate that this cell has explicitly
// add a layout object to indicate that this cell has explicitly
// been added to the layout either by some initialization routine
// that calculated the layout or the user
metadata.layout = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
*/

/* hide extraneous cell parts when in dashboard view */
.urth-dashboard .celltoolbar,
.urth-dashboard .container .cell .prompt,
.urth-dashboard .container .cell .output_stderr,
.urth-dashboard .container .cell .output_error {
.jupyter-dashboard .celltoolbar,
.jupyter-dashboard .container .cell .prompt,
.jupyter-dashboard .container .cell .output_stderr,
.jupyter-dashboard .container .cell .output_error {
display: none !important; /* Necessary to override inline style set by notebook */
}

/* Dashboard cell */
.urth-dashboard .cell {
.jupyter-dashboard .cell {
position: relative;
}
.urth-dashboard .cell,
.urth-dashboard .cell.selected {
.jupyter-dashboard .cell,
.jupyter-dashboard .cell.selected {
background: transparent;
border: none;
padding: 0;
}

/* Show cell code in the background of each cell */
.urth-dashboard:not(.view-only) .cell > .input {
.jupyter-dashboard:not(.view-only) .cell > .input {
position: absolute;
top: 0;
left: 0;
Expand All @@ -33,16 +33,16 @@
opacity: 0;
transition: opacity 0.3s;
}
.urth-dashboard:not(.view-only) #notebook-container:not(.hide-code):hover .cell > .input {
.jupyter-dashboard:not(.view-only) #notebook-container:not(.hide-code):hover .cell > .input {
opacity: 0.3;
}
.urth-dashboard:not(.view-only) #notebook-container:not(.hide-code) .cell > .input div.input_area {
.jupyter-dashboard:not(.view-only) #notebook-container:not(.hide-code) .cell > .input div.input_area {
border: none;
background: none;
}

/* Dashboard cell controls */
.urth-dashboard .cell .cell-control-container {
.jupyter-dashboard .cell .cell-control-container {
display: flex;
position: absolute;
color: #b2b2b2;
Expand All @@ -54,47 +54,47 @@
/* widgets overlap, so pull forward */
z-index: 100;
}
.urth-dashboard:not(.view-only) .cell:hover .cell-control-container {
.jupyter-dashboard:not(.view-only) .cell:hover .cell-control-container {
visibility: visible;
}
.urth-dashboard .cell .cell-control-container.cell-control-nw {
.jupyter-dashboard .cell .cell-control-container.cell-control-nw {
border-top: none;
border-left: none;
top: 0;
left: 0;
}
.urth-dashboard .cell .cell-control-container.cell-control-ne {
.jupyter-dashboard .cell .cell-control-container.cell-control-ne {
border-top: none;
border-right: none;
top: 0;
right: 0;
}
.urth-dashboard .cell .cell-control-container.cell-control-se {
.jupyter-dashboard .cell .cell-control-container.cell-control-se {
border-bottom: none;
border-right: none;
bottom: 0;
right: 0;
}
.urth-dashboard .cell .cell-control {
.jupyter-dashboard .cell .cell-control {
padding: 5px;
width: 25px;
height: 25px;
text-align: center;
cursor: pointer;
}
.urth-dashboard .cell .cell-control:hover {
.jupyter-dashboard .cell .cell-control:hover {
color: #306c9e;
}
.urth-dashboard .cell .cell-control.hide-btn:hover {
.jupyter-dashboard .cell .cell-control.hide-btn:hover {
color: red;
}

/* Hidden Cells */
.urth-dashboard #dashboard-hidden-header {
.jupyter-dashboard #dashboard-hidden-header {
height: 150px;
padding: 15px;
}
.urth-dashboard #dashboard-hidden-header .header {
.jupyter-dashboard #dashboard-hidden-header .header {
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
Expand All @@ -104,19 +104,19 @@
margin: 2em 0;
padding-top: 50px;
}
.urth-dashboard #dashboard-hidden-header .header .title {
.jupyter-dashboard #dashboard-hidden-header .header .title {
margin: 0 1em 0 0;
}
.urth-dashboard #dashboard-hidden-header .header .btn:not(.btn-info) {
.jupyter-dashboard #dashboard-hidden-header .header .btn:not(.btn-info) {
background-color: transparent;
border: 1px solid black;
}

/* Dashboard preview */
.urth-dashboard.view-only #dashboard-hidden-header {
.jupyter-dashboard.view-only #dashboard-hidden-header {
display: none;
}
.urth-dashboard.view-only .cell > .input {
.jupyter-dashboard.view-only .cell > .input {
display: none !important; /* Necessary to override inline style set by notebook */
}

Expand All @@ -135,6 +135,6 @@
}

/* Declarative widgets specific styles */
.urth-dashboard .cell .urth-widget-error {
.jupyter-dashboard .cell .urth-widget-error {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define([
// use global require.js to setup the paths for our dependencies
requirejs.config({
packages: [
{ name: 'urth-common', location: require.toUrl('../dashboard-common').split('?')[0] }
{ name: 'dashboard-common', location: require.toUrl('../dashboard-common').split('?')[0] }
],
paths: {
Gridstack: require.toUrl('../bower_components/gridstack/dist/gridstack.min').split('?')[0],
Expand Down Expand Up @@ -78,9 +78,10 @@ define([
DashboardActions,
Metadata
) {
var dashboardClass = 'jupyter-dashboard';
var dbActions = new DashboardActions({
enterDashboardMode: function(actionState) {
$('body').addClass('urth-dashboard');
$('body').addClass(dashboardClass);
require([
'./layout/grid/layout',
'./layout/report/layout',
Expand Down Expand Up @@ -144,7 +145,7 @@ define([
});
},
exitDashboardMode: function() {
$('body').removeClass('urth-dashboard')
$('body').removeClass(dashboardClass)
.attr('data-dashboard-layout', '');
dashboard.destroy();
dashboard = null;
Expand Down
Loading

0 comments on commit d7f6baf

Please sign in to comment.