Exemplo n.º 1
0
function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
    ?>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#dialog-widget-delete").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php 
    echo osc_esc_js(__('Delete widget'));
    ?>
'
                });
            });
            
            // dialog delete function
            function delete_dialog(widget_id) {
                $("#dialog-widget-delete input[name='id']").attr('value', widget_id);
                $("#dialog-widget-delete").dialog('open');
                return false;
            }
            
        </script>
        <?php 
}
Exemplo n.º 2
0
function customHead()
{
    ?>
    <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.treeview.js');
    ?>
"></script>
    <script type="text/javascript">
        // check all the categories
        function checkAll(id, check) {
            aa = $('#' + id + ' input[type=checkbox]').each(function() {
                $(this).attr('checked', check) ;
            }) ;
        }

        function checkCat(id, check) {
            aa = $('#cat' + id + ' input[type=checkbox]').each(function() {
                $(this).attr('checked', check) ;
            }) ;
        }

        $(document).ready(function(){
            $("#plugin_tree").treeview({
                animated: "fast",
                collapsed: true
            });
        });
    </script>
    <?php 
}
Exemplo n.º 3
0
function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('tiny_mce/tiny_mce.js');
    ?>
"></script>
        <script type="text/javascript">
            tinyMCE.init({
                mode : "textareas",
                theme : "advanced",
                skin: "cirkuit",
                width: "100%",
                height: "340px",
                theme_advanced_buttons3 : "",
                theme_advanced_toolbar_align : "left",
                theme_advanced_toolbar_location : "top",
                plugins : "color",
                entity_encoding : "raw",
                theme_advanced_buttons1_add : "forecolorpicker,fontsizeselect",
                theme_advanced_disable : "styleselect,anchor,image"
            });
        </script>
        <?php 
}
Exemplo n.º 4
0
function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $("form[name=currency_form]").validate({
                    rules: {
                        pk_c_code: {
                            required: true,
                            minlength: 3,
                            maxlength: 3
                        },
                        s_name: {
                            required: true,
                            minlength: 1
                        }
                    },
                    messages: {
                        pk_c_code: {
                            required: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.',
                            maxlength: '<?php 
    echo osc_esc_js(__('Currency code: this field is required'));
    ?>
.'
                        },
                        s_name: {
                            required: '<?php 
    echo osc_esc_js(__('Name: this field is required'));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__('Name: this field is required'));
    ?>
.'
                        }
                    },
                    wrapper: "li",
                    errorLabelContainer: "#error_list",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    }
                });
            });
        </script>
        <?php 
}
Exemplo n.º 5
0
function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <?php 
}
Exemplo n.º 6
0
function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <?php 
    LanguageForm::js_validation();
    ?>
        <script type="text/javascript">
            $(document).ready(function(){
            });
        </script>
        <?php 
}
Exemplo n.º 7
0
function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
    ?>
<script type="text/javascript">
$(document).ready(function(){
    // Code for form validation

    $.validator.addMethod('customrule', function(value, element) {
        if($('input:radio[name=purge_searches]:checked').val()=='custom') {
            if($("#custom_queries").val()=='') {
                return false;
            }
        }
        return true;
    });

    $("form[name=searches_form]").validate({
        rules: {
            custom_queries: {
                digits: true,
                customrule: true
            }
        },
        messages: {
            custom_queries: {
                digits: '<?php 
    echo osc_esc_js(__('Custom number: this field must only contain numeric characters'));
    ?>
.',
                customrule: '<?php 
    echo osc_esc_js(__('Custom number: this field cannot be left empty'));
    ?>
.'
            }
        },
        wrapper: "li",
        errorLabelContainer: "#error_list",
        invalidHandler: function(form, validator) {
            $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
        }
    });
}) ;
</script>
        <?php 
}
Exemplo n.º 8
0
function customHead()
{
    $user = __get('user');
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <?php 
    if (isset($user['pk_i_id'])) {
        UserForm::js_validation_edit();
    } else {
        UserForm::js_validation();
    }
    ?>
        <?php 
    UserForm::location_javascript("admin");
    ?>

        <?php 
}
Exemplo n.º 9
0
function customHead()
{
    $info = __get("info");
    $widget = __get("widget");
    if (Params::getParam('action') == 'edit_widget') {
        $title = __('Edit widget');
        $edit = true;
        $button = osc_esc_html(__('Save changes'));
    } else {
        $title = __('Add widget');
        $edit = false;
        $button = osc_esc_html(__('Add widget'));
    }
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('tiny_mce/tiny_mce.js');
    ?>
"></script>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <script type="text/javascript">
            tinyMCE.init({
                mode : "textareas",
                theme : "advanced",
                skin: "cirkuit",
                width: "500px",
                height: "340px",
                theme_advanced_buttons3 : "",
                theme_advanced_toolbar_align : "left",
                theme_advanced_toolbar_location : "top",
                plugins : "media",
                entity_encoding : "raw",
                theme_advanced_buttons1_add : "media",
                theme_advanced_disable : "styleselect",
                extended_valid_elements : "script[type|src|charset|defer]"
            });
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $("form[name=widget_form]").validate({
                    rules: {
                        description: {
                            required: true
                        }
                    },
                    messages: {
                        description: {
                            required:  '<?php 
    echo osc_esc_js(__("Description: this field is required"));
    ?>
.'
                        }
                    },
                    errorLabelContainer: "#error_list",
                    wrapper: "li",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    }
                });
            });
        </script>
    <?php 
}
Exemplo n.º 10
0
" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="content-language" content="<?php 
echo osc_current_admin_locale();
?>
" />
        <script src="<?php 
