Plugin Directory

Changeset 1053987


Ignore:
Timestamp:
12/25/2014 12:04:09 PM (11 years ago)
Author:
GMDragonX
Message:

update plugin

Location:
gmace/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gmace/trunk/assets/css/style.css

    r1053869 r1053987  
    11#filedit{
    2     position: relative;
    3     height: 595px;
    4     margin-top: 10px;
     2    position: relative;
     3    height: 595px;
     4    margin-top: 10px;
    55}
    66#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;
    1515}
    1616#filedit #file>span{
     
    2424}
    2525#filedit #text_file{
    26     height: 100%;
    27     width: 75%;
     26    height: 100%;
     27    width: 75%;
    2828}
    2929#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;
    3636}
    3737#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}
     43p.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}
     58p.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}
     66p.tab_editor:hover{
     67    background: rgb(232, 232, 232);
     68}
     69p.tab_editor[clicking="false"]{
     70    border-color: rgb(191, 203, 185);
     71}
     72a.close_editor{
    6573    position: absolute;
    6674    width: 15px;height: 15px;
     
    7280    font-size: 10px;
    7381}
    74 #gm_slider>div>p>a:hover{
     82a.close_editor:hover{
    7583    border-radius: 5px;
    7684}
     
    8593}
    8694#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;
    94102}
    95103#gm_hotbar>div>*{
     
    103111    text-align: center;
    104112    font-size: 55px;
    105     font-weight: bold;
     113    font-weight: bold;
    106114}
    107115#gm_hotbar>div>span{
     
    114122}
    115123#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;
    120128}
    121129/*----------------------------------filedit_2-------------------------------------*/
    122130#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;
    131139}
    132140#filedit_2 #file:hover{
     
    139147    height: 20px;width: 20px;
    140148    border-radius: 0 0 0 100px;
    141     transition:0.3s;
     149    transition:0.3s;
    142150}
    143151#filedit_2 #file:hover>span{
     
    184192}
    185193ul.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;
    194202}
    195203#file>div>ul.scandir_ul, #file>div>ul.scandir_ul>div>ul.scandir_ul{display: block;}
    196204.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%;
    202210}
    203211li.scandir_span{
    204     list-style: url(icon/folder.png);
     212    list-style: url(icon/folder.png);
    205213}
    206214ul.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;
    212220}
    213221ul.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;
    218226}
    219227
     
    266274    border: rgb(221, 22, 22) 2px solid;
    267275}
     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}
    268309#select_theme{
    269     position: absolute;
    270     right: 10px;
    271310    display: inline;
     311}
     312.gm_p{
    272313    font-weight: bold;
    273314    font-size: 18px;
     315    padding-bottom: 5px;
     316    margin: 0;
    274317}
    275318#select_theme>select{
     
    277320    margin-left: 10px;
    278321}
     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  
    99    THEME_EDITOR = jQuery("#filedit").data("theme");
    1010
    11     jQuery("#select_theme>select").on('change', function(){
     11    jQuery("#gm_actions #select_theme>select").on('change', function(){
    1212        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());
    1514        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());
    1626    });
    1727
     
    2030        jQuery("#filedit #gm_hotbar .full_mode").on('click',function(){
    2131            jQuery("#filedit").prop("id","filedit_2");
     32            changePar("resize");
    2233        });
    2334        jQuery("#filedit_2 #gm_hotbar .full_mode").on('click',function(){
    2435            jQuery("#filedit_2").prop("id","filedit");
     36            changePar("resize");
    2537        });
    2638       
     
    6678    });
    6779    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();
    7281    });
    7382    jQuery(".code-insert").on("click",function(){
     
    8089});
    8190function 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(){
    8493        var id = jQuery(this).prop("id")-1+2,e = jQuery(this);
    8594        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");
    8796            e.css("background", submenuColor).attr("clicking","true");
    8897            jQuery("#gm_editors>div#text_file_"+id).fadeIn(100);
    8998        });
    9099    });
    91     jQuery("#gm_slider>div>p>a").on('click',function(){
     100    jQuery("a.close_editor").on('click',function(){
    92101        if(jQuery("#gm_slider>div>p").length==1)return true;
    93102        var id = jQuery(this).parent("p").prop("id")-1+1,e = jQuery(this);
     
    98107                jQuery("#gm_editors>div:eq(0)").fadeIn(100);
    99108                jQuery("#gm_slider>div>p:eq(0)").attr("clicking","true");
     109                getFileOfTab();
    100110            });
    101111        }else{
    102112            e.parent("p").remove();
    103113            jQuery("#gm_editors>div#text_file_"+(id+1)).remove();
     114            getFileOfTab();
    104115        }
    105116    });
     
    114125    file[editors.length]="index.php";
    115126    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>");
    117128    jQuery("#gm_editors").append("<div id='text_file_"+(editors.length-1+2)+"'></div>");
    118129    var editor_r = ace.edit("text_file_"+(editors.length-1+2));
     
    121132    editor_r.setShowPrintMargin(false);
    122133    editor_r.getSession().setUseWrapMode(true);
     134    editor_r.getSession().setUseSoftTabs(false);
    123135    editor_r.commands.addCommand({
    124136        name:'save', // название команды
     
    127139            e = getID();
    128140            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();
    129148        }
    130149    });
     
    144163        readOnly: true
    145164    });
     165    editor_r.getSession().selection.on('changeCursor', function(e){
     166        jQuery("#gm_actions input[name='linePos']").val(editors[getID()].getCursorPosition().row + 1);
     167    });
    146168    readFromFile(dir[editors.length]+file[editors.length],editor_r);
    147169    getFileOfTab();
    148170    return editor_r;
     171}
     172function fnShowProps(obj, objName){
     173    var result = "";
     174    for (var i in obj) // обращение к свойствам объекта по индексу
     175        result += objName + "." + i + " = " + obj[i] + "<br />\n";
     176    document.write(result);
    149177}
    150178function getDirBack(){
     
    207235    });
    208236}
     237function 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}
     257function 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  
    11<div id="filedit" data-theme="<?php print($this->THEME);?>">
    22    <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>
    77        <div id="gm_hotbar">
    88            <div title="Добавить окно" class="new_window_editor"><p>+</p></div>
     
    1515        <div id="gm_editors"></div>
    1616    </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>
    3751    </div>
    3852</div>
  • gmace/trunk/readme.txt

    r1053922 r1053987  
    3030= 1.0 =
    3131* 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.