123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit">
- <style>
- html, body {
- padding: 0;
- margin: 0;
- font-size: 14px;
- }
- .horizontal-line-editor {
- width: 100%;
- }
- .pup_content{
- padding-top: 20px;
- padding-left: 20px;
- line-height: 24px;
- }
- .input-horizontal-line-number{
- margin-bottom: 10px;
- border:1px solid #aaa;
- padding:0;
- width:300px;
- line-height:1.8;
- min-height:22px;
- outline: none;
- }
- </style>
- <title></title>
- </head>
- <body>
- <div id="HorizontalLineContainer" class="horizontal-line-editor">
- <div class="pup_content">
- <span class="horizontal-line-editor-title">
- 横线行数:
- </span>
- <span class="horizontal-line-editor-content">
- <input type="number" id="HorizontalLineNumber" min="0" max="2000" class="input-horizontal-line-number">
- </span>
- </div>
- </div>
- <!--页面中一定要引入internal.js为了能直接使用当前打开dialog的实例变量-->
- <!--internal.js默认是放到dialogs目录下的-->
- <script type="text/javascript" src="../dialogs/internal.js"></script>
- <script src="../kityformula-plugin/kityformula/js/jquery-1.11.0.min.js"></script>
- <script>
- jQuery( function ($) {
- if ( document.body.addEventListener ) {
- dialog.onok = function(){
- var LatticeNumber = $( "#HorizontalLineNumber").val();
- var row = Number(LatticeNumber);
- var HorizontalLineHtml = '';
- for (var i = 0; i < row; i++) {
- HorizontalLineHtml += '<div class="composition-column en" style="display:block"></div>';
- }
- editor.setContent(HorizontalLineHtml,true);
- dialog.close();
- return false
- }
- } else {
- }
- } );
- </script>
- </body>
- </html>
|