echo osc_current_admin_theme_js_url('jquery.min.js');
?>
"></script>
        <script src="<?php 
echo osc_current_admin_theme_js_url('jquery-ui-1.8.20.min.js');
?>
"></script>
        <script src="<?php 
echo osc_current_admin_theme_js_url('ui-osc.js');
?>
"></script>
        <!-- styles
        ================================================== -->
        <link href="<?php 
echo osc_current_admin_theme_styles_url('jquery-ui/jquery-ui-1.8.20.custom.css');
?>
" rel="stylesheet">

        <link href="<?php 
echo osc_current_admin_theme_styles_url('main.css');
?>
" rel="stylesheet">
        <!-- favicons
        ================================================== -->
Exemplo n.º 11
0
function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <script type="text/javascript">
            document.write('<style type="text/css"> .tabber{ display:none; } </style>') ;
            $(document).ready(function(){
                $("#userId").bind('change', function() {
                    if($(this).val() == '') {
                        $("#contact_info").show() ;
                    } else {
                        $("#contact_info").hide() ;
                    }
                }) ;

                if( $("#userId").val() == '') {
                    $("#contact_info").show() ;
                } else {
                    $("#contact_info").hide() ;
                }

                <?php 
    if (osc_locale_thousands_sep() != '' || osc_locale_dec_point() != '') {
        ?>
                $("#price").blur(function(event) {
                    var price = $("#price").attr("value");
                    <?php 
        if (osc_locale_thousands_sep() != '') {
            ?>
                    while(price.indexOf('<?php 
            echo osc_esc_js(osc_locale_thousands_sep());
            ?>
')!=-1) {
                        price = price.replace('<?php 
            echo osc_esc_js(osc_locale_thousands_sep());
            ?>
', '');
                    }
                    <?php 
        }
        ?>
                    <?php 
        if (osc_locale_dec_point() != '') {
            ?>
                    var tmp = price.split('<?php 
            echo osc_esc_js(osc_locale_dec_point());
            ?>
');
                    if(tmp.length>2) {
                        price = tmp[0]+'<?php 
            echo osc_esc_js(osc_locale_dec_point());
            ?>
'+tmp[1];
                    }
                    <?php 
        }
        ?>
                    $("#price").attr("value", price);
                });
                <?php 
    }
    ?>
            });
        </script>
        <?php 
    ItemForm::location_javascript_new('admin');
    ?>
        <?php 
    if (osc_images_enabled_at_items()) {
        ItemForm::photos_javascript();
    }
    ?>
        <?php 
}
Exemplo n.º 12
0
function customHead()
{
    ?>
       <script type="text/javascript">
            $(document).ready(function(){
                // dialog delete
                $("#dialog-location-delete").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php 
    echo osc_esc_js(__('Delete location'));
    ?>
'
                });
            });

            var base_url           = '<?php 
    echo osc_admin_base_url();
    ?>
';
            var s_close            = '<?php 
    echo osc_esc_js(_e('Close'));
    ?>
';
            var s_view_more        = '<?php 
    echo osc_esc_js(_e('View more'));
    ?>
';
            var addText            = '<?php 
    echo osc_esc_js(_e('Add'));
    ?>
';
            var cancelText         = '<?php 
    echo osc_esc_js(_e('Cancel'));
    ?>
';
            var editText           = '<?php 
    echo osc_esc_js(_e('Edit'));
    ?>
';
            var editNewCountryText = '<?php 
    echo osc_esc_js(__('Edit country'));
    ?>
';
            var addNewCountryText  = '<?php 
    echo osc_esc_js(__('Add new country'));
    ?>
';
            var editNewRegionText  = '<?php 
    echo osc_esc_js(__('Edit region'));
    ?>
';
            var addNewRegionText   = '<?php 
    echo osc_esc_js(__('Add new region'));
    ?>
';
            var editNewCityText    = '<?php 
    echo osc_esc_js(__('Edit city'));
    ?>
';
            var addNewCityText     = '<?php 
    echo osc_esc_js(__('Add new city'));
    ?>
';

            // dialog delete function
            function delete_dialog(item_id, item_type) {
                $("#dialog-location-delete input[name='type']").attr('value', item_type);
                $("#dialog-location-delete input[name='id']").attr('value', item_id);
                $("#dialog-location-delete").dialog('open');
                return false;
            }
        </script>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('location.js');
    ?>
"></script>
        <?php 
}
Exemplo n.º 13
0
_e('Hide filters');
?>
') ;
                        $(this).attr('data-showed', 'true') ;
                    }
                    $('.items-filters').toggle() ;
                }) ;
            }) ;
        </script>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('datatables.post_init.js');
?>
"></script>
        <!-- /datatables js -->
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('jquery.validate.min.js');
?>
"></script>
        <?php 
