snapshot_manage.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. {% extends theme("layout.html") %}
  2. {% block head %}
  3. {{ super() }}
  4. <style type="text/css">
  5. @media (min-width: 768px) {
  6. .form-horizontal .control-label {
  7. text-align: left;
  8. }
  9. }
  10. label>span {
  11. color: deepskyblue;
  12. }
  13. .btn,
  14. .form-group>div>div,
  15. .form-control {
  16. border-radius: 0;
  17. }
  18. .table {
  19. font-size: 12px;
  20. border-width: 1px;
  21. line-height: 22px;
  22. }
  23. .table > tbody > tr > td {
  24. color: #424547;
  25. }
  26. .table-bordered > tbody > tr {
  27. padding-top: 10px;
  28. padding-bottom: 10px;
  29. }
  30. .table-bordered > thead > tr > th,
  31. .table-bordered > tbody > tr > th,
  32. .table-bordered > tfoot > tr > th,
  33. .table-bordered > thead > tr > td,
  34. .table-bordered > tbody > tr > td,
  35. .table-bordered > tfoot > tr > td {
  36. border-style: solid;
  37. border-width: 1px 0 0 0;
  38. }
  39. .guest-label {
  40. color: #999999;
  41. }
  42. .guest-desc {
  43. color: #333333;
  44. }
  45. .display_none {
  46. display: none;
  47. }
  48. .snapshot_original {
  49. top: 6em;
  50. background-color: white;
  51. border: 1px solid #346789;
  52. cursor: default;
  53. box-shadow: 2px 2px 19px #aaa;
  54. -o-box-shadow: 2px 2px 19px #aaa;
  55. -webkit-box-shadow: 2px 2px 19px #aaa;
  56. -moz-box-shadow: 2px 2px 19px #aaa;
  57. -moz-border-radius: 0.5em;
  58. border-radius: 2em;
  59. position: relative;
  60. width: 7em;
  61. height: 4em;
  62. display: flex;
  63. align-items: center;
  64. justify-content: center;
  65. -webkit-transition: -webkit-box-shadow 0.15s ease-in;
  66. -moz-transition: -moz-box-shadow 0.15s ease-in;
  67. -o-transition: -o-box-shadow 0.15s ease-in;
  68. transition: box-shadow 0.15s ease-in;
  69. }
  70. .snapshot_checkpoint {
  71. top: 5em;
  72. background-color: white;
  73. border: 1px solid #346789;
  74. cursor: pointer;
  75. box-shadow: 2px 2px 19px #aaa;
  76. -o-box-shadow: 2px 2px 19px #aaa;
  77. -webkit-box-shadow: 2px 2px 19px #aaa;
  78. -moz-box-shadow: 2px 2px 19px #aaa;
  79. -moz-border-radius: 0.5em;
  80. border-radius: 3em;
  81. position: relative;
  82. width: 6em;
  83. height: 6em;
  84. display: flex;
  85. align-items: center;
  86. justify-content: center;
  87. -webkit-transition: -webkit-box-shadow 0.15s ease-in;
  88. -moz-transition: -moz-box-shadow 0.15s ease-in;
  89. -o-transition: -o-box-shadow 0.15s ease-in;
  90. transition: box-shadow 0.15s ease-in;
  91. }
  92. .snapshot_current {
  93. top: 6em;
  94. background-color: white;
  95. border: 1px solid #346789;
  96. cursor: default;
  97. box-shadow: 2px 2px 19px #aaa;
  98. -o-box-shadow: 2px 2px 19px #aaa;
  99. -webkit-box-shadow: 2px 2px 19px #aaa;
  100. -moz-box-shadow: 2px 2px 19px #aaa;
  101. -moz-border-radius: 0.5em;
  102. border-radius: 0;
  103. position: relative;
  104. width: 7em;
  105. height: 4em;
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. -webkit-transition: -webkit-box-shadow 0.15s ease-in;
  110. -moz-transition: -moz-box-shadow 0.15s ease-in;
  111. -o-transition: -o-box-shadow 0.15s ease-in;
  112. transition: box-shadow 0.15s ease-in;
  113. }
  114. .snapshot_checkpoint:hover {
  115. border:1px solid #123456;
  116. box-shadow: 2px 2px 19px #444;
  117. -o-box-shadow: 2px 2px 19px #444;
  118. -webkit-box-shadow: 2px 2px 19px #444;
  119. -moz-box-shadow: 2px 2px 19px #fff;
  120. opacity:0.9;
  121. }
  122. </style>
  123. {% endblock head %}
  124. {% block body %}
  125. <script>
  126. var resource_path = window.location.pathname;
  127. /* jsPlumb 初始化时可调配的参数
  128. Anchor : "BottomCenter",//端点的定位点的位置声明(锚点):left,top,bottom等
  129. Anchors : [ null, null ],//多个锚点的位置声明
  130. ConnectionsDetachable : true,//连接是否可以使用鼠标默认分离
  131. ConnectionOverlays : [],//附加到每个连接的默认重叠
  132. Connector : "Bezier",//要使用的默认连接器的类型:折线,流程等
  133. Container : null,//设置父级的元素,一个容器
  134. DoNotThrowErrors : false,//如果请求不存在的Anchor,Endpoint或Connector,是否会抛出
  135. DragOptions : { },//用于配置拖拽元素的参数
  136. DropOptions : { },//用于配置元素的drop行为的参数
  137. Endpoint : "Dot",//端点(锚点)的样式声明(Dot)
  138. Endpoints : [ null, null ],//多个端点的样式声明(Dot)
  139. EndpointOverlays : [ ],//端点的重叠
  140. EndpointStyle : { fill : "#456" },//端点的css样式声明
  141. EndpointStyles : [ null, null ],//同上
  142. EndpointHoverStyle : null,//鼠标经过样式
  143. EndpointHoverStyles : [ null, null ],//同上
  144. HoverPaintStyle : null,//鼠标经过线的样式
  145. LabelStyle : { color : "black" },//标签的默认样式。
  146. LogEnabled : false,//是否打开jsPlumb的内部日志记录
  147. Overlays : [ ],//重叠
  148. MaxConnections : 1,//最大连接数
  149. PaintStyle : { lineWidth : 8, stroke : "#456" },//连线样式
  150. ReattachConnections : false,//是否重新连接使用鼠标分离的线
  151. RenderMode : "svg",//默认渲染模式
  152. Scope : "jsPlumb_DefaultScope"//范围,标识
  153. */
  154. $(document).ready(function() {
  155. $('body').addClass('add-transition');
  156. $('.add-page-transition').on('click', function(){
  157. var transAttr = $(this).attr('data-transition');
  158. $('.add-transition').attr('class', 'add-transition');
  159. $('.add-transition').addClass(transAttr);
  160. });
  161. var color = "gray";
  162. var firstInstance = jsPlumb.getInstance({
  163. Connector:[ "Flowchart"],
  164. DragOptions: { cursor: "pointer", zIndex: 2000 },
  165. PaintStyle: { stroke: color, strokeWidth: 2 },
  166. EndpointStyle: { radius: 9, fill: color}
  167. });
  168. firstInstance.setContainer("snapshot_panel");
  169. var arrowCommon = { foldback: 0.7, fill: color, width: 16 };
  170. var overlays = [
  171. [ "Arrow", { location: 1 }, arrowCommon ]
  172. ];
  173. firstInstance.addEndpoint("snapshot_origin", {
  174. uuid: "snapshot_origin_right",
  175. anchor: "Right",
  176. endpoint: "Blank",
  177. maxConnections: 100});
  178. firstInstance.addEndpoint("snapshot_01", {
  179. uuid: "snapshot_01_left",
  180. anchor: "Left",
  181. endpoint: "Blank",
  182. maxConnections: 100});
  183. firstInstance.connect({uuids: ["snapshot_origin_right", "snapshot_01_left"], overlays: overlays});
  184. // firstInstance.draggable(['snapshot_origin', 'snapshot_01']);
  185. });
  186. </script>
  187. <div class="container" style="padding-top: 100px; width: 90%; max-width: 100%;">
  188. <div class="panel">
  189. <div class="panel-body">
  190. <a href="javascript:history.go(-1)" class="btn btn-xs btn-default add-page-transition" data-transition="pt-page-moveFromLeft-init" style="margin-bottom: 4px; margin-left: 10px;">
  191. <span class="glyph-icon icon-separator" style="transform: rotateY(-180deg);">
  192. <i class="glyph-icon icon-level-up"></i>
  193. </span>
  194. <span class="button-content">
  195. 返回
  196. </span>
  197. </a>
  198. <div id="snapshot_panel" class="row" style="margin-top: 10px; height: 500px; position: relative;">
  199. <div class="snapshot_original" id="snapshot_origin" style="left: 8em;">原</div>
  200. <div class="snapshot_checkpoint" id="snapshot_01" style="left: 16em;">快照1</div>
  201. <div class="snapshot_checkpoint" id="snapshot_02" style="left: 24em;">快照2</div>
  202. <div class="snapshot_checkpoint" id="snapshot_03" style="left: 32em;">快照3</div>
  203. <div class="snapshot_checkpoint" id="snapshot_last" style="left: 40em;">快照4</div>
  204. <div class="snapshot_current" id="snapshot_current" style="left: 48em;">当前</div>
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. {% endblock body %}