Changeset 1053987
- Timestamp:
- 12/25/2014 12:04:09 PM (11 years ago)
- Location:
- gmace/trunk
- Files:
-
- 4 edited
-
assets/css/style.css (modified) (10 diffs)
-
assets/js/scripts.js (modified) (10 diffs)
-
includes/content.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gmace/trunk/assets/css/style.css
r1053869 r1053987 1 1 #filedit{ 2 position: relative;3 height: 595px;4 margin-top: 10px;2 position: relative; 3 height: 595px; 4 margin-top: 10px; 5 5 } 6 6 #filedit #file{ 7 position: absolute;8 left: 75.1%;top: 0;9 width: 25%;height: 572px;10 overflow-x: auto;11 background: rgb(255, 255, 255);12 border: 1px solid rgb(170, 160, 160);13 border-radius: 5px;14 font-family: -webkit-body;7 position: absolute; 8 left: 75.1%;top: 0; 9 width: 25%;height: 572px; 10 overflow-x: auto; 11 background: rgb(255, 255, 255); 12 border: 1px solid rgb(170, 160, 160); 13 border-radius: 5px; 14 font-family: -webkit-body; 15 15 } 16 16 #filedit #file>span{ … … 24 24 } 25 25 #filedit #text_file{ 26 height: 100%;27 width: 75%;26 height: 100%; 27 width: 75%; 28 28 } 29 29 #gm_slider{ 30 height: 6%;31 background: rgb(243, 245, 241);32 border: 1px solid rgb(170, 160, 160);33 border-radius: 4px 4px 0 0;34 position: relative;35 overflow: hidden;30 height: 6%; 31 background: rgb(243, 245, 241); 32 border: 1px solid rgb(170, 160, 160); 33 border-radius: 4px 4px 0 0; 34 position: relative; 35 overflow: hidden; 36 36 } 37 37 #gm_slider>div{ 38 position: absolute; 39 min-width: 100%; 40 bottom: 0; 41 overflow: hidden; 42 } 43 #gm_slider>div>p{ 44 position: relative; 45 width: 100px; 46 border: 1px solid transparent; 47 background: rgb(255, 255, 255); 48 padding: 0.5%; 49 font-weight: bold;font-size: 12px; 50 color: rgb(66, 66, 66); 51 text-align: center; 52 padding-right: 20px; 53 margin: 0;margin-left: 2px; 54 transition: .1s; 55 display: inline-block; 56 cursor: pointer; 57 } 58 #gm_slider>div>p:hover, #gm_slider>div>p[clicking="true"]{ 59 background: rgb(232, 232, 232); 60 } 61 #gm_slider>div>p[clicking="false"]{ 62 border-color: rgb(191, 203, 185); 63 } 64 #gm_slider>div>p>a{ 38 position: absolute; 39 min-width: 100%; 40 bottom: 0; 41 overflow: hidden; 42 } 43 p.tab_editor{ 44 position: relative; 45 width: 100px; 46 border: 1px solid transparent; 47 background: rgb(255, 255, 255); 48 padding: 0.5%; 49 font-weight: bold;font-size: 12px; 50 color: rgb(66, 66, 66); 51 text-align: center; 52 padding-right: 20px; 53 margin: 0;margin-left: 2px; 54 transition: .1s; 55 display: inline-block; 56 cursor: pointer; 57 } 58 p.tab_editor[clicking="true"]{ 59 -webkit-filter: brightness(1.35); 60 -moz-filter: brightness(1.35); 61 -ms-filter: brightness(1.35); 62 -o-filter: brightness(1.35); 63 filter: brightness(1.35); 64 color: black; 65 } 66 p.tab_editor:hover{ 67 background: rgb(232, 232, 232); 68 } 69 p.tab_editor[clicking="false"]{ 70 border-color: rgb(191, 203, 185); 71 } 72 a.close_editor{ 65 73 position: absolute; 66 74 width: 15px;height: 15px; … … 72 80 font-size: 10px; 73 81 } 74 #gm_slider>div>p>a:hover{82 a.close_editor:hover{ 75 83 border-radius: 5px; 76 84 } … … 85 93 } 86 94 #gm_hotbar>div{ 87 background: rgb(219, 208, 208);88 border: 1px solid rgb(170, 160, 160);89 cursor: pointer;90 width: 40px;height: 40px;91 margin: 0;92 margin-bottom: 2px;93 position: relative;95 background: rgb(219, 208, 208); 96 border: 1px solid rgb(170, 160, 160); 97 cursor: pointer; 98 width: 40px;height: 40px; 99 margin: 0; 100 margin-bottom: 2px; 101 position: relative; 94 102 } 95 103 #gm_hotbar>div>*{ … … 103 111 text-align: center; 104 112 font-size: 55px; 105 font-weight: bold;113 font-weight: bold; 106 114 } 107 115 #gm_hotbar>div>span{ … … 114 122 } 115 123 #gm_editors>div{ 116 height: 100%;117 border: 1px solid rgb(178, 163, 163);118 border-top: none;119 font-size: 16px;124 height: 100%; 125 border: 1px solid rgb(178, 163, 163); 126 border-top: none; 127 font-size: 16px; 120 128 } 121 129 /*----------------------------------filedit_2-------------------------------------*/ 122 130 #filedit_2 #file{ 123 position: fixed;124 top: 0;right: 0;125 width: 0;height: 100%;126 overflow-x: auto;127 background: white;128 border-left: 5px solid rgb(241, 231, 231);129 z-index: 99;130 transition:0.3s;131 position: fixed; 132 top: 0;right: 0; 133 width: 0;height: 100%; 134 overflow-x: auto; 135 background: white; 136 border-left: 5px solid rgb(241, 231, 231); 137 z-index: 99; 138 transition:0.3s; 131 139 } 132 140 #filedit_2 #file:hover{ … … 139 147 height: 20px;width: 20px; 140 148 border-radius: 0 0 0 100px; 141 transition:0.3s;149 transition:0.3s; 142 150 } 143 151 #filedit_2 #file:hover>span{ … … 184 192 } 185 193 ul.scandir_ul{ 186 padding:0;187 margin-left: 4%;188 list-style-type: none;189 border-left: 1px solid rgb(116, 135, 168);190 border-bottom: 1px solid rgb(116, 135, 168);191 border-radius: 0 15px;192 padding-bottom: 10px;193 display: none;194 padding:0; 195 margin-left: 4%; 196 list-style-type: none; 197 border-left: 1px solid rgb(116, 135, 168); 198 border-bottom: 1px solid rgb(116, 135, 168); 199 border-radius: 0 15px; 200 padding-bottom: 10px; 201 display: none; 194 202 } 195 203 #file>div>ul.scandir_ul, #file>div>ul.scandir_ul>div>ul.scandir_ul{display: block;} 196 204 .scandir_span{ 197 color: #32324E;198 cursor: pointer;199 font-weight: bold;200 font-size: 17px;201 margin-left: 3%;205 color: #32324E; 206 cursor: pointer; 207 font-weight: bold; 208 font-size: 17px; 209 margin-left: 3%; 202 210 } 203 211 li.scandir_span{ 204 list-style: url(icon/folder.png);212 list-style: url(icon/folder.png); 205 213 } 206 214 ul.scandir_ul li a{ 207 text-decoration: none;208 color: #476F67;209 margin-left: 20px;210 cursor: pointer;211 font-size: 20px;215 text-decoration: none; 216 color: #476F67; 217 margin-left: 20px; 218 cursor: pointer; 219 font-size: 20px; 212 220 } 213 221 ul.scandir_ul li.icon{ 214 background: no-repeat;215 background-size: 20px 20px;216 text-indent: 5px;217 margin-left: 5px;222 background: no-repeat; 223 background-size: 20px 20px; 224 text-indent: 5px; 225 margin-left: 5px; 218 226 } 219 227 … … 266 274 border: rgb(221, 22, 22) 2px solid; 267 275 } 276 #gm_actions{ 277 position: absolute; 278 right: 10px;bottom: -5%; 279 background: white; 280 width: 80px; 281 border: 3px solid rgb(110, 110, 110); 282 border-radius: 5px; 283 padding: 25px; 284 padding-top: 3px; 285 overflow: hidden; 286 transition: all 0.3s; 287 z-index: 10; 288 } 289 #gm_actions:hover{ 290 width: 250px;height: 325px; 291 padding: 25px; 292 } 293 #gm_actions>div{ 294 position: absolute; 295 margin-right: 25px; 296 overflow: hidden; 297 top: 1000%; 298 } 299 #gm_actions:hover>div{ 300 top: auto; 301 } 302 #gm_actions .unhide{ 303 position: absolute; 304 bottom: -10px;right: 10px; 305 font-size: 14px; 306 font-weight: bold; 307 cursor: pointer; 308 } 268 309 #select_theme{ 269 position: absolute;270 right: 10px;271 310 display: inline; 311 } 312 .gm_p{ 272 313 font-weight: bold; 273 314 font-size: 18px; 315 padding-bottom: 5px; 316 margin: 0; 274 317 } 275 318 #select_theme>select{ … … 277 320 margin-left: 10px; 278 321 } 322 #gm_actions .gm_help_hot_key{ 323 position: absolute; 324 bottom: 25px; 325 } 326 #gm_actions .gm_help_hot_key>p{ 327 margin: 0; 328 color: rgb(179, 179, 179); 329 font-variant: small-caps; 330 font-weight: bold; 331 font-size: 12px; 332 cursor: default; 333 } -
gmace/trunk/assets/js/scripts.js
r1053882 r1053987 9 9 THEME_EDITOR = jQuery("#filedit").data("theme"); 10 10 11 jQuery("# select_theme>select").on('change', function(){11 jQuery("#gm_actions #select_theme>select").on('change', function(){ 12 12 setThemeEditor(jQuery(this).val()); 13 for(var i=0; i<editors.length; i++) 14 editors[i].setTheme("ace/theme/"+jQuery(this).val()); 13 changePar("theme", jQuery(this).val()); 15 14 THEME_EDITOR = jQuery(this).val(); 15 }); 16 jQuery("#gm_actions input[name='wrapping']").on('change', function(){ 17 changePar("wrapping", jQuery(this).prop("checked")); 18 }); 19 jQuery("#gm_actions input[name='printMargin']").on('change', function(){ 20 changePar("printMargin", jQuery(this).prop("checked")); 21 }); 22 jQuery("#gm_actions input[name='linePos']").on('change', function(){ 23 if(jQuery(this).val()>editors[getID()].session.getLength()) 24 jQuery(this).val(editors[getID()].session.getLength()); 25 editors[getID()].gotoLine(jQuery(this).val()); 16 26 }); 17 27 … … 20 30 jQuery("#filedit #gm_hotbar .full_mode").on('click',function(){ 21 31 jQuery("#filedit").prop("id","filedit_2"); 32 changePar("resize"); 22 33 }); 23 34 jQuery("#filedit_2 #gm_hotbar .full_mode").on('click',function(){ 24 35 jQuery("#filedit_2").prop("id","filedit"); 36 changePar("resize"); 25 37 }); 26 38 … … 66 78 }); 67 79 jQuery("#gm_hotbar .new_window_editor").on('click',function(){ 68 jQuery("#gm_slider>div>p").css("background", "rgb(232, 232, 232)").attr("clicking","false"); 69 jQuery("#gm_editors>div:visible").fadeOut(100,function(){ 70 editors[editors.length] = addEditor(); 71 }); 80 createNewWindow(); 72 81 }); 73 82 jQuery(".code-insert").on("click",function(){ … … 80 89 }); 81 90 function getFileOfTab(){ 82 jQuery("#gm_slider>div>p[clicking='true' ").css("background", submenuColor);83 jQuery(" #gm_slider>div>p").on('click',function(){91 jQuery("#gm_slider>div>p[clicking='true']").css("background", submenuColor); 92 jQuery("p.tab_editor").on('click',function(){ 84 93 var id = jQuery(this).prop("id")-1+2,e = jQuery(this); 85 94 jQuery("#gm_editors>div:visible").fadeOut(100,function(){ 86 jQuery("#gm_slider>div>p").css("background", " rgb(232, 232, 232)").attr("clicking","false");95 jQuery("#gm_slider>div>p").css("background", "").attr("clicking","false"); 87 96 e.css("background", submenuColor).attr("clicking","true"); 88 97 jQuery("#gm_editors>div#text_file_"+id).fadeIn(100); 89 98 }); 90 99 }); 91 jQuery(" #gm_slider>div>p>a").on('click',function(){100 jQuery("a.close_editor").on('click',function(){ 92 101 if(jQuery("#gm_slider>div>p").length==1)return true; 93 102 var id = jQuery(this).parent("p").prop("id")-1+1,e = jQuery(this); … … 98 107 jQuery("#gm_editors>div:eq(0)").fadeIn(100); 99 108 jQuery("#gm_slider>div>p:eq(0)").attr("clicking","true"); 109 getFileOfTab(); 100 110 }); 101 111 }else{ 102 112 e.parent("p").remove(); 103 113 jQuery("#gm_editors>div#text_file_"+(id+1)).remove(); 114 getFileOfTab(); 104 115 } 105 116 }); … … 114 125 file[editors.length]="index.php"; 115 126 readOnly[editors.length]=false; 116 jQuery("#gm_slider>div").append("<p title='"+file[editors.length]+"' clicking='true' id='"+editors.length+"' >"+file[editors.length]+"<a title='Закрыть'>X</a></p>");127 jQuery("#gm_slider>div").append("<p title='"+file[editors.length]+"' clicking='true' id='"+editors.length+"' class='tab_editor'>"+file[editors.length]+"<a title='Закрыть' class='close_editor'>X</a></p>"); 117 128 jQuery("#gm_editors").append("<div id='text_file_"+(editors.length-1+2)+"'></div>"); 118 129 var editor_r = ace.edit("text_file_"+(editors.length-1+2)); … … 121 132 editor_r.setShowPrintMargin(false); 122 133 editor_r.getSession().setUseWrapMode(true); 134 editor_r.getSession().setUseSoftTabs(false); 123 135 editor_r.commands.addCommand({ 124 136 name:'save', // название команды … … 127 139 e = getID(); 128 140 writeToFile(dir[e]+file[e],editor); 141 } 142 }); 143 editor_r.commands.addCommand({ 144 name:'newwindow', // название команды 145 bindKey:{win: 'Ctrl-Q', mac: 'Command-Q'}, // вызов на PC и Mac 146 exec: function(editor){ 147 createNewWindow(); 129 148 } 130 149 }); … … 144 163 readOnly: true 145 164 }); 165 editor_r.getSession().selection.on('changeCursor', function(e){ 166 jQuery("#gm_actions input[name='linePos']").val(editors[getID()].getCursorPosition().row + 1); 167 }); 146 168 readFromFile(dir[editors.length]+file[editors.length],editor_r); 147 169 getFileOfTab(); 148 170 return editor_r; 171 } 172 function fnShowProps(obj, objName){ 173 var result = ""; 174 for (var i in obj) // обращение к свойствам объекта по индексу 175 result += objName + "." + i + " = " + obj[i] + "<br />\n"; 176 document.write(result); 149 177 } 150 178 function getDirBack(){ … … 207 235 }); 208 236 } 237 function changePar(par, val){ 238 for(var i=0; i<editors.length; i++){ 239 switch(par){ 240 case "theme": 241 editors[i].setTheme("ace/theme/"+val); 242 break; 243 case "wrapping": 244 editors[i].getSession().setUseWrapMode(val); 245 editors[i].resize(); 246 break; 247 case "resize": 248 editors[i].resize(); 249 break; 250 case "printMargin": 251 editors[i].setShowPrintMargin(val); 252 editors[i].resize(); 253 break; 254 } 255 } 256 } 257 function createNewWindow(){ 258 jQuery("#gm_slider>div>p").css("background", "").attr("clicking","false"); 259 jQuery("#gm_editors>div:visible").fadeOut(100,function(){ 260 editors[editors.length] = addEditor(); 261 }); 262 } -
gmace/trunk/includes/content.php
r1053869 r1053987 1 1 <div id="filedit" data-theme="<?php print($this->THEME);?>"> 2 2 <div id="messages"></div> 3 <div id="text_file">4 <div id="gm_slider">5 <div></div>6 </div>3 <div id="text_file"> 4 <div id="gm_slider"> 5 <div></div> 6 </div> 7 7 <div id="gm_hotbar"> 8 8 <div title="Добавить окно" class="new_window_editor"><p>+</p></div> … … 15 15 <div id="gm_editors"></div> 16 16 </div> 17 <input type="button" value="Сохранить" class="button button-primary" title="Также можно воспользоваться комбинацией Ctrl+S"> 18 <div id="file"> 19 <span></span> 20 <div><?php print($this->scaning_dir($this->SCAN_DIR));?></div> 21 </div> 22 <div id="select_theme"> 23 <span>Тема редактора:</span> 24 <select> 25 <option value="chrome">chrome</option> 26 <option value="clouds">clouds</option> 27 <option value="cobalt">cobalt</option> 28 <option value="dreamweaver">dreamweaver</option> 29 <option value="eclipse">eclipse</option> 30 <option value="github">github</option> 31 <option value="monokai">monokai</option> 32 <option value="solarized_dark">solarized_dark</option> 33 <option value="solarized_light">solarized_light</option> 34 <option value="crimson_editor">crimson_editor</option> 35 <option value="elefsy">elefsy</option> 36 </select> 17 <input type="button" value="Сохранить" class="button button-primary" title="Также можно воспользоваться комбинацией Ctrl+S"> 18 <div id="file"> 19 <span></span> 20 <div><?php print($this->scaning_dir($this->SCAN_DIR));?></div> 21 </div> 22 <div id="gm_actions"> 23 <div> 24 <div id="select_theme"> 25 <p class='gm_p'>Тема редактора:</p> 26 <select> 27 <option value="chrome">chrome</option> 28 <option value="clouds">clouds</option> 29 <option value="cobalt">cobalt</option> 30 <option value="dreamweaver">dreamweaver</option> 31 <option value="eclipse">eclipse</option> 32 <option value="github">github</option> 33 <option value="monokai">monokai</option> 34 <option value="solarized_dark">solarized_dark</option> 35 <option value="solarized_light">solarized_light</option> 36 <option value="crimson_editor">crimson_editor</option> 37 <option value="elefsy">elefsy</option> 38 </select> 39 </div> 40 <p><input type="checkbox" name="wrapping" checked><span> Wrapping</span></p> 41 <p><input type="checkbox" name="printMargin"><span> Print margin</span></p> 42 <p class='gm_p'>Текущая строка:</p> 43 <input type="number" value="1" name="linePos"> 44 </div> 45 <div class='gm_help_hot_key'> 46 <p>[Ctrl-S] : Save</p> 47 <p>[Ctrl-B] : ReadOnly On\Off</p> 48 <p>[Ctrl-Q] : New window</p> 49 </div> 50 <p class="unhide">Доп. настройки</p> 37 51 </div> 38 52 </div> -
gmace/trunk/readme.txt
r1053922 r1053987 30 30 = 1.0 = 31 31 * Created GMAce plugin. 32 33 = 1.1 = 34 * Fixed an issue where when you resize the editor, the code is not stretched at full length 35 * Fixed some issues with tabs editor 36 + Added extended setup menu of features editor 37 + Added the ability to go to the line number 38 + Added the hot keys
Note: See TracChangeset
for help on using the changeset viewer.