ItemForm::location_javascript_new('admin');
?>
        <script type="text/javascript">
            // autocomplete users
            $(document).ready(function(){
                $('#user').attr( "autocomplete", "off" );
                $('#user').live('keyup.autocomplete', function(){
                    $('#userId').val('');
                    $( this ).autocomplete({
                        source: "<?php 
echo osc_admin_base_url(true);
?>
Exemplo n.º 14
0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
define('ABS_PATH', str_replace('\\', '/', dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . '/'));
define('OC_ADMIN', true);
require_once ABS_PATH . 'oc-load.php';
if (file_exists(ABS_PATH . '.maintenance')) {
    define('__OSC_MAINTENANCE__', true);
}
// register admin scripts
osc_register_script('admin-osc', osc_current_admin_theme_js_url('osc.js'), 'jquery');
osc_register_script('admin-ui-osc', osc_current_admin_theme_js_url('ui-osc.js'), 'jquery');
osc_register_script('admin-location', osc_current_admin_theme_js_url('location.js'), 'jquery');
// enqueue scripts
osc_enqueue_script('jquery');
osc_enqueue_script('jquery-ui');
osc_enqueue_script('admin-osc');
osc_enqueue_script('admin-ui-osc');
osc_add_hook('admin_footer', array('FieldForm', 'i18n_datePicker'));
// enqueue css styles
osc_enqueue_style('jquery-ui', osc_assets_url('css/jquery-ui/jquery-ui.css'));
osc_enqueue_style('admin-css', osc_current_admin_theme_styles_url('main.css'));
switch (Params::getParam('page')) {
    case 'items':
        require_once osc_admin_base_path() . 'items.php';
        $do = new CAdminItems();
        $do->doModel();
        break;
Exemplo n.º 15
0
?>
"></script>
<script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('tabber-minimized.js');
?>
"></script>
<script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('tiny_mce/tiny_mce.js');
?>
"></script>
<script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('jquery.validate.min.js');
?>
"></script>
<script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('jquery.dataTables.min.js');
?>
"></script>

<script type="text/javascript">
    $(function() {
        $("#menu").accordion({
            active: false,
            collapsible: true,
            navigation: true,
            autoHeight: false,
            icons: { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' }
        });

        if (jQuery.browser.msie && jQuery.browser.version.substr(0,1)<7) {
            jQuery('#accordion *').css('zoom', '1');
Exemplo n.º 16
0
?>
';
            var editNewCityText = '<?php 
echo osc_esc_js(__('Edit city'));
?>
';
            var addNewCityText = '<?php 
echo osc_esc_js(__('Add new city'));
?>
';
        </script>
        <?php 
osc_current_admin_theme_path('head.php');
?>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('location.js');
?>
"></script>
    </head>
    <body>
        <?php 
osc_current_admin_theme_path('header.php');
?>
        <!-- container -->
        <div id="content">
            <?php 
osc_current_admin_theme_path('include/backoffice_menu.php');
?>
            <!-- right container -->
            <div class="right">
Exemplo n.º 17
0
?>
">
    <head>
        <?php 
osc_current_admin_theme_path('head.php');
?>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('jquery.validate.min.js');
?>
"></script>
        <link rel="stylesheet" media="screen" type="text/css" href="<?php 
echo osc_current_admin_theme_js_url('colorpicker/css/colorpicker.css');
?>
" />
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('colorpicker/js/colorpicker.js');
?>
"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $.validator.addMethod('regexp', function(value, element, param) {
                    return this.optional(element) || value.match(param);
                },
                '<?php 
echo osc_esc_js(__('Size is not in the correct format'));
?>
');
                
                $("form[name=media_form]").validate({
                    rules: {
Exemplo n.º 18
0
function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
    ?>
<script type="text/javascript">
$(document).ready(function(){
    // Code for form validation
    $("form[name=comments_form]").validate({
        rules: {
            num_moderate_comments: {
                required: true,
                digits: true
            },
            comments_per_page: {
                required: true,
                digits: true
            }
        },
        messages: {
            num_moderate_comments: {
                required: '<?php 
    echo osc_esc_js(__("Moderated comments: this field is required"));
    ?>
.',
                digits: '<?php 
    echo osc_esc_js(__("Moderated comments: this field must only contain numeric characters"));
    ?>
.'
            },
            comments_per_page: {
                required: '<?php 
    echo osc_esc_js(__("Comments per page: this field is required"));
    ?>
.',
                digits: '<?php 
    echo osc_esc_js(__("Comments per page: this field must only contain numeric characters"));
    ?>
.'
            }
        },
        wrapper: "li",
        errorLabelContainer: "#error_list",
        invalidHandler: function(form, validator) {
            $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
        }
    });

    if( !$('input[name="moderate_comments"]').is(':checked') ) {
        $('.comments_approved').css('display', 'none') ;
    }

    $('input[name="moderate_comments"]').bind('change', function() {
        if( $(this).is(':checked') ) {
            $('.comments_approved').css('display', '') ;
        } else {
            $('.comments_approved').css('display', 'none') ;
        }
    }) ;
}) ;
</script>
        <?php 
}
Exemplo n.º 19
0
function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
}
Exemplo n.º 20
0
                        },
                        {
                            "sTitle": "<?php 
echo osc_esc_html(__('E-mail'));
?>
"
                        }
                    ]
                });

                $('.length-menu').append( $("#bulk_actions") ) ;
                $('.filter').append( $("#add_admin_button") ) ;
            });
        </script>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('datatables.post_init.js');
?>
"></script>
    </head>
    <body>
        <?php 
osc_current_admin_theme_path('header.php');
?>
        <!-- container -->
        <div id="content">
            <?php 
osc_current_admin_theme_path('include/backoffice_menu.php');
?>
            <!-- right container -->
		    <div class="right">
                <div class="header_title">
Exemplo n.º 21
0
function customHead()
{
    ?>
<script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.treeview.js');
    ?>
"></script>
<script type="text/javascript">
    function show_iframe(class_name, id) {
        if($('.content_list_'+id+' .custom-field-frame').length == 0){
            $('.custom-field-frame').remove();
            var name = 'frame_'+ id ; 
            var id_  = 'frame_'+ id ;
            var url  = '<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=field_categories_iframe&id=' + id ;
            $.ajax({
                url: url,
                context: document.body,
                success: function(res){
                    $('div.'+class_name).html(res) ;
                    $('div.'+class_name).fadeIn("fast") ;
                }
            }) ;
        } else {
            $('.custom-field-frame').remove();
        }
        return false ;
    }

    function delete_field(id) {
        $("#dialog-delete-field").attr('data-field-id', id);
        $("#dialog-delete-field").dialog('open');
        return false ;
    }

    // check all the categories
    function checkAll(id, check) {
        aa = $('#' + id + ' input[type=checkbox]').each(function() {
            $(this).attr('checked', check) ;
        }) ;
    }

    $(document).ready(function() {
        $('.cfield-div').live('mouseenter',function(){
            $(this).addClass('cfield-hover');
        }).live('mouseleave',function(){
            $(this).removeClass('cfield-hover');
        });

        // dialog delete
        $("#dialog-delete-field").dialog({
            autoOpen: false,
            modal: true
        });
        $("#field-delete-submit").click(function() {
            var id  = $("#dialog-delete-field").attr('data-field-id');
            var url = '<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=delete_field&id=' + id;
            $.ajax({
                url: url,
                context: document.body,
                success: function(res){
                    var ret = eval( "(" + res + ")");
                    var message = "";
                    if(ret.error) { 
                        message += ret.error; 
                    }
                    if(ret.ok){
                        message += ret.ok;
                        
                        $('#list_'+id).fadeOut("slow");
                        $('#list_'+id).remove();
                    }
                    
                    $(".jsMessage").css('display', 'block') ;
                    $(".jsMessage p").html(message) ;
                },
                error: function(){
                    $(".jsMessage").css('display', 'block') ;
                    $(".jsMessage p").html('<?php 
    echo osc_esc_js(__("Ajax error, try again."));
    ?>
') ;
                }
            });
            $('#dialog-delete-field').dialog('close');
            return false;
        });

        $("#add-button, .add-button").bind('click', function() {
            $.ajax({
                url: '<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=add_field',
                context: document.body,
                success: function(res){
                    var ret = eval( "(" + res + ")");
                    if(ret.error==0) {
                        var html = '';
                        html += '<li id="list_'+ret.field_id+'" class="field_li even">';
                            html += '<div class="cfield-div" field_id="'+ret.field_id+'" >';
                                html += '<div class="name-edit-cfield" id="quick_edit_'+ret.field_id+'">';
                                    html += ret.field_name;
                                html += '</div>';
                                html += '<div class="actions-edit-cfield">';
                                    html += '<a href="javascript:void(0);"  onclick="show_iframe(\'content_list_'+ret.field_id+'\',\''+ret.field_id+'\');"><?php 
    echo osc_esc_js(__('Edit'));
    ?>
</a>';
                                    html += ' &middot; ';
                                    html += '<a href="javascript:void(0);"  onclick="delete_field(\''+ret.field_id+'\');"><?php 
    echo osc_esc_js(__('Delete'));
    ?>
</a>';
                                html += '</div>';
                                html += '<div class="edit content_list_'+ret.field_id+'"></div>';
                            html += '</div>';
                        html += '</li>';
                        $("#fields-empty").remove();
                        $("#ul_fields").append(html);
                        show_iframe('content_list_'+ret.field_id, ret.field_id);
                    } else {
                        var message = "";
                        message += '<?php 
    echo osc_esc_js(__('Custom field could not be added'));
    ?>
'
                        $(".jsMessage").fadeIn('fast') ;
                        $(".jsMessage p").html(message) ;
                    }
                }
            }) ;
            return false;
        }) ;

        $("#new_cat_tree").treeview({
            animated: "fast",
            collapsed: true
        }) ;

        $("select[name='field_type_new']").bind('change', function() {
            if( $(this).attr('value') == 'DROPDOWN' || $(this).attr('value') == 'RADIO' ) {
                $('#div_field_options').show() ;
            } else {
                $('#div_field_options').hide() ;
            }
        }) ;

        var field_type_new_value = $("select[name='field_type_new']").attr('value') ;
        if( field_type_new_value == 'TEXT' || field_type_new_value == 'TEXTAREA' || field_type_new_value == 'CHECKBOX' || field_type_new_value == 'URL') {
            $('#div_field_options').hide() ;
        }
    }) ;
</script>
    <?php 
}
Exemplo n.º 22
0
function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
    ?>
<script type="text/javascript">
    $(document).ready(function(){
        // Code for form validation
        $("form[name=settings_form]").validate({
            rules: {
                pageTitle: {
                    required: true,
                    minlength: 1
                },
                contactEmail: {
                    required: true,
                    email: true
                },
                num_rss_items: {
                    required: true,
                    digits: true
                },
                max_latest_items_at_home: {
                    required: true,
                    digits: true
                },
                default_results_per_page: {
                    required: true,
                    digits: true
                }
            },
            messages: {
                pageTitle: {
                    required: '<?php 
    echo osc_esc_js(__("Page title: this field is required"));
    ?>
.',
                    minlength: '<?php 
    echo osc_esc_js(__("Page title: this field is required"));
    ?>
.'
                },
                contactEmail: {
                    required: '<?php 
    echo osc_esc_js(__("Email: this field is required"));
    ?>
.',
                    email: '<?php 
    echo osc_esc_js(__("Invalid email address"));
    ?>
.'
                },
                num_rss_items: {
                    required: '<?php 
    echo osc_esc_js(__("Listings shown in RSS feed: this field is required"));
    ?>
.',
                    digits: '<?php 
    echo osc_esc_js(__("Listings shown in RSS feed: this field must only contain numeric characters"));
    ?>
.'
                },
                max_latest_items_at_home: {
                    required: '<?php 
    echo osc_esc_js(__("Latest listings shown: this field is required"));
    ?>
.',
                    digits: '<?php 
    echo osc_esc_js(__("Latest listings shown: this field must only contain numeric characters"));
    ?>
.'
                },
                default_results_per_page: {
                    required: '<?php 
    echo osc_esc_js(__("The search page shows: this field is required"));
    ?>
.',
                    digits: '<?php 
    echo osc_esc_js(__("The search page shows: this field must only contain numeric characters"));
    ?>
.'
                }
            },
            wrapper: "li",
            errorLabelContainer: "#error_list",
            invalidHandler: function(form, validator) {
                $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
            }
        });
    });

    function custom_date(date_format) {
        $.getJSON(
            "<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=date_format",
            {"format" : date_format},
            function(data){
                if(data.str_formatted!='') {
                    $("#custom_date").html(' <?php 
    _e('Preview');
    ?>
: ' + data.str_formatted)
                } else {
                    $("#custom_date").html('');
                }
            }
        );
    }

    function custom_time(time_format) {
        $.getJSON(
            "<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=date_format",
            {"format" : time_format},
            function(data){
                if(data.str_formatted!='') {
                    $("#custom_time").html(' <?php 
    _e('Preview');
    ?>
: ' + data.str_formatted)
                } else {
                    $("#custom_time").html('');
                }
            }
        );
    }
</script>
        <?php 
}
Exemplo n.º 23
0
 * License along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head>
        <?php 
osc_current_admin_theme_path('head.php');
?>
        <link rel="stylesheet" media="screen" type="text/css" href="<?php 
echo osc_current_admin_theme_js_url();
?>
colorpicker/css/colorpicker.css" />
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url();
?>
colorpicker/js/colorpicker.js"></script>
    </head>
    <body>
        <?php 
osc_current_admin_theme_path('header.php');
?>
        <div id="update_version" style="display:none;"></div>
        <div class="Header"><?php 
_e('Media settings');
?>
</div>
        <div id="content">
            <div id="separator"></div>
            <?php 
Exemplo n.º 24
0
$numCols = 1;
$catsPerCol = round(count($categories) / $numCols);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head>
        <?php 
osc_current_admin_theme_path('head.php');
?>
        <link href="<?php 
echo osc_current_admin_theme_styles_url('jquery.treeview.css');
?>
" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('jquery.treeview.js');
?>
"></script>
    </head>
    <body>
        <?php 
osc_current_admin_theme_path('header.php');
?>
        <div id="update_version" style="display:none;"></div>
        <script type="text/javascript">

            function checkAll (frm, check) {
                var aa = document.getElementById(frm);
                for (var i = 0 ; i < aa.elements.length ; i++) {
                    aa.elements[i].checked = check;
                }
Exemplo n.º 25
0
                theme_advanced_buttons1 : "bold,italic,underline,separator,undo,redo,separator,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,link,unlink,separator,image,code",
                theme_advanced_buttons2 : "",
                theme_advanced_buttons3 : "",
                theme_advanced_toolbar_align : "left",
                theme_advanced_toolbar_location : "top",
                plugins : "media",
                entity_encoding : "raw",
                theme_advanced_buttons1_add : "media"
            }) ;
        </script>
        <link href="<?php 
echo osc_current_admin_theme_styles_url('tabs.css');
?>
" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('tabber-minimized.js');
?>
"></script>
        <script type="text/javascript">
            document.write('<style type="text/css">.tabber{ display:none ; }</style>') ;
        </script>
    </head>
    <body>
        <?php 
osc_current_admin_theme_path('header.php');
?>
        <!-- container -->
        <div id="content">
            <?php 
osc_current_admin_theme_path('include/backoffice_menu.php');
?>
Exemplo n.º 26
0
function customHead()
{
    ?>
        <link rel="stylesheet" media="screen" type="text/css" href="<?php 
    echo osc_current_admin_theme_js_url('colorpicker/css/colorpicker.css');
    ?>
" />
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $.validator.addMethod('regexp', function(value, element, param) {
                    return this.optional(element) || value.match(param);
                }, '<?php 
    echo osc_esc_js(__('Size is not in the correct format'));
    ?>
');

                $("form[name=media_form]").validate({
                    rules: {
                        dimThumbnail: {
                            required: true,
                            regexp: /^[0-9]+x[0-9]+$/i
                        },
                        dimPreview: {
                            required: true,
                            regexp: /^[0-9]+x[0-9]+$/i
                        },
                        dimNormal: {
                            required: true,
                            regexp: /^[0-9]+x[0-9]+$/i
                        },
                        maxSizeKb: {
                            required: true,
                            digits: true
                        }
                    },
                    messages: {
                        dimThumbnail: {
                            required: '<?php 
    echo osc_esc_js(__("Thumbnail size: this field is required"));
    ?>
',
                            regexp: '<?php 
    echo osc_esc_js(__("Thumbnail size: is not in the correct format"));
    ?>
'
                        },
                        dimPreview: {
                            required: '<?php 
    echo osc_esc_js(__("Preview size: this field is required"));
    ?>
',
                            regexp: '<?php 
    echo osc_esc_js(__("Preview size: is not in the correct format"));
    ?>
'
                        },
                        dimNormal: {
                            required: '<?php 
    echo osc_esc_js(__("Normal size: this field is required"));
    ?>
',
                            regexp: '<?php 
    echo osc_esc_js(__("Normal size: is not in the correct format"));
    ?>
'
                        },
                        maxSizeKb: {
                            required: '<?php 
    echo osc_esc_js(__("Maximum size: this field is required"));
    ?>
',
                            digits: '<?php 
    echo osc_esc_js(__("Maximum size: this field must only contain numeric characters"));
    ?>
'
                        }
                    },
                    wrapper: "li",
                    errorLabelContainer: "#error_list",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    },
                    submitHandler: function(form){
                        $('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
                        form.submit();
                    }
                });

                $('#colorpickerField').ColorPicker({
                    onSubmit: function(hsb, hex, rgb, el) { },
                    onChange: function (hsb, hex, rgb) {
                        $('#colorpickerField').val(hex);
                    }
                });

                $('#watermark_none').bind('change', function() {
                    if( $(this).attr('checked') ) {
                        $('#watermark_text_box').hide();
                        $('#watermark_image_box').hide();
                        resetLayout();
                    }
                });

                // dialog bulk actions
                $("#dialog-watermark-warning").dialog({
                    autoOpen: false,
                    modal: true
                });

                $('#watermark_text').bind('change', function() {
                    if( $(this).attr('checked') ) {
                        $('#watermark_text_box').show();
                        $('#watermark_image_box').hide();
                        if( !$('input[name="keep_original_image"]').attr('checked') ) {
                            $("#dialog-watermark-warning").dialog('open');
                        }
                        resetLayout();
                    }
                });

                $('#watermark_image').bind('change', function() {
                    if( $(this).attr('checked') ) {
                        $('#watermark_text_box').hide();
                        $('#watermark_image_box').show();
                        if( !$('input[name="keep_original_image"]').attr('checked') ) {
                            $("#dialog-watermark-warning").dialog('open');
                        }
                        resetLayout();
                    }
                });

                $('input[name="keep_original_image"]').change(function() {
                    if( !$(this).attr('checked') ) {
                        if( !$('#watermark_none').attr('checked') ) {
                            $("#dialog-watermark-warning").dialog('open');
                        }
                        resetLayout();
                    }
                });
            });
        </script>
        <?php 
}
Exemplo n.º 27
0
<?php

// check requirements
if (!is_writable(ABS_PATH . 'oc-content/downloads/')) {
    osc_add_flash_error_message(sprintf(_m('<code>downloads</code> folder has to be writable, i.e.: <code>chmod a+w %soc-content/downloads/</code>'), ABS_PATH), 'admin');
}
// fancybox
osc_enqueue_script('fancybox');
osc_enqueue_style('fancybox', osc_assets_url('js/fancybox/jquery.fancybox.css'));
osc_register_script('market-js', osc_current_admin_theme_js_url('market.js'), array('jquery', 'jquery-ui'));
osc_enqueue_script('market-js');
osc_add_hook('admin_header', 'add_market_jsvariables');
function add_market_jsvariables()
{
    $marketPage = Params::getParam("mPage");
    $version_length = strlen(osc_version());
    $main_version = substr(osc_version(), 0, $version_length - 2) . "." . substr(osc_version(), $version_length - 2, 1);
    if ($marketPage >= 1) {
        $marketPage--;
    }
    $action = Params::getParam("action");
    $js_lang = array('by' => __('by'), 'ok' => __('Ok'), 'error_item' => __('There was a problem, try again later please'), 'wait_download' => __('Please wait until the download is completed'), 'downloading' => __('Downloading'), 'close' => __('Close'), 'download' => __('Download'), 'update' => __('Update'), 'last_update' => __('Last update'), 'downloads' => __('Downloads'), 'requieres_version' => __('Requires at least'), 'compatible_with' => __('Compatible up to'), 'screenshots' => __('Screenshots'), 'preview_theme' => __('Preview theme'), 'download_manually' => __('Download manually'), 'buy' => __('Buy'), 'proceed_anyway' => sprintf(__('Warning! This package is not compatible with your current version of Osclass (%s)'), $main_version), 'sure' => __('Are you sure?'), 'proceed_anyway_btn' => __('Ok, proceed anyway'), 'not_compatible' => sprintf(__('Warning! This theme is not compatible with your current version of Osclass (%s)'), $main_version), 'themes' => array('download_ok' => __('The theme has been downloaded correctly, proceed to activate or preview it.')), 'plugins' => array('download_ok' => __('The plugin has been downloaded correctly, proceed to install and configure.')), 'languages' => array('download_ok' => __('The language has been downloaded correctly, proceed to activate.')));
    ?>
        <script type="text/javascript">
            var theme = window.theme || {};
            theme.adminBaseUrl  = "<?php 
    echo osc_admin_base_url(true);
    ?>
";
            theme.marketAjaxUrl = "<?php 
    echo osc_admin_base_url(true);
Exemplo n.º 28
0
osc_current_admin_theme_path('head.php');
?>
        <link href="<?php 
echo osc_current_admin_theme_styles_url('datatables.css');
?>
" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('jquery.dataTables.js');
?>
"></script>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('datatables.pagination.js');
?>
"></script>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('datatables.extend.js');
?>
"></script>
        <script type="text/javascript">
            $(function() {
                oTable = $('#datatables_list').dataTable({
                    "sDom": "<'row'<'span6 length-menu'l><'span6 filter'>fr>t<'row'<'span6 info-results'i><'span6 paginate'p>>",
                    "sPaginationType": "bootstrap",
                    "bInfo": true,
                    "bFilter": false,
                    "bPaginate": true,
                    "bProcessing": false,
                    "bLengthChange": false,
                    "aaData": <?php 
echo json_encode($aData);
?>
Exemplo n.º 29
0
function customHead()
{
    ?>
        <script type="text/javascript" src="<?php 
    echo osc_current_admin_theme_js_url('jquery.validate.min.js');
    ?>
"></script>
        <?php 
    ItemForm::location_javascript_new('admin');
    ?>
        <script type="text/javascript">
            // autocomplete users
            $(document).ready(function(){
                $('#filter-select').change( function () {
                    var option = $(this).find('option:selected').attr('value') ;
                    // clean values
                    $('#fPattern,#fUser,#fItemId').attr('value', '');
                    if(option == 'oPattern') {
                        $('#fPattern').removeClass('hide');
                        $('#fUser, #fItemId').addClass('hide');
                    } else if(option == 'oUser'){
                        $('#fUser').removeClass('hide');
                        $('#fPattern, #fItemId').addClass('hide');
                    } else {   
                        $('#fItemId').removeClass('hide');
                        $('#fPattern, #fUser').addClass('hide');
                    }
                });

                $('input[name="user"]').attr( "autocomplete", "off" );
                $('#user,#fUser').autocomplete({
                    source: "<?php 
    echo osc_admin_base_url(true);
    ?>
?page=ajax&action=userajax"+$('input[name="user"]').val(), // &term=
                    minLength: 0,
                    select: function( event, ui ) {
                        if(ui.item.id=='') 
                            return false;
                        $('#userId').val(ui.item.id);
                        $('#fUserId').val(ui.item.id);
                    },
                    search: function() {
                        $('#userId').val('');
                        $('#fUserId').val('');
                    }
                });

                // dialog delete
                $("#dialog-item-delete").dialog({
                    autoOpen: false,
                    modal: true,
                    title: '<?php 
    echo osc_esc_js(__('Delete listing'));
    ?>
'
                });

                // dialog bulk actions
                $("#dialog-bulk-actions").dialog({
                    autoOpen: false,
                    modal: true
                });
                $("#bulk-actions-submit").click(function() {
                    $("#datatablesForm").submit();
                });
                $("#bulk-actions-cancel").click(function() {
                    $("#datatablesForm").attr('data-dialog-open', 'false');
                    $('#dialog-bulk-actions').dialog('close');
                });
                // dialog bulk actions function
                $("#datatablesForm").submit(function() {
                    if( $("#bulk_actions option:selected").val() == "" ) {
                        return false;
                    }

                    if( $("#datatablesForm").attr('data-dialog-open') == "true" ) {
                        return true;
                    }

                    $("#dialog-bulk-actions .form-row").html($("#bulk_actions option:selected").attr('data-dialog-content'));
                    $("#bulk-actions-submit").html($("#bulk_actions option:selected").text());
                    $("#datatablesForm").attr('data-dialog-open', 'true');
                    $("#dialog-bulk-actions").dialog('open');
                    return false;
                });

                // dialog filters
                $('#display-filters').dialog({
                    autoOpen: false,
                    modal: true,
                    width: 700,
                    title: '<?php 
    echo osc_esc_js(__('Filters'));
    ?>
'
                });
                $('#btn-display-filters').click(function(){
                    $('#display-filters').dialog('open');
                    return false;
                });
                
                // check_all bulkactions
                $("#check_all").change(function(){
                    var isChecked = $(this+':checked').length;
                    $('.col-bulkactions input').each( function() {
                        if( isChecked == 1 ) {
                            this.checked = true;
                        } else {
                            this.checked = false;
                        }
                    });
                });
            });

            // dialog delete function
            function delete_dialog(item_id) {
                $("#dialog-item-delete input[name='id[]']").attr('value', item_id);
                $("#dialog-item-delete").dialog('open');
                return false;
            }
        </script>
        <?php 
}
Exemplo n.º 30
0
function customHead()
{
    echo '<script type="text/javascript" src="' . osc_current_admin_theme_js_url('jquery.validate.min.js') . '"></script>';
    ?>
<script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $("form[name=permalinks_form]").validate({
                    rules: {
                        rewrite_item_url: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_page_url: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_cat_url: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_url: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_country: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_region: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_city: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_city_area: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_category: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_user: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_search_pattern: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_contact: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_feed: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_language: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_mark: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_send_friend: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_contact: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_activate: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_edit: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_delete: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_item_resource_delete: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_login: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_dashboard: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_logout: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_register: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_activate: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_activate_alert: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_profile: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_items: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_alerts: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_recover: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_forgot: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_password: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_email: {
                            required: true,
                            minlength: 1
                        },
                        rewrite_user_change_email_confirm: {
                            required: true,
                            minlength: 1
                        }
                    },
                    messages: {
                        rewrite_item_url: {
                            required: '<?php 
    echo osc_esc_js(__("Listings url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Listings url: this field is required"));
    ?>
.'
                        },
                        rewrite_page_url: {
                            required: '<?php 
    echo osc_esc_js(__("Page url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Page url: this field is required"));
    ?>
.'
                        },
                        rewrite_cat_url: {
                            required: '<?php 
    echo osc_esc_js(__("Categories url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Categories url: this field is required"));
    ?>
.'
                        },
                        rewrite_search_url: {
                            required: '<?php 
    echo osc_esc_js(__("Search url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search url: this field is required"));
    ?>
.'
                        },
                        rewrite_search_country: {
                            required: '<?php 
    echo osc_esc_js(__("Search country: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search country: this field is required"));
    ?>
.'
                        },
                        rewrite_search_region: {
                            required: '<?php 
    echo osc_esc_js(__("Search region: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search region: this field is required"));
    ?>
.'
                        },
                        rewrite_search_city: {
                            required: '<?php 
    echo osc_esc_js(__("Search city: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search city: this field is required"));
    ?>
.'
                        },
                        rewrite_search_city_area: {
                            required: '<?php 
    echo osc_esc_js(__("Search city area: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search city area: this field is required"));
    ?>
.'
                        },
                        rewrite_search_category: {
                            required: '<?php 
    echo osc_esc_js(__("Search category: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search category: this field is required"));
    ?>
.'
                        },
                        rewrite_search_user: {
                            required: '<?php 
    echo osc_esc_js(__("Search user: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search user: this field is required"));
    ?>
.'
                        },
                        rewrite_search_pattern: {
                            required: '<?php 
    echo osc_esc_js(__("Search pattern: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Search pattern: this field is required"));
    ?>
.'
                        },
                        rewrite_contact: {
                            required: '<?php 
    echo osc_esc_js(__("Contact url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Contact url: this field is required"));
    ?>
.'
                        },
                        rewrite_feed: {
                            required: '<?php 
    echo osc_esc_js(__("Feed url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Feed url: this field is required"));
    ?>
.'
                        },
                        rewrite_language: {
                            required: '<?php 
    echo osc_esc_js(__("Language url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Language url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_mark: {
                            required: '<?php 
    echo osc_esc_js(__("Listing mark url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Listing mark url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_send_friend: {
                            required: '<?php 
    echo osc_esc_js(__("Listing send friend url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Listing send friend url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_contact: {
                            required: '<?php 
    echo osc_esc_js(__("Listing contact url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Listing contact url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_new: {
                            required: '<?php 
    echo osc_esc_js(__("New listing url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("New listing url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_activate: {
                            required: '<?php 
    echo osc_esc_js(__("Activate listing url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Activate listing url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_edit: {
                            required: '<?php 
    echo osc_esc_js(__("Edit listing url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Edit listing url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_delete: {
                            required: '<?php 
    echo osc_esc_js(__("Delete listing url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Delete listing url: this field is required"));
    ?>
.'
                        },
                        rewrite_item_resource_delete: {
                            required: '<?php 
    echo osc_esc_js(__("Delete listing resource url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Delete listing resource url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_login: {
                            required: '<?php 
    echo osc_esc_js(__("Login url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Login url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_dashboard: {
                            required: '<?php 
    echo osc_esc_js(__("User dashboard url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("User dashboard url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_logout: {
                            required: '<?php 
    echo osc_esc_js(__("Logout url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Logout url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_register: {
                            required: '<?php 
    echo osc_esc_js(__("User register url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("User register url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_activate: {
                            required: '<?php 
    echo osc_esc_js(__("Activate user url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Activate user url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_activate_alert: {
                            required: '<?php 
    echo osc_esc_js(__("Activate alert url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Activate aler url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_profile: {
                            required: '<?php 
    echo osc_esc_js(__("User profile url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("User profile url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_items: {
                            required: '<?php 
    echo osc_esc_js(__("User listings url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("User listings url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_alerts: {
                            required: '<?php 
    echo osc_esc_js(__("User alerts url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("User alerts url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_recover: {
                            required: '<?php 
    echo osc_esc_js(__("Recover user url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Recover user url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_forgot: {
                            required: '<?php 
    echo osc_esc_js(__("User forgot url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("User forgot url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_change_password: {
                            required: '<?php 
    echo osc_esc_js(__("Change password url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Change password url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_change_email: {
                            required: '<?php 
    echo osc_esc_js(__("Change email url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Change email url: this field is required"));
    ?>
.'
                        },
                        rewrite_user_change_email_confirm: {
                            required: '<?php 
    echo osc_esc_js(__("Change email confirm url: this field is required"));
    ?>
.',
                            minlength: '<?php 
    echo osc_esc_js(__("Change email confirm url: this field is required"));
    ?>
.'
                        }
                    },
                    wrapper: "li",
                    errorLabelContainer: "#error_list",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    }
                });
            });

            function showhide() {
                $("#inner_rules").toggle();
                if($("#show_hide a").html()=='<?php 
    echo osc_esc_js(__('Show rules'));
    ?>
') {
                    $("#show_hide a").html('<?php 
    echo osc_esc_js(__('Hide rules'));
    ?>
');
                    resetLayout();
                } else {
                    $("#show_hide a").html('<?php 
    echo osc_esc_js(__('Show rules'));
    ?>
')
                }
            }

            $(function() {
                $("#rewrite_enabled").click(function(){
                    $("#custom_rules").toggle();
                });
            });
        </script>
        <?php 
}