Commit 94d5674b0bbfe13f412b8059d2edaa6621b43a3b
1 parent
934875eb
添加数字判断
Showing
3 changed files
with
25 additions
and
20 deletions
src/js/gb.js
| ... | ... | @@ -191,9 +191,14 @@ $(function() { |
| 191 | 191 | if(treeLinkEditor[i].file === newName){ |
| 192 | 192 | treeFoo.renameAlert("文件名“" + newName + "”已被占用,请选取其他名称。", treeNode); |
| 193 | 193 | return false; |
| 194 | - }else if(/.java$/.test(newName) && newName.split('.').length > 2){ | |
| 195 | - treeFoo.renameAlert("文件名“" + newName + "”有误,请选取其他名称。", treeNode); | |
| 196 | - return false; | |
| 194 | + }else if(/.java$/.test(newName)){ | |
| 195 | + if(newName.split('.').length > 2){ | |
| 196 | + treeFoo.renameAlert("文件名“" + newName + "”有误,请选取其他名称。", treeNode); | |
| 197 | + return false; | |
| 198 | + }else if(/[0-9]/.test(newName.substr(0,1))){ | |
| 199 | + treeFoo.renameAlert("文件“" + newName + "”有误,首字母不能是数字,请选取其他名称。", treeNode); | |
| 200 | + return false; | |
| 201 | + } | |
| 197 | 202 | }else if(!/.java$/.test(newName)){ |
| 198 | 203 | treeFoo.renameAlert("文件后缀名“" + newName + "”有误,请选取其他名称。", treeNode); |
| 199 | 204 | return false; |
| ... | ... | @@ -1828,29 +1833,29 @@ $(function() { |
| 1828 | 1833 | var appMainHeader = $('#appMainHeader') |
| 1829 | 1834 | var winWidth = $(window).width(); |
| 1830 | 1835 | var winHeight = $(window).height(); |
| 1831 | - var appMinWidth = 860; | |
| 1836 | + var appMinWidth = 858; | |
| 1832 | 1837 | |
| 1833 | 1838 | var isLeftResizing = false; |
| 1834 | 1839 | var isRightResizing = false; |
| 1835 | 1840 | var _width = 0; |
| 1836 | 1841 | var _tempWidth = 0; |
| 1837 | - var appLeftRatio = 200 / appMinWidth; | |
| 1842 | + var appLeftRatio = 160 / appMinWidth; | |
| 1838 | 1843 | var appRightRatio = 320 / appMinWidth; |
| 1839 | 1844 | |
| 1840 | 1845 | if($(window).width() <= appMinWidth){ |
| 1841 | 1846 | $('body').width(appMinWidth) |
| 1842 | 1847 | app.width(appMinWidth); |
| 1843 | 1848 | appContainer.height($(window).height() - appFooter.height()); |
| 1844 | - appLeft.width(200); | |
| 1845 | - appMian.width(400); | |
| 1849 | + appLeft.width(160); | |
| 1850 | + appMian.width(378); | |
| 1846 | 1851 | appRight.width(320); |
| 1847 | - appMainHeader.css('margin-left', -200); | |
| 1852 | + appMainHeader.css('margin-left', -160); | |
| 1848 | 1853 | $('.recording-ctrl-bar').css('padding', '0 20px'); |
| 1849 | 1854 | }else{ |
| 1850 | 1855 | $('body').width('100%'); |
| 1851 | 1856 | app.width('100%'); |
| 1852 | 1857 | appContainer.height($(window).height() - appFooter.height()); |
| 1853 | - appLeft.width(200); | |
| 1858 | + appLeft.width(160); | |
| 1854 | 1859 | appMian.width(parseInt($(window).width() - appLeft.width() - appRight.width())); |
| 1855 | 1860 | appRight.width(320); |
| 1856 | 1861 | appMainHeader.css('margin-left', -appLeft.width()); | ... | ... |
src/js/tree.json
| 1 | 1 | { |
| 2 | 2 | "tree": [ |
| 3 | 3 | { "id": 1, "pId": 0, "name": "package1", "open": true, "isParent": true, "collapse": false }, |
| 4 | - { "id": 11, "pId": 1, "name": "Class1.java", "type": "java" }, | |
| 5 | - { "id": 12, "pId": 1, "name": "Class2.java", "type": "java" }, | |
| 6 | - { "id": 13, "pId": 1, "name": "Class3.java", "type": "java" }, | |
| 7 | - { "id": 14, "pId": 1, "name": "Class4.java", "type": "java" }, | |
| 8 | - { "id": 15, "pId": 1, "name": "Class5.java", "type": "java" }, | |
| 4 | + { "id": 11, "pId": 1, "name": "default1.java", "type": "java" }, | |
| 5 | + { "id": 12, "pId": 1, "name": "default2.java", "type": "java" }, | |
| 6 | + { "id": 13, "pId": 1, "name": "default3.java", "type": "java" }, | |
| 7 | + { "id": 14, "pId": 1, "name": "default4.java", "type": "java" }, | |
| 8 | + { "id": 15, "pId": 1, "name": "default5.java", "type": "java" }, | |
| 9 | 9 | { "id": 2, "pId": 0, "name": "package2", "open": true, "isParent": true, "expand": true }, |
| 10 | - { "id": 21, "pId": 2, "name": "ClassA.java", "type": "java" }, | |
| 11 | - { "id": 22, "pId": 2, "name": "ClassB.java", "type": "java" }, | |
| 12 | - { "id": 23, "pId": 2, "name": "ClassC.java", "type": "java" }, | |
| 13 | - { "id": 24, "pId": 2, "name": "ClassD.java", "type": "java" }, | |
| 14 | - { "id": 25, "pId": 2, "name": "ClassE.java", "type": "java" } | |
| 10 | + { "id": 21, "pId": 2, "name": "defaultA.java", "type": "java" }, | |
| 11 | + { "id": 22, "pId": 2, "name": "defaultB.java", "type": "java" }, | |
| 12 | + { "id": 23, "pId": 2, "name": "defaultC.java", "type": "java" }, | |
| 13 | + { "id": 24, "pId": 2, "name": "defaultD.java", "type": "java" }, | |
| 14 | + { "id": 25, "pId": 2, "name": "defaultE.java", "type": "java" } | |
| 15 | 15 | ] |
| 16 | 16 | } | ... | ... |
src/v1.1/index.html
| ... | ... | @@ -201,7 +201,7 @@ |
| 201 | 201 | <span>提示</span> |
| 202 | 202 | </div> |
| 203 | 203 | <div class="tip-content"> |
| 204 | - <p>在开始录制之前可双击文件名进行修改,开始录制后文件名将不可修改。?</p> | |
| 204 | + <p>在开始录制之前可对文件名进行修改,开始录制后文件名将不可修改。</p> | |
| 205 | 205 | </div> |
| 206 | 206 | <div class="tip-footer"> |
| 207 | 207 | <button class="btn btn-success btn-sm" id="confirm">确定</button> | ... | ... |