From a5077c3011fd657f1ade30cc8de7362275cf73dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 20 Dec 2019 16:23:43 +0800 Subject: [PATCH] =?UTF-8?q?jupytertpi=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/js/jupyter.js | 17 +++- public/react/src/modules/page/VNC.css | 2 +- public/react/src/modules/tpm/jupyter/index.js | 93 +++++++++++++++++-- .../react/src/modules/tpm/jupyter/index.scss | 57 +++++++++++- .../modules/tpm/jupyter/leftPane/index.scss | 11 ++- .../Challenges/Challengesjupyter.js | 2 - 6 files changed, 162 insertions(+), 20 deletions(-) diff --git a/public/react/public/js/jupyter.js b/public/react/public/js/jupyter.js index 97a0face2..361287317 100644 --- a/public/react/public/js/jupyter.js +++ b/public/react/public/js/jupyter.js @@ -1,9 +1,16 @@ +/* + * @Author: your name + * @Date: 2019-12-20 11:40:56 + * @LastEditTime : 2019-12-20 13:38:49 + * @LastEditors : Please set LastEditors + * @Description: In User Settings Edit + * @FilePath: /notebook/Users/yangshuming/Desktop/new__educode/educoder/public/react/public/js/jupyter.js + */ window.onload=function(){ - // require(["base/js/namespace"],function(Jupyter) { - // Jupyter.notebook.save_checkpoint(); - // }); - $('.navbar-nav').children().eq(7).css({'display':'none'}) - console.log($('.navbar-nav').children().eq(7)) + require(["base/js/namespace"],function(Jupyter) { + Jupyter.notebook.save_checkpoint(); + }); + } diff --git a/public/react/src/modules/page/VNC.css b/public/react/src/modules/page/VNC.css index e29335242..d59d91121 100644 --- a/public/react/src/modules/page/VNC.css +++ b/public/react/src/modules/page/VNC.css @@ -38,5 +38,5 @@ } .newjupyter_float_button{ - right: 257px; + right: 330px; } \ No newline at end of file diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 7425a4732..617ef0936 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -9,7 +9,7 @@ import './index.scss'; import React, { useEffect, useState } from 'react'; import SplitPane from 'react-split-pane'; -import { Button, Modal,Drawer } from 'antd'; +import { Button, Modal,Drawer ,Pagination,Empty,Tooltip,Icon,message} from 'antd'; import { connect } from 'react-redux'; @@ -18,6 +18,25 @@ import UserInfo from '../../developer/components/userInfo'; import actions from '../../../redux/actions'; import LeftPane from './leftPane'; import RightPane from './rightPane'; +import MyIcon from "../../../common/components/MyIcon"; +function jsCopy(s) { + var copyEle = document.getElementById(s); + const range = document.createRange(); // 创造range + window.getSelection().removeAllRanges(); //清除页面中已有的selection + range.selectNode(copyEle); // 选中需要复制的节点 + window.getSelection().addRange(range); // 执行选中元素 + const copyStatus = document.execCommand("Copy"); // 执行copy操作 + // 对成功与否定进行提示 + copyStatuss(copyStatus) +} + +function copyStatuss(copyStatus){ + if (copyStatus) { + message.success('复制成功'); + } else { + message.error('复制失败'); + } +} function JupyterTPI (props) { // 获取 identifier 值 @@ -45,11 +64,17 @@ function JupyterTPI (props) { drawervisible, } = props; + const emptyCtx = ( +
Some contents...
-Some contents...
-Some contents...
+ +