Skip to content

Commit

Permalink
Merge pull request #1860 from samarsultan/4.x
Browse files Browse the repository at this point in the history
Adding GUI Mirroring- issue #1852
  • Loading branch information
rgbkrk authored Oct 31, 2016
2 parents cf7dae8 + fc8dd8a commit 09b2a8b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions notebook/static/base/less/page.less
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ body > #header {
}


[dir="rtl"] #ipython_notebook {
float: right !important;
}

#noscript {
width: auto;
Expand Down
8 changes: 8 additions & 0 deletions notebook/static/tree/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ require([

page = new page.Page();

function isMirroringEnabled() {
return (new RegExp("^(ar|he)").test(navigator.language));
}

if (isMirroringEnabled()) {
$("body").attr("dir","rtl");
}

var common_options = {
base_url: utils.get_body_data("baseUrl"),
notebook_path: utils.get_body_data("notebookPath"),
Expand Down
37 changes: 37 additions & 0 deletions notebook/static/tree/less/tree.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
// The left padding of the selector button's contents.
@dashboard-selectorbtn-lpad: 7px;

[dir="rtl"] #tabs li {
float: right;
}

ul#tabs {
margin-bottom: @dashboard_tb_pad;
}

[dir="rtl"] ul#tabs {
margin-right:0px;
}

ul#tabs a {
padding-top: @dashboard_tb_pad + 2px;
padding-bottom: @dashboard_tb_pad;
Expand Down Expand Up @@ -48,6 +56,21 @@ ul.breadcrumb {
}
}

[dir="rtl"] .list_toolbar {
.tree-buttons {
float: left !important;
}

.pull-right {
padding-top: 1px;
float: left !important;
}

.pull-left {
float: right !important;
}
}

.dynamic-buttons {
padding-top: @dashboard_tb_pad - 1px;
display: inline-block;
Expand Down Expand Up @@ -192,6 +215,10 @@ ul.breadcrumb {
padding-right: 0px;
}

[dir="rtl"] #tree-selector a {
float: right;
}

#button-select-all {
min-width: 50px;
}
Expand Down Expand Up @@ -246,6 +273,10 @@ ul#new-menu {
right: 0;
}

[dir="rtl"] #new-menu {
text-align: right;
}

.kernel-menu-icon {
padding-right: 12px;
width: 24px;
Expand Down Expand Up @@ -305,6 +336,12 @@ ul#new-menu {
}
}

[dir="rtl"] #running {
.col-sm-8 {
float: right !important;
}
}

.delete-button {
display: none;
}
Expand Down

0 comments on commit 09b2a8b

Please sign in to comment.