Commit 1ddaa78a2c33147dc164e1673609059fe3e2ca45
Merge branch 'feature/20170112_Multiple_files' of gitlab.gaoxiaobang.com:kira/pr…
…ogramming into feature/20170112_Multiple_files Conflicts: src/js/gb.js
Showing
1 changed file
with
10 additions
and
10 deletions
src/js/gb.js
| ... | ... | @@ -1900,35 +1900,35 @@ $(function() { |
| 1900 | 1900 | * @return {[type]} [description] |
| 1901 | 1901 | */ |
| 1902 | 1902 | resetCodeMirrorValue: function(num) { |
| 1903 | + console.info('GBCodePlayBack.resetCodeMirrorValue'); | |
| 1903 | 1904 | var _this = this; |
| 1904 | 1905 | var _thisNum = num; |
| 1905 | 1906 | if (_thisNum == 0) { |
| 1906 | 1907 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 1907 | - if (treeLinkEditor[i].CodeMirrorRecord.getValue() != undefined) { | |
| 1908 | - ZTREE.showEdite({'treeNode': treeLinkEditor[i].file}); | |
| 1908 | + if (treeLinkEditor[i].CodeMirrorRecord.getValue()) { | |
| 1909 | + ZTREE.showEdite({'treeNode': {'name': treeLinkEditor[i].file}}); | |
| 1909 | 1910 | treeLinkEditor[i].CodeMirrorRecord.setValue(""); |
| 1910 | 1911 | } |
| 1911 | 1912 | } |
| 1912 | 1913 | } else if (_thisNum == 1) { |
| 1913 | 1914 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 1914 | - if (treeLinkEditor[i].CodeMirrorReplay.getValue() != undefined) { | |
| 1915 | - ZTREE.showEdite({'treeNode': treeLinkEditor[i].file}); | |
| 1915 | + if (treeLinkEditor[i].CodeMirrorReplay.getValue()) { | |
| 1916 | + ZTREE.showEdite({'treeNode': {'name': treeLinkEditor[i].file}, 'replay': true}); | |
| 1916 | 1917 | treeLinkEditor[i].CodeMirrorReplay.setValue(""); |
| 1917 | 1918 | } |
| 1918 | 1919 | } |
| 1919 | 1920 | } else { |
| 1920 | 1921 | for (var i = 0; i < treeLinkEditor.length; i++) { |
| 1921 | - | |
| 1922 | - if (treeLinkEditor[i].CodeMirrorRecord.getValue() != undefined) { | |
| 1923 | - ZTREE.showEdite({'treeNode': treeLinkEditor[i].file}); | |
| 1922 | + if(treeLinkEditor[i].CodeMirrorRecord.getValue()){ | |
| 1923 | + ZTREE.showEdite({'treeNode': {'name': treeLinkEditor[i].file}}); | |
| 1924 | 1924 | treeLinkEditor[i].CodeMirrorRecord.setValue(""); |
| 1925 | - } | |
| 1926 | - if (treeLinkEditor[i].CodeMirrorReplay.getValue() != undefined) { | |
| 1927 | - ZTREE.showEdite({'treeNode': treeLinkEditor[i].file}); | |
| 1925 | + }else if(treeLinkEditor[i].CodeMirrorReplay.getValue()){ | |
| 1926 | + ZTREE.showEdite({'treeNode': {'name': treeLinkEditor[i].file}, 'replay': true}); | |
| 1928 | 1927 | treeLinkEditor[i].CodeMirrorReplay.setValue(""); |
| 1929 | 1928 | } |
| 1930 | 1929 | } |
| 1931 | 1930 | } |
| 1931 | + ZTREE.showEdite({'treeNode': {'name': treeLinkEditor[0].file}}); | |
| 1932 | 1932 | }, |
| 1933 | 1933 | /** |
| 1934 | 1934 | * 获取各个文件中的代码 | ... | ... |