Plugin Directory

Changeset 1186666


Ignore:
Timestamp:
06/24/2015 07:09:43 AM (11 years ago)
Author:
mojwp
Message:

update

Location:
scode-by-mojwp/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • scode-by-mojwp/trunk/assets/css/admin-style.css

    r1180078 r1186666  
    3131    display: none;
    3232    float: left;
    33     position: fixed;
    34     top: 50%; left: 50%;
     33    position: absolute;
    3534    z-index: 99999;
    3635    -webkit-box-shadow: 0px 0px 20px #000;
     
    4342
    4443.modal-content {
    45     width: 400px;
     44    width: 540px;
    4645    overflow: hidden;
    4746}
  • scode-by-mojwp/trunk/assets/js/jquery.scode.js

    r1180078 r1186666  
    1414       
    1515        $('#fade').css("opacity", 0.8).data('currentModal', id).fadeIn();
    16        
    17         var topMargin = (modal.height() + 200) / 2;
    18         var leftMargin = (modal.width() + 10) / 2;
    19 
    20         modal.fadeIn().css({
    21             'margin-top' : -topMargin,
    22             'margin-left' : -leftMargin
     16
     17        modal.fadeIn().position({
     18            my: "center",
     19            at: "center",
     20            of: window,
     21            collision : "flipfit"
    2322        });
    2423    }
     
    157156                progressContainer.addClass('hidden');
    158157                if (data.error) pResult.addClass('error').text(data.error); else pResult.addClass('error').text('Unknown error, please contact the plugin developers...');
    159             }
     158            }
     159           
     160            $(modalID).position({
     161                my: "center",
     162                at: "center",
     163                of: window,
     164                collision : "flipfit"
     165            });
    160166        }, 'json');
    161167       
  • scode-by-mojwp/trunk/includes/admin.php

    r1180078 r1186666  
    1111        wp_enqueue_style('scode_font_awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), false);
    1212        wp_enqueue_style('scode_backend_style', SCODE_PLUGIN_URL.'assets/css/admin-style.css', array(), false);
     13        wp_enqueue_script('jquery-ui-position');
    1314        wp_enqueue_script('scode_backend_js', SCODE_PLUGIN_URL.'assets/js/jquery.scode.js', array('jquery'), false, true);
     15       
    1416    }
    1517}
     
    2123    add_submenu_page('scode', 'sCode — '.__('Instruction', 'scode'), __('Instruction', 'scode'), 'manage_options', 'scode_support', 'scode_support_html');
    2224}
     25
     26add_filter('wp_default_editor', create_function('', 'return "html";'));
    2327
    2428function scode_support_html() {
     
    161165                    <div class="form-group">
    162166                        <label for="newShortcodeValue"><?php _e('Value', 'scode'); ?>:</label>
    163                         <textarea class="form-control" id="newShortcodeValue" name="value" rows="3" autocomplete="off"></textarea>
     167                        <?php
     168                            $args = array(
     169                                'wpautop' => 0,
     170                                'media_buttons' => 1,
     171                                'textarea_name' => 'value',
     172                                'textarea_rows' => 10,
     173                                'teeny'         => 1,
     174                                'tinymce'       => 1,
     175                                'quicktags'     => array(
     176                                                    'id' => 'newShortcodeValue',
     177                                                    'buttons' => 'strong,em,link,img,ul,ol,li'
     178                                                    ),
     179                            );
     180                            wp_editor( '', 'newShortcodeValue', $args ); ?>
    164181                    </div>
    165182                    <?php if (!empty($groups)) { ?>
     
    213230                        <div class="form-group">
    214231                            <label for="editableShortcodeValue"><?php _e('Value', 'scode'); ?>:</label>
    215                             <textarea class="form-control" id="editableShortcodeValue" name="value" rows="3" autocomplete="off"></textarea>
     232                            <?php
     233                            $args = array(
     234                                'wpautop' => 0,
     235                                'media_buttons' => 1,
     236                                'textarea_name' => 'value',
     237                                'textarea_rows' => 10,
     238                                'teeny'         => 1,
     239                                'tinymce'       => 1,
     240                                'quicktags'     => array(
     241                                                    'id' => 'editableShortcodeValue',
     242                                                    'buttons' => 'strong,em,link,img,ul,ol,li'
     243                                                    ),
     244                            );
     245                            wp_editor( '', 'editableShortcodeValue', $args ); ?>
    216246                        </div>
    217247                        <div class="form-row">
  • scode-by-mojwp/trunk/includes/ajax.php

    r1180078 r1186666  
    99function scode_ajax_add_shortcode() {
    1010    $nonce = $_POST['scode_new_nonce'];
    11 // scode_new_nonce
     11
    1212    if (!wp_verify_nonce($nonce, 'addNewShortcode')) wp_die(json_encode(array('error' => __('Nonce verify fail...', 'scode'))));
    1313    if (!current_user_can('manage_options')) wp_die(json_encode(array('error' => __('No rights...', 'scode'))));
  • scode-by-mojwp/trunk/includes/frontend.php

    r1180078 r1186666  
    66}
    77
    8 remove_filter( 'the_content', 'wpautop' );
    9 add_filter( 'the_content', 'wpautop' , 12);
     8remove_filter('the_content', 'shortcode_unautop');
     9remove_filter('the_excerpt', 'shortcode_unautop');
    1010
    1111$sc_shortcodes_array = array();
  • scode-by-mojwp/trunk/readme.txt

    r1180106 r1186666  
    7373== Changelog ==
    7474
     75= 1.1 =
     76* Add Formatting toolbar
     77* Bug fixes
     78
    7579= 1.0 =
    7680Release
  • scode-by-mojwp/trunk/scode.php

    r1180124 r1186666  
    55    Description: Easy way to creat and manage shortcode from Admin panel site. Создавайте и управляйте шорткодами прямо из админки сайта.
    66    Author: mojWP
    7     Version: 1.0
     7    Version: 1.1
    88    Author URI: http://mojwp.ru/
    99    Text Domain: scode
     
    1717}
    1818
    19 define('SCODE_VERSION', '1.0');
     19define('SCODE_VERSION', '1.1');
    2020define('SCODE_PLUGIN_DIR', plugin_dir_path(__FILE__));
    2121define('SCODE_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.