diff --git a/left-green.gif b/left-green.gif new file mode 100644 index 00000000..1929b376 Binary files /dev/null and b/left-green.gif differ diff --git a/simplemenu.module b/simplemenu.module index 503b17e4..acf3b541 100644 --- a/simplemenu.module +++ b/simplemenu.module @@ -42,7 +42,11 @@ function simplemenu_footer() { if (user_access('view simplemenu') && !$exclusions[$theme]) { global $theme, $custom_theme; $path = drupal_get_path('module', 'simplemenu'); - drupal_add_css($path .'/simplemenu.css'); + drupal_add_css($path .'/simplemenu.css'); + + if (variable_get('simplemenu_rtl', 0)) { + drupal_add_css($path .'/simplemenu_rtl.css'); + } $settings = array( // pass in base path to the JS file @@ -113,6 +117,13 @@ function simplemenu_admin_settings() { '#options' => drupal_map_assoc(array_keys(list_themes())), '#default_value' => variable_get('simplemenu_exclusions', array()), '#description' => t('Select which themes to not display the menu. Use this when you have a theme that displays its own admin navigation.'), + ); + + $form['default_menu']['advanced']['simplemenu_rtl'] = array( + '#type' => 'checkbox', + '#title' => t('Set menu orientation to RTL'), + '#default_value' => variable_get('simplemenu_rtl', 0), + '#description' => t('Set the orientation of the menu to RTL for Eastern languages.') ); return system_settings_form($form); diff --git a/simplemenu_rtl.css b/simplemenu_rtl.css new file mode 100644 index 00000000..238001f3 --- /dev/null +++ b/simplemenu_rtl.css @@ -0,0 +1,20 @@ +/* $Id$ */ + +ul#simplemenu li { +float:right; +border-right:1px solid #eee; +border-left:1px solid #999; +} + +ul#simplemenu li.expanded > a { +background:#ddd url(left-green.gif) no-repeat 97%; +} + +ul#simplemenu li.root > a { +font-weight:bold; +background:#ddd url(down-green.gif) no-repeat 97%; +} + +ul#simplemenu li:hover ul,ul#simplemenu li li:hover ul,ul#simplemenu li li li:hover ul,ul#simplemenu li.sfhover ul,ul#simplemenu li li.sfhover ul,ul#simplemenu li li li.sfhover ul { +right:auto; +} \ No newline at end of file