Plugin Directory

Changeset 1497363


Ignore:
Timestamp:
09/17/2016 06:34:30 AM (10 years ago)
Author:
harry005
Message:

New Release

Location:
ajax-awesome-css/trunk
Files:
20 added
4 edited

Legend:

Unmodified
Added
Removed
  • ajax-awesome-css/trunk/ajax-awesome-css.php

    r1497357 r1497363  
    44 * Plugin URI: https://github.com/harry005/ajax-awesome-css
    55 * Description: Add custom CSS/JSS to your website without modifying the CSS/JS files of the theme or plugin with the help of ajax functionality.
    6  * Version: 1.0
     6 * Version: 1.0.1
    77 * Author: Harpreet Singh
    88 * Author URI: https://github.com/harry005/
     
    5454            $table_name,
    5555                array(
    56                     'awesomecss' => 'Enter CSS Here !!!!!!!!!',
    57                     'awesomejs' => 'Enter JS Here !!!!!!!!!!',
     56                    'awesomecss' => '',
     57                    'awesomejs' => '',
    5858                    'id' => 1
    5959                )
  • ajax-awesome-css/trunk/includes/admin/admin-main.php

    r1497357 r1497363  
    3131
    3232    public function myCustomScripts(){
    33             wp_localize_script( 'awesome', 'awesome_ajax', array('ajax_url' => admin_url( 'admin-ajax.php' ) ));
    34             wp_enqueue_script( 'my_awesome_script',plugin_dir_url(__FILE__).'js/awesome.js');
    35             wp_enqueue_script( 'awesome_codemirror',plugin_dir_url(__FILE__).'codemirror/lib/codemirror.js');
    36             wp_enqueue_script( 'awesome_codemirrorcssjs',plugin_dir_url(__FILE__).'codemirror/mode/css/css.js');
    37             wp_enqueue_script( 'codemirrocsshintjs',plugin_dir_url(__FILE__).'codemirror/addon/hint/css-hint.js');
    38             wp_enqueue_script( 'codemirroshowhintjs',plugin_dir_url(__FILE__).'codemirror/addon/hint/show-hint.js');
    39             wp_register_style( 'admincss',plugin_dir_url(__FILE__).'css/styles.css');
    40             wp_enqueue_style( 'admincss' );
    41             wp_register_style( 'awesome_codemirrorcss',plugin_dir_url(__FILE__).'codemirror/lib/codemirror.css' );
    42             wp_enqueue_style( 'awesome_codemirrorcss' );
    43             wp_register_style( 'codemirroshowhintcss',plugin_dir_url(__FILE__).'codemirror/addon/hint/show-hint.css' );
    44             wp_enqueue_style( 'codemirroshowhintcss' );
     33        wp_localize_script( 'awesome', 'awesome_ajax', array('ajax_url' => admin_url( 'admin-ajax.php' ) ));
     34        wp_enqueue_script( 'my_awesome_script',plugin_dir_url(__FILE__).'js/awesome.js');
     35        wp_enqueue_script( 'awesome_codemirror',plugin_dir_url(__FILE__).'codemirror/lib/codemirror.js');
     36        wp_enqueue_script( 'awesome_codemirrorcssjs',plugin_dir_url(__FILE__).'codemirror/mode/css/css.js');
     37        wp_enqueue_script( 'codemirrocsshintjs',plugin_dir_url(__FILE__).'codemirror/addon/hint/css-hint.js');
     38        wp_enqueue_script( 'codemirroshowhintjs',plugin_dir_url(__FILE__).'codemirror/addon/hint/show-hint.js');
     39        wp_enqueue_script( 'closebrackets',plugin_dir_url(__FILE__).'codemirror/addon/edit/closebrackets.js');
     40        wp_enqueue_script( 'awesome_javascript', plugin_dir_url(__FILE__).'codemirror/mode/javascript/javascript.js');
     41        wp_enqueue_script( 'hsaacjshints', plugin_dir_url(__FILE__).'codemirror/addon/hint/javascript-hint.js');
     42        wp_enqueue_script( 'hsaaclintjs', plugin_dir_url(__FILE__).'codemirror/addon/lint/lint.js');
     43        wp_enqueue_script( 'hsaacmatchbrackets',plugin_dir_url(__FILE__).'codemirror/addon/edit/matchbrackets.js');
     44        wp_enqueue_script( 'hsaacjavascriptlint', plugin_dir_url(__FILE__).'codemirror/addon/lint/javascript-lint.js');
     45        wp_enqueue_script( 'hsaacplaceholder', plugin_dir_url(__FILE__).'codemirror/addon/display/placeholder.js');
     46        wp_enqueue_script( 'hsaacjshint', "//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js");
     47        wp_enqueue_script( 'hsaacjsonlintjs', "https://rawgithub.com/zaach/jsonlint/79b553fb65c192add9066da64043458981b3972b/lib/jsonlint.js");
     48        wp_register_style( 'admincss',plugin_dir_url(__FILE__).'css/styles.css');
     49        wp_enqueue_style( 'admincss' );
     50        wp_register_style( 'awesome_codemirrorcss',plugin_dir_url(__FILE__).'codemirror/lib/codemirror.css' );
     51        wp_enqueue_style( 'awesome_codemirrorcss' );
     52        wp_register_style( 'codemirroshowhintcss',plugin_dir_url(__FILE__).'codemirror/addon/hint/show-hint.css' );
     53        wp_enqueue_style( 'codemirroshowhintcss' );
     54        wp_register_style( 'lintcss', plugin_dir_url(__FILE__).'codemirror/addon/lint/lint.css');
     55        wp_enqueue_style( 'lintcss' ); 
    4556   
    4657    }
     
    138149        ?><div class="wrap">
    139150            <h1>Add Awesome Ajax Css</h1>
    140                     <textarea cols="100" rows="30" id="awesome-css-area" style='visibility:hidden' ><?php if($storecss) echo $storecss; else echo 'Enter Custom CSS Here !!!!!';?></textarea>
     151                    <textarea cols="100" rows="30" id="awesome-css-area" placeholder='Enter Your Custom CSS . . . .' style='visibility:hidden' ><?php if($storecss) echo $storecss;?></textarea>
    141152                    <div id='hssavefile'>Add CSS</div>
    142153        </div> <!-- wrap ends here-->
     
    146157                        lineWrapping: true,
    147158                        mode: "css",
    148                         extraKeys: {"Ctrl-Space": "autocomplete"}
     159                        autoCloseBrackets: true,
     160                        matchBrackets : true
     161                    //  extraKeys: {"Ctrl-Space": "autocomplete"}
    149162                      });
     163             editor2.on("keyup", function(cm, event) {
     164                     var keyCode = event.keyCode;
     165                     //alert(keyCode);
     166                    if(keyCode >= 65 && keyCode <=95){
     167                        //if(timeout) clearTimeout(timeout);       
     168                        timeout = setTimeout(function() {
     169                            CodeMirror.showHint(cm, CodeMirror.hint.css, {completeSingle: false});
     170                        }, 10);       
     171                    }
     172                });
    150173        </script>
    151174        <?php
     
    159182        ?><div class="wrap" id='wrapjs'>
    160183            <h1>Add Awesome Custom JS</h1>
    161                     <textarea cols="100" rows="30" id="awesome-js-area" style='visibility:hidden'><?php if($storejs) echo $storejs ;else echo 'Enter Custom JS Here !!!!!';?></textarea>
     184                    <textarea cols="100" rows="30" id="awesome-js-area" placeholder='Enter Your Custom JS . . . .' style='visibility:hidden'><?php if($storejs) echo $storejs ;?></textarea>
    162185                    <div id='hssavejs'>Add JS</div>
    163186        </div> <!-- wrap ends here-->
     
    166189               lineNumbers: true,
    167190               lineWrapping: true,
     191               autoCloseBrackets: true,
     192               matchBrackets : true,
     193               mode: "javascript",
     194               gutters: ["CodeMirror-lint-markers"],
     195               lint: true
    168196              });
     197           
     198            editorjs.on("keyup", function(cm, event) {
     199                     var keyCode = event.keyCode;
     200                     //alert(keyCode);
     201                    if(keyCode >= 65 && keyCode <=95){
     202                        //if(timeout) clearTimeout(timeout);       
     203                        timeout = setTimeout(function() {
     204                            CodeMirror.showHint(cm, CodeMirror.hint.javascript, {completeSingle: false});
     205                        }, 10);       
     206                    }
     207                });
    169208        </script>
    170209        <?php
  • ajax-awesome-css/trunk/includes/admin/codemirror/lib/codemirror.css

    r1497357 r1497363  
    140140/* Default styles for common addons */
    141141
    142 div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
     142div.CodeMirror span.CodeMirror-matchingbracket {color: red;font-weight: bold;font-size: 15px;}
    143143div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
    144144.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
  • ajax-awesome-css/trunk/readme.txt

    r1497357 r1497363  
    66Requires at least: 4.0
    77Tested up to: 4.6.1
    8 Stable tag: 1.0
    9 
     8Stable tag: 1.1
    109
    1110Add custom CSS/JSS to your website without modifying the CSS/JS files of the theme or plugin with the help of ajax functionality.
     
    3231- Wrong Syntax highlighter
    3332
     33== Frequently Asked Questions ==
     34= I cannot see my changes
     35There may be many reasons for it:
     36
     37* You are using the cache plugin. Please try to delete the cache and reload the page.
     38* You the missing the class tag or Id tag. Please recheck it.
     39* You may be using the wrong property of css. Please try pressing 'ctrl + space', it will pop up the all available related properties of css.
     40
     41= After installing the plugin, does it affect my site ?
     42Not really , but you should always take a back up of your site before installing any type of plugin. Just in case anything goes wrong, you will have your backup of your site. We will not be responsible for anything that goes wrong.
     43
     44= Do you provide support?
     45Yes, We do. Please try to leave bugs or issues in the support section.
     46
     47
    3448== Screenshots ==
     49
    35501. Description of Ajax Awesome CSS plugin
    36512. Shows the autocomplete feature in CSS by pressing 'ctrl+space'
     
    3853
    3954== Changelog ==
     55
     56
     57= 1.1 =
     58* Added the syntax error highlighter in JS when there is something undefined
     59* Added the auto close brackets for css and js
     60* Added the matching tag feature
     61* Added Autocomplete feature in both CSS/JSS. Now you dont need to press ctrl+space to activate autocomplete feature.
     62* Lint Feature is Added
     63* More features Coming Soon !!!!!!
     64
    4065= 1.0 =
    4166* Initial release.
     67
     68== Upgrade Notice ==
     69= 1.0 =
Note: See TracChangeset for help on using the changeset viewer.