فهرست منبع

Merge pull request #239 from afshin/iframe-widget

Move iframe class to top level.
Jason Grout 8 سال پیش
والد
کامیت
7f27028992
8فایلهای تغییر یافته به همراه33 افزوده شده و 28 حذف شده
  1. 3 2
      examples/console/src/index.ts
  2. 1 1
      examples/lab/index.js
  3. 3 3
      examples/notebook/src/index.ts
  4. 0 21
      src/default-theme/help.css
  5. 1 1
      src/help/plugin.ts
  6. 24 0
      src/iframe/index.css
  7. 0 0
      src/iframe/index.ts
  8. 1 0
      src/index.css

+ 3 - 2
examples/console/src/index.ts

@@ -34,11 +34,12 @@ import {
   Widget
   Widget
 } from 'phosphor-widget';
 } from 'phosphor-widget';
 
 
+import 'jupyterlab/lib/dialog/index.css';
+import 'jupyterlab/lib/dialog/theme.css';
+import 'jupyterlab/lib/iframe/index.css';
 import 'jupyterlab/lib/notebook/index.css';
 import 'jupyterlab/lib/notebook/index.css';
 import 'jupyterlab/lib/notebook/theme.css';
 import 'jupyterlab/lib/notebook/theme.css';
 import 'jupyterlab/lib/notebook/completion/index.css';
 import 'jupyterlab/lib/notebook/completion/index.css';
-import 'jupyterlab/lib/dialog/index.css';
-import 'jupyterlab/lib/dialog/theme.css';
 
 
 let TITLE = 'Console';
 let TITLE = 'Console';
 
 

+ 1 - 1
examples/lab/index.js

@@ -28,7 +28,7 @@ var app = new phosphide.Application({
   providers: [
   providers: [
     require('jupyterlab/lib/clipboard/plugin').clipboardProvider,
     require('jupyterlab/lib/clipboard/plugin').clipboardProvider,
     require('jupyterlab/lib/docregistry/plugin').docRegistryProvider,
     require('jupyterlab/lib/docregistry/plugin').docRegistryProvider,
-    require('jupyterlab/lib/notebook/plugin').activeNotebookProvider,
+    require('jupyterlab/lib/notebook/plugin').notebookTrackerProvider,
     require('jupyterlab/lib/rendermime/plugin').renderMimeProvider,
     require('jupyterlab/lib/rendermime/plugin').renderMimeProvider,
     require('jupyterlab/lib/services/plugin').servicesProvider,
     require('jupyterlab/lib/services/plugin').servicesProvider,
   ]
   ]

+ 3 - 3
examples/notebook/src/index.ts

@@ -47,12 +47,12 @@ import {
   Widget
   Widget
 } from 'phosphor-widget';
 } from 'phosphor-widget';
 
 
+import 'jupyterlab/lib/dialog/index.css';
+import 'jupyterlab/lib/dialog/theme.css';
+import 'jupyterlab/lib/iframe/index.css';
 import 'jupyterlab/lib/notebook/index.css';
 import 'jupyterlab/lib/notebook/index.css';
 import 'jupyterlab/lib/notebook/theme.css';
 import 'jupyterlab/lib/notebook/theme.css';
 import 'jupyterlab/lib/notebook/completion/index.css';
 import 'jupyterlab/lib/notebook/completion/index.css';
-import 'jupyterlab/lib/dialog/index.css';
-import 'jupyterlab/lib/dialog/theme.css';
-
 
 
 let NOTEBOOK = 'test.ipynb';
 let NOTEBOOK = 'test.ipynb';
 
 

+ 0 - 21
src/default-theme/help.css

@@ -11,24 +11,3 @@
 .jp-Help > iframe {
 .jp-Help > iframe {
   border: none;
   border: none;
 }
 }
-
-
-/*
-When drag events occur, `p-mod-override-cursor` is added to the body.
-Because iframes steal all cursor events, the following two rules are necessary
-to suppress pointer events while resize drags are occuring. There may be a
-better solution to this problem.
-*/
-body.p-mod-override-cursor .jp-Help {
-  position: relative;
-}
-
-body.p-mod-override-cursor .jp-Help:before {
-  content: '';
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: transparent;
-}

+ 1 - 1
src/help/plugin.ts

@@ -7,7 +7,7 @@ import {
 
 
 import {
 import {
   IFrame
   IFrame
-} from './iframe';
+} from '../iframe';
 
 
 
 
 /**
 /**

+ 24 - 0
src/iframe/index.css

@@ -0,0 +1,24 @@
+/*-----------------------------------------------------------------------------
+| Copyright (c) Jupyter Development Team.
+| Distributed under the terms of the Modified BSD License.
+|----------------------------------------------------------------------------*/
+/*
+When drag events occur, `p-mod-override-cursor` is added to the body.
+Because iframes steal all cursor events, the following two rules are necessary
+to suppress pointer events while resize drags are occuring. There may be a
+better solution to this problem.
+*/
+body.p-mod-override-cursor .jp-IFrame {
+  position: relative;
+}
+
+
+body.p-mod-override-cursor .jp-IFrame:before {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: transparent;
+}

+ 0 - 0
src/help/iframe.ts → src/iframe/index.ts


+ 1 - 0
src/index.css

@@ -5,5 +5,6 @@
 |----------------------------------------------------------------------------*/
 |----------------------------------------------------------------------------*/
 @import './dialog/index.css';
 @import './dialog/index.css';
 @import './filebrowser/index.css';
 @import './filebrowser/index.css';
+@import './iframe/index.css';
 @import './notebook/completion/index.css'
 @import './notebook/completion/index.css'
 @import './terminal/index.css';
 @import './terminal/index.css';