Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

Commit

Permalink
added right-to-left language (RTL) support
Browse files Browse the repository at this point in the history
NOTE: certain features that involves the use of bundled resources might
not display correctly in rtl format due to their lack of rtl support.
  • Loading branch information
zyml committed Aug 9, 2012
1 parent 08255da commit dfcec95
Show file tree
Hide file tree
Showing 7 changed files with 498 additions and 11 deletions.
67 changes: 67 additions & 0 deletions css/theme-options-rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#ar2-theme-options .submit input {
margin-left: 5px;
}

#ar2-theme-options .nav-tab-wrapper li {
float: right;
}


#ar2-theme-options-form {
padding: 1em;
width: 70%;
float: right;
}

#ar2-theme-options .form-table th {
padding: 10px 0 8px 8px;
}

#ar2-theme-options .reset-thumbnail-sizes {
margin-right: 10px;
float: left;
}

#ar2-theme-options .asides {
float: left;
}

/* Switch */
#ar2-theme-options .switch-inner {
margin-left: auto;
margin-right: -100%;
}
#ar2-theme-options .switch-inner > span {
float: right;
}
#ar2-theme-options .switch-inner .switch-active {
padding-right: 10px;
}
#ar2-theme-options .switch-inner .switch-inactive {
padding-left: 10px;
text-align: left;
}
#ar2-theme-options .switch-node {
left: 36px;
right: auto;
}
#ar2-theme-options .switch input:checked + label .switch-inner {
margin-right: 0;
}
#ar2-theme-options .switch input:checked + label .switch-node {
left: 0;
right: auto;
}

/* TokenInput CSS */
ul.token-input-list li {
float: right;
}

li.token-input-token p {
float: right;
}

li.token-input-token span {
float: left;
}
8 changes: 8 additions & 0 deletions editor-style-rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* =Global
-------------------------------------------------------------- */
html .mceContentBody {
max-width: 634px;
direction: rtl;
unicode-bidi: embed;
float: right;
}
Binary file modified images/sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions library/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,18 +359,18 @@ function ar2_theme_options_enqueue_scripts( $hook_suffix ) {

$current = isset( $_GET[ 'opt_type' ] ) ? esc_attr( $_GET['opt_type'] ) : '';

wp_enqueue_style( 'ar2-theme-options', get_template_directory_uri() . '/css/theme-options.css', array( 'farbtastic' ), '2011-07-29' );
wp_enqueue_style( 'ar2-theme-options', get_template_directory_uri() . '/css/theme-options.css', null, '2011-07-29' );

wp_register_style( 'ar2-theme-options-ie', get_template_directory_uri() . '/css/theme-options-ie.css' );
$wp_styles->add_data( 'ar2-theme-options-ie', 'conditional', 'lt IE 9' );
wp_enqueue_style( 'ar2-theme-options-ie' );

wp_enqueue_script( 'jquery-tokeninput', get_template_directory_uri() . '/js/jquery.tokeninput.min.js', array( 'jquery' ), time() );
wp_enqueue_script( 'ar2-theme-options', get_template_directory_uri() . '/js/theme-options.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs' ), time() );
if ( is_rtl() )
wp_enqueue_style( 'ar2-theme-options-rtl', get_template_directory_uri() . '/css/theme-options-rtl.css', null, '2012-08-09' );

wp_enqueue_script( 'jquery-tokeninput', get_template_directory_uri() . '/js/jquery.tokeninput.min.js', array( 'jquery' ), '2012-08-09' );
wp_enqueue_script( 'ar2-theme-options', get_template_directory_uri() . '/js/theme-options.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs' ), '2012-08-09' );

wp_enqueue_script( 'farbtastic' );
wp_enqueue_style( 'farbtastic' );

wp_localize_script( 'ar2-theme-options', 'ar2Admin_l10n', ar2_theme_options_localize_vars() );

}
Expand Down
3 changes: 2 additions & 1 deletion library/classes/postviews-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ public function do_slideshow_js() {

?>
jQuery( '.posts-slideshow' ).flexslider( {
animation: 'slide'
useCSS: false,
animation: 'slide'
} );
<?php

Expand Down
Loading

0 comments on commit dfcec95

Please sign in to comment.