Commit b13b4f7d79862a28b8b9bdd87170c0c3507aaa76
1 parent
31bdb910
修正一些问题
Showing
17 changed files
with
222 additions
and
75 deletions
.idea/workspace.xml
| @@ -20,40 +20,7 @@ | @@ -20,40 +20,7 @@ | ||
| 20 | <favorites_list name="programming" /> | 20 | <favorites_list name="programming" /> |
| 21 | </component> | 21 | </component> |
| 22 | <component name="FileEditorManager"> | 22 | <component name="FileEditorManager"> |
| 23 | - <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> | ||
| 24 | - <file leaf-file-name="Dir.js" pinned="false" current-in-tab="false"> | ||
| 25 | - <entry file="file://$PROJECT_DIR$/src/gxb-ide/Dir.js"> | ||
| 26 | - <provider selected="true" editor-type-id="text-editor"> | ||
| 27 | - <state relative-caret-position="0"> | ||
| 28 | - <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | ||
| 29 | - <folding> | ||
| 30 | - <element signature="n#!!doc" expanded="true" /> | ||
| 31 | - </folding> | ||
| 32 | - </state> | ||
| 33 | - </provider> | ||
| 34 | - </entry> | ||
| 35 | - </file> | ||
| 36 | - <file leaf-file-name="Ide.js" pinned="false" current-in-tab="false"> | ||
| 37 | - <entry file="file://$PROJECT_DIR$/src/gxb-ide/Ide.js"> | ||
| 38 | - <provider selected="true" editor-type-id="text-editor"> | ||
| 39 | - <state relative-caret-position="323"> | ||
| 40 | - <caret line="19" column="29" selection-start-line="19" selection-start-column="29" selection-end-line="19" selection-end-column="29" /> | ||
| 41 | - <folding /> | ||
| 42 | - </state> | ||
| 43 | - </provider> | ||
| 44 | - </entry> | ||
| 45 | - </file> | ||
| 46 | - <file leaf-file-name="README.md" pinned="false" current-in-tab="true"> | ||
| 47 | - <entry file="file://$PROJECT_DIR$/README.md"> | ||
| 48 | - <provider selected="true" editor-type-id="text-editor"> | ||
| 49 | - <state relative-caret-position="170"> | ||
| 50 | - <caret line="14" column="3" selection-start-line="14" selection-start-column="3" selection-end-line="14" selection-end-column="3" /> | ||
| 51 | - <folding /> | ||
| 52 | - </state> | ||
| 53 | - </provider> | ||
| 54 | - </entry> | ||
| 55 | - </file> | ||
| 56 | - </leaf> | 23 | + <leaf SIDE_TABS_SIZE_LIMIT_KEY="300" /> |
| 57 | </component> | 24 | </component> |
| 58 | <component name="Git.Settings"> | 25 | <component name="Git.Settings"> |
| 59 | <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> | 26 | <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
| @@ -73,7 +40,8 @@ | @@ -73,7 +40,8 @@ | ||
| 73 | <handled-path value="$PROJECT_DIR$/node_modules" /> | 40 | <handled-path value="$PROJECT_DIR$/node_modules" /> |
| 74 | </component> | 41 | </component> |
| 75 | <component name="ProjectFrameBounds"> | 42 | <component name="ProjectFrameBounds"> |
| 76 | - <option name="y" value="23" /> | 43 | + <option name="x" value="-1" /> |
| 44 | + <option name="y" value="28" /> | ||
| 77 | <option name="width" value="1232" /> | 45 | <option name="width" value="1232" /> |
| 78 | <option name="height" value="730" /> | 46 | <option name="height" value="730" /> |
| 79 | </component> | 47 | </component> |
| @@ -103,6 +71,8 @@ | @@ -103,6 +71,8 @@ | ||
| 103 | </navigator> | 71 | </navigator> |
| 104 | <panes> | 72 | <panes> |
| 105 | <pane id="Scratches" /> | 73 | <pane id="Scratches" /> |
| 74 | + <pane id="PackagesPane" /> | ||
| 75 | + <pane id="Scope" /> | ||
| 106 | <pane id="ProjectPane"> | 76 | <pane id="ProjectPane"> |
| 107 | <subPane> | 77 | <subPane> |
| 108 | <PATH> | 78 | <PATH> |
| @@ -173,8 +143,6 @@ | @@ -173,8 +143,6 @@ | ||
| 173 | </PATH> | 143 | </PATH> |
| 174 | </subPane> | 144 | </subPane> |
| 175 | </pane> | 145 | </pane> |
| 176 | - <pane id="PackagesPane" /> | ||
| 177 | - <pane id="Scope" /> | ||
| 178 | </panes> | 146 | </panes> |
| 179 | </component> | 147 | </component> |
| 180 | <component name="PropertiesComponent"> | 148 | <component name="PropertiesComponent"> |
| @@ -616,15 +584,16 @@ | @@ -616,15 +584,16 @@ | ||
| 616 | <updated>1521082406200</updated> | 584 | <updated>1521082406200</updated> |
| 617 | <workItem from="1521082408104" duration="1336000" /> | 585 | <workItem from="1521082408104" duration="1336000" /> |
| 618 | <workItem from="1521277481140" duration="4000" /> | 586 | <workItem from="1521277481140" duration="4000" /> |
| 587 | + <workItem from="1521536715500" duration="9000" /> | ||
| 619 | </task> | 588 | </task> |
| 620 | <servers /> | 589 | <servers /> |
| 621 | </component> | 590 | </component> |
| 622 | <component name="TimeTrackingManager"> | 591 | <component name="TimeTrackingManager"> |
| 623 | - <option name="totallyTimeSpent" value="1340000" /> | 592 | + <option name="totallyTimeSpent" value="1349000" /> |
| 624 | </component> | 593 | </component> |
| 625 | <component name="ToolWindowManager"> | 594 | <component name="ToolWindowManager"> |
| 626 | - <frame x="0" y="23" width="1232" height="730" extended-state="0" /> | ||
| 627 | - <editor active="true" /> | 595 | + <frame x="-1" y="28" width="1232" height="730" extended-state="0" /> |
| 596 | + <editor active="false" /> | ||
| 628 | <layout> | 597 | <layout> |
| 629 | <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 598 | <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 630 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> | 599 | <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> |
| @@ -637,7 +606,7 @@ | @@ -637,7 +606,7 @@ | ||
| 637 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32843137" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> | 606 | <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32843137" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> |
| 638 | <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> | 607 | <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> |
| 639 | <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 608 | <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 640 | - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24537815" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> | 609 | + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2184874" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> |
| 641 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> | 610 | <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> |
| 642 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 611 | <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| 643 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> | 612 | <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> |
| @@ -674,6 +643,10 @@ | @@ -674,6 +643,10 @@ | ||
| 674 | <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 643 | <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
| 675 | <folding> | 644 | <folding> |
| 676 | <element signature="n#!!doc" expanded="true" /> | 645 | <element signature="n#!!doc" expanded="true" /> |
| 646 | + <marker date="1521536646000" expanded="true" signature="1723:2457" ph="{...}" /> | ||
| 647 | + <marker date="1521536646000" expanded="true" signature="2057:2457" ph="{...}" /> | ||
| 648 | + <marker date="1521536646000" expanded="true" signature="2082:2457" ph="{"type": "GET"...}" /> | ||
| 649 | + <marker date="1521536646000" expanded="true" signature="2282:2457" ph="{...}" /> | ||
| 677 | </folding> | 650 | </folding> |
| 678 | </state> | 651 | </state> |
| 679 | </provider> | 652 | </provider> |
| @@ -700,6 +673,10 @@ | @@ -700,6 +673,10 @@ | ||
| 700 | <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | 673 | <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> |
| 701 | <folding> | 674 | <folding> |
| 702 | <element signature="n#!!doc" expanded="true" /> | 675 | <element signature="n#!!doc" expanded="true" /> |
| 676 | + <marker date="1521536646000" expanded="true" signature="1723:2457" ph="{...}" /> | ||
| 677 | + <marker date="1521536646000" expanded="true" signature="2057:2457" ph="{...}" /> | ||
| 678 | + <marker date="1521536646000" expanded="true" signature="2082:2457" ph="{"type": "GET"...}" /> | ||
| 679 | + <marker date="1521536646000" expanded="true" signature="2282:2457" ph="{...}" /> | ||
| 703 | </folding> | 680 | </folding> |
| 704 | </state> | 681 | </state> |
| 705 | </provider> | 682 | </provider> |
| @@ -714,11 +691,41 @@ | @@ -714,11 +691,41 @@ | ||
| 714 | </entry> | 691 | </entry> |
| 715 | <entry file="file://$PROJECT_DIR$/README.md"> | 692 | <entry file="file://$PROJECT_DIR$/README.md"> |
| 716 | <provider selected="true" editor-type-id="text-editor"> | 693 | <provider selected="true" editor-type-id="text-editor"> |
| 694 | + <state relative-caret-position="0"> | ||
| 695 | + <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> | ||
| 696 | + <folding /> | ||
| 697 | + </state> | ||
| 698 | + </provider> | ||
| 699 | + </entry> | ||
| 700 | + <entry file="file://$PROJECT_DIR$/README.md"> | ||
| 701 | + <provider selected="true" editor-type-id="text-editor"> | ||
| 717 | <state relative-caret-position="170"> | 702 | <state relative-caret-position="170"> |
| 718 | <caret line="14" column="3" selection-start-line="14" selection-start-column="3" selection-end-line="14" selection-end-column="3" /> | 703 | <caret line="14" column="3" selection-start-line="14" selection-start-column="3" selection-end-line="14" selection-end-column="3" /> |
| 719 | <folding /> | 704 | <folding /> |
| 720 | </state> | 705 | </state> |
| 721 | </provider> | 706 | </provider> |
| 722 | </entry> | 707 | </entry> |
| 708 | + <entry file="file://$PROJECT_DIR$/src/gxb-ide/Ide.js"> | ||
| 709 | + <provider selected="true" editor-type-id="text-editor"> | ||
| 710 | + <state relative-caret-position="170"> | ||
| 711 | + <caret line="10" column="26" selection-start-line="10" selection-start-column="26" selection-end-line="10" selection-end-column="26" /> | ||
| 712 | + <folding /> | ||
| 713 | + </state> | ||
| 714 | + </provider> | ||
| 715 | + </entry> | ||
| 716 | + <entry file="file://$PROJECT_DIR$/src/gxb-ide/Dir.js"> | ||
| 717 | + <provider selected="true" editor-type-id="text-editor"> | ||
| 718 | + <state relative-caret-position="17"> | ||
| 719 | + <caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> | ||
| 720 | + <folding> | ||
| 721 | + <element signature="n#!!doc" expanded="true" /> | ||
| 722 | + <marker date="1521536646000" expanded="true" signature="1723:2457" ph="{...}" /> | ||
| 723 | + <marker date="1521536646000" expanded="true" signature="2057:2457" ph="{...}" /> | ||
| 724 | + <marker date="1521536646000" expanded="true" signature="2082:2457" ph="{"type": "GET"...}" /> | ||
| 725 | + <marker date="1521536646000" expanded="true" signature="2282:2457" ph="{...}" /> | ||
| 726 | + </folding> | ||
| 727 | + </state> | ||
| 728 | + </provider> | ||
| 729 | + </entry> | ||
| 723 | </component> | 730 | </component> |
| 724 | </project> | 731 | </project> |
| 725 | \ No newline at end of file | 732 | \ No newline at end of file |
dist/css/ide.css
| @@ -407,7 +407,7 @@ html, body { | @@ -407,7 +407,7 @@ html, body { | ||
| 407 | .pause-shodow .compile-reslut .btn { | 407 | .pause-shodow .compile-reslut .btn { |
| 408 | margin-right: 8px; } | 408 | margin-right: 8px; } |
| 409 | 409 | ||
| 410 | -.compile-reslut, .re-reslut { | 410 | +.compile-reslut, .re-reslut, .mustrecord-reslut { |
| 411 | position: absolute; | 411 | position: absolute; |
| 412 | height: 200px; | 412 | height: 200px; |
| 413 | width: 400px; | 413 | width: 400px; |
| @@ -415,14 +415,14 @@ html, body { | @@ -415,14 +415,14 @@ html, body { | ||
| 415 | top: 15%; | 415 | top: 15%; |
| 416 | left: 50%; | 416 | left: 50%; |
| 417 | transform: translate(-50%); } | 417 | transform: translate(-50%); } |
| 418 | - .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer { | 418 | + .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer, .mustrecord-reslut .tip-header, .mustrecord-reslut .tip-footer { |
| 419 | width: 100%; | 419 | width: 100%; |
| 420 | padding: 8px 8px; | 420 | padding: 8px 8px; |
| 421 | background-color: #F5F6FA; } | 421 | background-color: #F5F6FA; } |
| 422 | - .compile-reslut .tip-content, .re-reslut .tip-content { | 422 | + .compile-reslut .tip-content, .re-reslut .tip-content, .mustrecord-reslut .tip-content { |
| 423 | padding: 40px; | 423 | padding: 40px; |
| 424 | line-height: 1.7; } | 424 | line-height: 1.7; } |
| 425 | - .compile-reslut .tip-footer, .re-reslut .tip-footer { | 425 | + .compile-reslut .tip-footer, .re-reslut .tip-footer, .mustrecord-reslut .tip-footer { |
| 426 | position: absolute; | 426 | position: absolute; |
| 427 | bottom: 0; | 427 | bottom: 0; |
| 428 | text-align: right; } | 428 | text-align: right; } |
| @@ -505,7 +505,7 @@ html, body { | @@ -505,7 +505,7 @@ html, body { | ||
| 505 | margin-left: 48px; | 505 | margin-left: 48px; |
| 506 | outline: none; } | 506 | outline: none; } |
| 507 | 507 | ||
| 508 | -.confirm-tip { | 508 | +.confirm-tip, .mustrecord-tip { |
| 509 | position: absolute; | 509 | position: absolute; |
| 510 | width: 100%; | 510 | width: 100%; |
| 511 | height: 100%; | 511 | height: 100%; |
dist/css/main.css
| @@ -279,7 +279,7 @@ html, body { | @@ -279,7 +279,7 @@ html, body { | ||
| 279 | .pause-shodow .compile-reslut .btn { | 279 | .pause-shodow .compile-reslut .btn { |
| 280 | margin-right: 8px; } | 280 | margin-right: 8px; } |
| 281 | 281 | ||
| 282 | -.compile-reslut, .re-reslut { | 282 | +.compile-reslut, .re-reslut, .mustrecord-reslut { |
| 283 | position: absolute; | 283 | position: absolute; |
| 284 | height: 200px; | 284 | height: 200px; |
| 285 | width: 400px; | 285 | width: 400px; |
| @@ -287,14 +287,14 @@ html, body { | @@ -287,14 +287,14 @@ html, body { | ||
| 287 | top: 15%; | 287 | top: 15%; |
| 288 | left: 50%; | 288 | left: 50%; |
| 289 | transform: translate(-50%); } | 289 | transform: translate(-50%); } |
| 290 | - .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer { | 290 | + .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer, .mustrecord-reslut .tip-header, .mustrecord-reslut .tip-footer { |
| 291 | width: 100%; | 291 | width: 100%; |
| 292 | padding: 8px 8px; | 292 | padding: 8px 8px; |
| 293 | background-color: #F5F6FA; } | 293 | background-color: #F5F6FA; } |
| 294 | - .compile-reslut .tip-content, .re-reslut .tip-content { | 294 | + .compile-reslut .tip-content, .re-reslut .tip-content, .mustrecord-reslut .tip-content { |
| 295 | padding: 40px; | 295 | padding: 40px; |
| 296 | line-height: 1.7; } | 296 | line-height: 1.7; } |
| 297 | - .compile-reslut .tip-footer, .re-reslut .tip-footer { | 297 | + .compile-reslut .tip-footer, .re-reslut .tip-footer, .mustrecord-reslut .tip-footer { |
| 298 | position: absolute; | 298 | position: absolute; |
| 299 | bottom: 0; | 299 | bottom: 0; |
| 300 | text-align: right; } | 300 | text-align: right; } |
| @@ -377,7 +377,7 @@ html, body { | @@ -377,7 +377,7 @@ html, body { | ||
| 377 | margin-left: 48px; | 377 | margin-left: 48px; |
| 378 | outline: none; } | 378 | outline: none; } |
| 379 | 379 | ||
| 380 | -.confirm-tip { | 380 | +.confirm-tip, .mustrecord-tip { |
| 381 | position: absolute; | 381 | position: absolute; |
| 382 | width: 100%; | 382 | width: 100%; |
| 383 | height: 100%; | 383 | height: 100%; |
dist/gxb-ide/Iterm.js
| @@ -27,6 +27,14 @@ | @@ -27,6 +27,14 @@ | ||
| 27 | $(document).on('focus', '#runtimeArgus', function(){ }) | 27 | $(document).on('focus', '#runtimeArgus', function(){ }) |
| 28 | }, | 28 | }, |
| 29 | compile: function(){ | 29 | compile: function(){ |
| 30 | + | ||
| 31 | + if(autoScore && !window.recordStartedOnce) { | ||
| 32 | + $('.mustrecord-tip').show().find('.btn-success').off('click').on('click', function(){ | ||
| 33 | + $(this).parents('.mustrecord-tip').hide(); | ||
| 34 | + }); | ||
| 35 | + return; | ||
| 36 | + } | ||
| 37 | + | ||
| 30 | console.log('compile====') | 38 | console.log('compile====') |
| 31 | if (_languageid == 35) { | 39 | if (_languageid == 35) { |
| 32 | if (CodingEditer.isHanld == 0) { | 40 | if (CodingEditer.isHanld == 0) { |
dist/gxb-ide/ToolBox.js
| @@ -4,8 +4,7 @@ | @@ -4,8 +4,7 @@ | ||
| 4 | '<audio id="audio"></audio>'+ | 4 | '<audio id="audio"></audio>'+ |
| 5 | '</div>'+ | 5 | '</div>'+ |
| 6 | '<div class="ctrl-wrap">'+ | 6 | '<div class="ctrl-wrap">'+ |
| 7 | - '<div class="tool-item" id="prepare-recording" data-toggle="tooltip" data-placement="top" title="点此开始录制"><img src="" alt="" /></div>'+ | ||
| 8 | - '<div class="tool-item" id="start-recording" data="1" data-toggle="tooltip" data-placement="top" title="<span class=\'tooltip-content-large\'>点此开始录制</span>"><img src="" alt="" /></div>'+ | 7 | + '<div class="tool-item" id="start-recording" data="1"><span class="start-recording-tips">点此开始录制</span><img src="" alt="" /></div>'+ |
| 9 | '<div class="tool-item" id="stop-recording" data="1" data-toggle="tooltip" data-placement="top" title="结束录制"><img src="" alt="" /></div>'+ | 8 | '<div class="tool-item" id="stop-recording" data="1" data-toggle="tooltip" data-placement="top" title="结束录制"><img src="" alt="" /></div>'+ |
| 10 | '<div class="tool-item" id="re-recoding" data="1" data-toggle="tooltip" data-placement="top" title="重新录制"><img src="" alt="" /></div>'+ | 9 | '<div class="tool-item" id="re-recoding" data="1" data-toggle="tooltip" data-placement="top" title="重新录制"><img src="" alt="" /></div>'+ |
| 11 | '</div>'+ | 10 | '</div>'+ |
| @@ -90,6 +89,9 @@ | @@ -90,6 +89,9 @@ | ||
| 90 | $('#re-sure').on('click', function(){ _this.reSure(); }) | 89 | $('#re-sure').on('click', function(){ _this.reSure(); }) |
| 91 | $('#re-cancel').on('click', function(){ _this.reCancel(); }) | 90 | $('#re-cancel').on('click', function(){ _this.reCancel(); }) |
| 92 | $('.play-code').on('click', function(){ _this.playerPage(); }) | 91 | $('.play-code').on('click', function(){ _this.playerPage(); }) |
| 92 | + window.onbeforeunload = function() { | ||
| 93 | + return '尚未保存,关闭将丢失本次操作内容,确定关闭?' | ||
| 94 | + }; | ||
| 93 | }, | 95 | }, |
| 94 | startRecording: function(callback){ | 96 | startRecording: function(callback){ |
| 95 | console.log(this.options.userId); | 97 | console.log(this.options.userId); |
| @@ -294,6 +296,7 @@ | @@ -294,6 +296,7 @@ | ||
| 294 | $('#cancel').prop("disabled", false); | 296 | $('#cancel').prop("disabled", false); |
| 295 | 297 | ||
| 296 | window.opener.postMessage(_data, _source); | 298 | window.opener.postMessage(_data, _source); |
| 299 | + window.onbeforeunload = null; | ||
| 297 | window.close(); | 300 | window.close(); |
| 298 | }, | 301 | }, |
| 299 | error: function() { | 302 | error: function() { |
| @@ -312,9 +315,6 @@ | @@ -312,9 +315,6 @@ | ||
| 312 | }, | 315 | }, |
| 313 | cancel: function(){ | 316 | cancel: function(){ |
| 314 | console.log('cancel'); | 317 | console.log('cancel'); |
| 315 | - $(window).unbind('beforeunload', function() { | ||
| 316 | - return '确认退出? 将不保存你的代码'; | ||
| 317 | - }); | ||
| 318 | window.close(); | 318 | window.close(); |
| 319 | }, | 319 | }, |
| 320 | /* | 320 | /* |
dist/gxb-ide/toolBox.css
| @@ -22,6 +22,53 @@ | @@ -22,6 +22,53 @@ | ||
| 22 | .tool-item img{ | 22 | .tool-item img{ |
| 23 | width: 48px; | 23 | width: 48px; |
| 24 | } | 24 | } |
| 25 | +@keyframes jump { | ||
| 26 | + from { | ||
| 27 | + transform: translateY(-50%); | ||
| 28 | + -webkit-transform: translateY(-50%); | ||
| 29 | + } | ||
| 30 | + to { | ||
| 31 | + transform: translateY(0); | ||
| 32 | + -webkit-transform: translateY(0); | ||
| 33 | + } | ||
| 34 | +} | ||
| 35 | +#start-recording { | ||
| 36 | + position: relative; | ||
| 37 | +} | ||
| 38 | +#start-recording .start-recording-tips { | ||
| 39 | + position: absolute; | ||
| 40 | + background: #fff; | ||
| 41 | + border: 1px solid #1FB6FF; | ||
| 42 | + color: #1FB6FF; | ||
| 43 | + bottom: 100%; | ||
| 44 | + left: 50%; | ||
| 45 | + margin-left: -100px; | ||
| 46 | + width: 200px; | ||
| 47 | + line-height: 50px; | ||
| 48 | + font-size: 18px; | ||
| 49 | + /*font-weight: bold;*/ | ||
| 50 | + text-align: center; | ||
| 51 | + border-radius: 6px; | ||
| 52 | + animation: jump ease 1s infinite; | ||
| 53 | + -webkit-animation: jump ease 1s infinite; | ||
| 54 | + pointer-events: none; | ||
| 55 | +} | ||
| 56 | +#start-recording .start-recording-tips:before, #start-recording .start-recording-tips:after { | ||
| 57 | + position: absolute; | ||
| 58 | + left: 50%; | ||
| 59 | + top: 100%; | ||
| 60 | + margin-left: -10px; | ||
| 61 | + content: ""; | ||
| 62 | + border: 10px solid transparent; | ||
| 63 | + border-bottom: 0; | ||
| 64 | + border-top: 10px solid #1FB6FF; | ||
| 65 | +} | ||
| 66 | +#start-recording .start-recording-tips:after { | ||
| 67 | + margin-top: -1px; | ||
| 68 | + border-top-color: #fff; | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | + | ||
| 25 | .recording-time{ | 72 | .recording-time{ |
| 26 | float: left; | 73 | float: left; |
| 27 | height: 60px; | 74 | height: 60px; |
dist/js/c.js
| @@ -59,6 +59,7 @@ $(function(){ | @@ -59,6 +59,7 @@ $(function(){ | ||
| 59 | questionId: _questionId, | 59 | questionId: _questionId, |
| 60 | autoScore: _autoScore, | 60 | autoScore: _autoScore, |
| 61 | startCallback: function(){ | 61 | startCallback: function(){ |
| 62 | + window.recordStartedOnce = true; | ||
| 62 | // 禁止重命名 | 63 | // 禁止重命名 |
| 63 | setTimeout(function(){ | 64 | setTimeout(function(){ |
| 64 | DirSetting.edit.showRenameBtn = false; | 65 | DirSetting.edit.showRenameBtn = false; |
dist/scss/main.scss
| @@ -329,7 +329,7 @@ html, body{ | @@ -329,7 +329,7 @@ html, body{ | ||
| 329 | } | 329 | } |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | -.compile-reslut, .re-reslut{ | 332 | +.compile-reslut, .re-reslut , .mustrecord-reslut{ |
| 333 | position: absolute; | 333 | position: absolute; |
| 334 | height: 200px; | 334 | height: 200px; |
| 335 | width: 400px; | 335 | width: 400px; |
| @@ -453,7 +453,7 @@ html, body{ | @@ -453,7 +453,7 @@ html, body{ | ||
| 453 | .play-code img{ | 453 | .play-code img{ |
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | -.confirm-tip{ | 456 | +.confirm-tip, .mustrecord-tip { |
| 457 | position: absolute; | 457 | position: absolute; |
| 458 | width: 100%; | 458 | width: 100%; |
| 459 | height: 100%; | 459 | height: 100%; |
dist/v1.1/index.html
| @@ -237,6 +237,20 @@ | @@ -237,6 +237,20 @@ | ||
| 237 | </div> | 237 | </div> |
| 238 | </div> | 238 | </div> |
| 239 | </div> | 239 | </div> |
| 240 | + <div class="mustrecord-tip" style="display: none;"> | ||
| 241 | + <div class="mustrecord-reslut"> | ||
| 242 | + <div class="tip-header"> | ||
| 243 | + <span>提示</span> | ||
| 244 | + </div> | ||
| 245 | + | ||
| 246 | + <div class="tip-content"> | ||
| 247 | + <p>请先点击开始录制按钮录制代码!</p> | ||
| 248 | + </div> | ||
| 249 | + <div class="tip-footer"> | ||
| 250 | + <button class="btn btn-success btn-sm">确定</button> | ||
| 251 | + </div> | ||
| 252 | + </div> | ||
| 253 | + </div> | ||
| 240 | </div> | 254 | </div> |
| 241 | 255 | ||
| 242 | <script src="../js/jquery-1.7.1.js"></script> | 256 | <script src="../js/jquery-1.7.1.js"></script> |
src/css/ide.css
| @@ -407,7 +407,7 @@ html, body { | @@ -407,7 +407,7 @@ html, body { | ||
| 407 | .pause-shodow .compile-reslut .btn { | 407 | .pause-shodow .compile-reslut .btn { |
| 408 | margin-right: 8px; } | 408 | margin-right: 8px; } |
| 409 | 409 | ||
| 410 | -.compile-reslut, .re-reslut { | 410 | +.compile-reslut, .re-reslut, .mustrecord-reslut { |
| 411 | position: absolute; | 411 | position: absolute; |
| 412 | height: 200px; | 412 | height: 200px; |
| 413 | width: 400px; | 413 | width: 400px; |
| @@ -415,14 +415,14 @@ html, body { | @@ -415,14 +415,14 @@ html, body { | ||
| 415 | top: 15%; | 415 | top: 15%; |
| 416 | left: 50%; | 416 | left: 50%; |
| 417 | transform: translate(-50%); } | 417 | transform: translate(-50%); } |
| 418 | - .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer { | 418 | + .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer, .mustrecord-reslut .tip-header, .mustrecord-reslut .tip-footer { |
| 419 | width: 100%; | 419 | width: 100%; |
| 420 | padding: 8px 8px; | 420 | padding: 8px 8px; |
| 421 | background-color: #F5F6FA; } | 421 | background-color: #F5F6FA; } |
| 422 | - .compile-reslut .tip-content, .re-reslut .tip-content { | 422 | + .compile-reslut .tip-content, .re-reslut .tip-content, .mustrecord-reslut .tip-content { |
| 423 | padding: 40px; | 423 | padding: 40px; |
| 424 | line-height: 1.7; } | 424 | line-height: 1.7; } |
| 425 | - .compile-reslut .tip-footer, .re-reslut .tip-footer { | 425 | + .compile-reslut .tip-footer, .re-reslut .tip-footer, .mustrecord-reslut .tip-footer { |
| 426 | position: absolute; | 426 | position: absolute; |
| 427 | bottom: 0; | 427 | bottom: 0; |
| 428 | text-align: right; } | 428 | text-align: right; } |
| @@ -505,7 +505,7 @@ html, body { | @@ -505,7 +505,7 @@ html, body { | ||
| 505 | margin-left: 48px; | 505 | margin-left: 48px; |
| 506 | outline: none; } | 506 | outline: none; } |
| 507 | 507 | ||
| 508 | -.confirm-tip { | 508 | +.confirm-tip, .mustrecord-tip { |
| 509 | position: absolute; | 509 | position: absolute; |
| 510 | width: 100%; | 510 | width: 100%; |
| 511 | height: 100%; | 511 | height: 100%; |
src/css/main.css
| @@ -279,7 +279,7 @@ html, body { | @@ -279,7 +279,7 @@ html, body { | ||
| 279 | .pause-shodow .compile-reslut .btn { | 279 | .pause-shodow .compile-reslut .btn { |
| 280 | margin-right: 8px; } | 280 | margin-right: 8px; } |
| 281 | 281 | ||
| 282 | -.compile-reslut, .re-reslut { | 282 | +.compile-reslut, .re-reslut, .mustrecord-reslut { |
| 283 | position: absolute; | 283 | position: absolute; |
| 284 | height: 200px; | 284 | height: 200px; |
| 285 | width: 400px; | 285 | width: 400px; |
| @@ -287,14 +287,14 @@ html, body { | @@ -287,14 +287,14 @@ html, body { | ||
| 287 | top: 15%; | 287 | top: 15%; |
| 288 | left: 50%; | 288 | left: 50%; |
| 289 | transform: translate(-50%); } | 289 | transform: translate(-50%); } |
| 290 | - .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer { | 290 | + .compile-reslut .tip-header, .compile-reslut .tip-footer, .re-reslut .tip-header, .re-reslut .tip-footer, .mustrecord-reslut .tip-header, .mustrecord-reslut .tip-footer { |
| 291 | width: 100%; | 291 | width: 100%; |
| 292 | padding: 8px 8px; | 292 | padding: 8px 8px; |
| 293 | background-color: #F5F6FA; } | 293 | background-color: #F5F6FA; } |
| 294 | - .compile-reslut .tip-content, .re-reslut .tip-content { | 294 | + .compile-reslut .tip-content, .re-reslut .tip-content, .mustrecord-reslut .tip-content { |
| 295 | padding: 40px; | 295 | padding: 40px; |
| 296 | line-height: 1.7; } | 296 | line-height: 1.7; } |
| 297 | - .compile-reslut .tip-footer, .re-reslut .tip-footer { | 297 | + .compile-reslut .tip-footer, .re-reslut .tip-footer, .mustrecord-reslut .tip-footer { |
| 298 | position: absolute; | 298 | position: absolute; |
| 299 | bottom: 0; | 299 | bottom: 0; |
| 300 | text-align: right; } | 300 | text-align: right; } |
| @@ -377,7 +377,7 @@ html, body { | @@ -377,7 +377,7 @@ html, body { | ||
| 377 | margin-left: 48px; | 377 | margin-left: 48px; |
| 378 | outline: none; } | 378 | outline: none; } |
| 379 | 379 | ||
| 380 | -.confirm-tip { | 380 | +.confirm-tip, .mustrecord-tip { |
| 381 | position: absolute; | 381 | position: absolute; |
| 382 | width: 100%; | 382 | width: 100%; |
| 383 | height: 100%; | 383 | height: 100%; |
src/gxb-ide/Iterm.js
| @@ -27,6 +27,14 @@ | @@ -27,6 +27,14 @@ | ||
| 27 | $(document).on('focus', '#runtimeArgus', function(){ }) | 27 | $(document).on('focus', '#runtimeArgus', function(){ }) |
| 28 | }, | 28 | }, |
| 29 | compile: function(){ | 29 | compile: function(){ |
| 30 | + | ||
| 31 | + if(autoScore && !window.recordStartedOnce) { | ||
| 32 | + $('.mustrecord-tip').show().find('.btn-success').off('click').on('click', function(){ | ||
| 33 | + $(this).parents('.mustrecord-tip').hide(); | ||
| 34 | + }); | ||
| 35 | + return; | ||
| 36 | + } | ||
| 37 | + | ||
| 30 | console.log('compile====') | 38 | console.log('compile====') |
| 31 | if (_languageid == 35) { | 39 | if (_languageid == 35) { |
| 32 | if (CodingEditer.isHanld == 0) { | 40 | if (CodingEditer.isHanld == 0) { |
src/gxb-ide/ToolBox.js
| @@ -4,8 +4,7 @@ | @@ -4,8 +4,7 @@ | ||
| 4 | '<audio id="audio"></audio>'+ | 4 | '<audio id="audio"></audio>'+ |
| 5 | '</div>'+ | 5 | '</div>'+ |
| 6 | '<div class="ctrl-wrap">'+ | 6 | '<div class="ctrl-wrap">'+ |
| 7 | - '<div class="tool-item" id="prepare-recording" data-toggle="tooltip" data-placement="top" title="点此开始录制"><img src="" alt="" /></div>'+ | ||
| 8 | - '<div class="tool-item" id="start-recording" data="1" data-toggle="tooltip" data-placement="top" title="<span class=\'tooltip-content-large\'>点此开始录制</span>"><img src="" alt="" /></div>'+ | 7 | + '<div class="tool-item" id="start-recording" data="1"><span class="start-recording-tips">点此开始录制</span><img src="" alt="" /></div>'+ |
| 9 | '<div class="tool-item" id="stop-recording" data="1" data-toggle="tooltip" data-placement="top" title="结束录制"><img src="" alt="" /></div>'+ | 8 | '<div class="tool-item" id="stop-recording" data="1" data-toggle="tooltip" data-placement="top" title="结束录制"><img src="" alt="" /></div>'+ |
| 10 | '<div class="tool-item" id="re-recoding" data="1" data-toggle="tooltip" data-placement="top" title="重新录制"><img src="" alt="" /></div>'+ | 9 | '<div class="tool-item" id="re-recoding" data="1" data-toggle="tooltip" data-placement="top" title="重新录制"><img src="" alt="" /></div>'+ |
| 11 | '</div>'+ | 10 | '</div>'+ |
| @@ -90,6 +89,9 @@ | @@ -90,6 +89,9 @@ | ||
| 90 | $('#re-sure').on('click', function(){ _this.reSure(); }) | 89 | $('#re-sure').on('click', function(){ _this.reSure(); }) |
| 91 | $('#re-cancel').on('click', function(){ _this.reCancel(); }) | 90 | $('#re-cancel').on('click', function(){ _this.reCancel(); }) |
| 92 | $('.play-code').on('click', function(){ _this.playerPage(); }) | 91 | $('.play-code').on('click', function(){ _this.playerPage(); }) |
| 92 | + window.onbeforeunload = function() { | ||
| 93 | + return '尚未保存,关闭将丢失本次操作内容,确定关闭?' | ||
| 94 | + }; | ||
| 93 | }, | 95 | }, |
| 94 | startRecording: function(callback){ | 96 | startRecording: function(callback){ |
| 95 | console.log(this.options.userId); | 97 | console.log(this.options.userId); |
| @@ -294,6 +296,7 @@ | @@ -294,6 +296,7 @@ | ||
| 294 | $('#cancel').prop("disabled", false); | 296 | $('#cancel').prop("disabled", false); |
| 295 | 297 | ||
| 296 | window.opener.postMessage(_data, _source); | 298 | window.opener.postMessage(_data, _source); |
| 299 | + window.onbeforeunload = null; | ||
| 297 | window.close(); | 300 | window.close(); |
| 298 | }, | 301 | }, |
| 299 | error: function() { | 302 | error: function() { |
| @@ -312,9 +315,6 @@ | @@ -312,9 +315,6 @@ | ||
| 312 | }, | 315 | }, |
| 313 | cancel: function(){ | 316 | cancel: function(){ |
| 314 | console.log('cancel'); | 317 | console.log('cancel'); |
| 315 | - $(window).unbind('beforeunload', function() { | ||
| 316 | - return '确认退出? 将不保存你的代码'; | ||
| 317 | - }); | ||
| 318 | window.close(); | 318 | window.close(); |
| 319 | }, | 319 | }, |
| 320 | /* | 320 | /* |
src/gxb-ide/toolBox.css
| @@ -22,6 +22,53 @@ | @@ -22,6 +22,53 @@ | ||
| 22 | .tool-item img{ | 22 | .tool-item img{ |
| 23 | width: 48px; | 23 | width: 48px; |
| 24 | } | 24 | } |
| 25 | +@keyframes jump { | ||
| 26 | + from { | ||
| 27 | + transform: translateY(-50%); | ||
| 28 | + -webkit-transform: translateY(-50%); | ||
| 29 | + } | ||
| 30 | + to { | ||
| 31 | + transform: translateY(0); | ||
| 32 | + -webkit-transform: translateY(0); | ||
| 33 | + } | ||
| 34 | +} | ||
| 35 | +#start-recording { | ||
| 36 | + position: relative; | ||
| 37 | +} | ||
| 38 | +#start-recording .start-recording-tips { | ||
| 39 | + position: absolute; | ||
| 40 | + background: #fff; | ||
| 41 | + border: 1px solid #1FB6FF; | ||
| 42 | + color: #1FB6FF; | ||
| 43 | + bottom: 100%; | ||
| 44 | + left: 50%; | ||
| 45 | + margin-left: -100px; | ||
| 46 | + width: 200px; | ||
| 47 | + line-height: 50px; | ||
| 48 | + font-size: 18px; | ||
| 49 | + /*font-weight: bold;*/ | ||
| 50 | + text-align: center; | ||
| 51 | + border-radius: 6px; | ||
| 52 | + animation: jump ease 1s infinite; | ||
| 53 | + -webkit-animation: jump ease 1s infinite; | ||
| 54 | + pointer-events: none; | ||
| 55 | +} | ||
| 56 | +#start-recording .start-recording-tips:before, #start-recording .start-recording-tips:after { | ||
| 57 | + position: absolute; | ||
| 58 | + left: 50%; | ||
| 59 | + top: 100%; | ||
| 60 | + margin-left: -10px; | ||
| 61 | + content: ""; | ||
| 62 | + border: 10px solid transparent; | ||
| 63 | + border-bottom: 0; | ||
| 64 | + border-top: 10px solid #1FB6FF; | ||
| 65 | +} | ||
| 66 | +#start-recording .start-recording-tips:after { | ||
| 67 | + margin-top: -1px; | ||
| 68 | + border-top-color: #fff; | ||
| 69 | +} | ||
| 70 | + | ||
| 71 | + | ||
| 25 | .recording-time{ | 72 | .recording-time{ |
| 26 | float: left; | 73 | float: left; |
| 27 | height: 60px; | 74 | height: 60px; |
src/js/c.js
| @@ -59,6 +59,7 @@ $(function(){ | @@ -59,6 +59,7 @@ $(function(){ | ||
| 59 | questionId: _questionId, | 59 | questionId: _questionId, |
| 60 | autoScore: _autoScore, | 60 | autoScore: _autoScore, |
| 61 | startCallback: function(){ | 61 | startCallback: function(){ |
| 62 | + window.recordStartedOnce = true; | ||
| 62 | // 禁止重命名 | 63 | // 禁止重命名 |
| 63 | setTimeout(function(){ | 64 | setTimeout(function(){ |
| 64 | DirSetting.edit.showRenameBtn = false; | 65 | DirSetting.edit.showRenameBtn = false; |
src/scss/main.scss
| @@ -329,7 +329,7 @@ html, body{ | @@ -329,7 +329,7 @@ html, body{ | ||
| 329 | } | 329 | } |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | -.compile-reslut, .re-reslut{ | 332 | +.compile-reslut, .re-reslut , .mustrecord-reslut{ |
| 333 | position: absolute; | 333 | position: absolute; |
| 334 | height: 200px; | 334 | height: 200px; |
| 335 | width: 400px; | 335 | width: 400px; |
| @@ -453,7 +453,7 @@ html, body{ | @@ -453,7 +453,7 @@ html, body{ | ||
| 453 | .play-code img{ | 453 | .play-code img{ |
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | -.confirm-tip{ | 456 | +.confirm-tip, .mustrecord-tip { |
| 457 | position: absolute; | 457 | position: absolute; |
| 458 | width: 100%; | 458 | width: 100%; |
| 459 | height: 100%; | 459 | height: 100%; |
src/v1.1/index.html
| @@ -237,6 +237,20 @@ | @@ -237,6 +237,20 @@ | ||
| 237 | </div> | 237 | </div> |
| 238 | </div> | 238 | </div> |
| 239 | </div> | 239 | </div> |
| 240 | + <div class="mustrecord-tip" style="display: none;"> | ||
| 241 | + <div class="mustrecord-reslut"> | ||
| 242 | + <div class="tip-header"> | ||
| 243 | + <span>提示</span> | ||
| 244 | + </div> | ||
| 245 | + | ||
| 246 | + <div class="tip-content"> | ||
| 247 | + <p>请先点击开始录制按钮录制代码!</p> | ||
| 248 | + </div> | ||
| 249 | + <div class="tip-footer"> | ||
| 250 | + <button class="btn btn-success btn-sm">确定</button> | ||
| 251 | + </div> | ||
| 252 | + </div> | ||
| 253 | + </div> | ||
| 240 | </div> | 254 | </div> |
| 241 | 255 | ||
| 242 | <script src="../js/jquery-1.7.1.js"></script> | 256 | <script src="../js/jquery-1.7.1.js"></script> |