Changeset 5901

Show
Ignore:
Timestamp:
08/04/08 13:20:28 (4 months ago)
Author:
uta
Message:

2008/08/04 sync

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • rubricks_core/trunk/app/models/rubricks_component.rb

    r5789 r5901  
    3838    end 
    3939 
    40     def component_install(component_name, development_mode = false) 
    41       raise sprintf(RubricksMessage::MESSAGE_E0002, component_name) if self.find_by_name(component_name) 
     40    def component_install(*args) 
     41      options = args.flex :component_name, :development_mode, :ignore_static_files, :ignore_time_stamp 
     42      raise sprintf(RubricksMessage::MESSAGE_E0002, options[:component_name]) if self.find_by_name(options[:component_name]) 
    4243      rsi = RubricksSchemaInfo.find(:first) 
    4344      current_schema_version = rsi.version 
     
    4748        rsi.save! 
    4849        rc = self.new 
    49         rc.name = component_name 
     50        rc.name = options[:component_name] 
    5051        rzip = Rzip.new(rc.path_of_rzip) 
    5152        ci = rzip.component_info 
    52         ci.name = component_name 
     53        ci.name = options[:component_name] 
    5354        ci.validate 
    5455        RubricksLib.rm(rc.path_of_installable_component) 
    55         RubricksLib.rm(rc.path_of_installed_component) unless development_mode 
    56         ['images', 'javascripts', 'stylesheets'].each do |dir| 
    57           RubricksLib.rm(File.join(RubricksLib::PUBLIC_DIR, dir, 'components', component_name)) 
    58         end 
     56        RubricksLib.rm(rc.path_of_installed_component) if options[:development_mode].blank? 
     57        remove_static_files(rc.name) if options[:ignore_static_files].blank? 
    5958        RubricksLib.clear_temp_dir(true) 
    6059        rzip.unrzip 
    6160        RubricksLib.cp(rc.path_of_temp_component, RubricksLib::INSTALL_DIR, {:required => true}) 
    6261        RubricksLib.rm("#{rc.path_of_temp_component}/_install") 
    63         RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) unless development_mode 
    64         copy_static_files(rc) 
    65         ci = RubricksComponentInfo.create_from_component_path(component_name, RubricksLib::INSTALL_DIR) 
    66         do_script(component_name, INSTALL_BEFORE_SCRIPT_NAME) 
     62        RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) if options[:development_mode].blank? 
     63        copy_static_files(rc) if options[:ignore_static_files].blank? 
     64        ci = RubricksComponentInfo.create_from_component_path(rc.name, RubricksLib::INSTALL_DIR) 
     65        do_script(rc.name, INSTALL_BEFORE_SCRIPT_NAME) 
    6766        ActiveRecord::Migration.verbose = false 
    68         ActiveRecord::Migrator.migrate("#{RubricksComponent.path_of_installable_component(component_name)}/_install/db") 
     67        ActiveRecord::Migrator.migrate("#{RubricksComponent.path_of_installable_component(rc.name)}/_install/db") 
    6968        rsi = RubricksSchemaInfo.find(:first) 
    7069        ActiveRecord::Base.transaction do 
    71           component_register(component_name, ci, rsi) 
     70          component_register(rc.name, ci, rsi) 
    7271          load_component_plugins(rc) 
    73           do_script(component_name, INSTALL_AFTER_SCRIPT_NAME) 
    74           RubricksLib.rm(RubricksComponent.path_of_rzip(component_name)) 
    75         end 
    76         RubricksLib.static_file_updated 
     72          do_script(rc.name, INSTALL_AFTER_SCRIPT_NAME) 
     73          RubricksLib.rm(RubricksComponent.path_of_rzip(rc.name)) 
     74        end 
     75        RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 
    7776      rescue Exception => ex 
    7877        begin 
     
    8079          rsi.save! 
    8180          ActiveRecord::Migration.verbose = false 
    82           ActiveRecord::Migrator.migrate("#{RubricksComponent.path_of_installable_component(component_name)}/_install/db", 0) 
    83           ['images', 'javascripts', 'stylesheets'].each do |dir| 
    84             RubricksLib.rm(File.join(RubricksLib::PUBLIC_DIR, dir, 'components', component_name)) 
    85           end 
     81          ActiveRecord::Migrator.migrate("#{RubricksComponent.path_of_installable_component(options[:component_name])}/_install/db", 0) 
     82          remove_static_files(options[:component_name]) if options[:ignore_static_files].blank? 
    8683          RubricksLib.rm(rc.path_of_installable_component) 
    87           RubricksLib.rm(rc.path_of_installed_component) unless development_mode 
     84          RubricksLib.rm(rc.path_of_installed_component) if options[:development_mode].blank? 
    8885        rescue Exception => ex_in_ex 
    8986          logger.fatal(ex_in_ex.message) 
     
    178175    end 
    179176 
    180     def component_uninstall(rc_id, display_name, development_mode = false) 
     177    def component_uninstall(*args) 
     178      options = args.flex :rc_id, :display_name, :development_mode, :ignore_static_files 
    181179      messages = [] 
    182       raise sprintf(RubricksMessage::MESSAGE_E0003, display_name) unless self.exists?(rc_id
    183       rc = self.find(rc_id, :include => 'rubricks_menu_icon') 
    184       raise RubricksError::Common::ValidateException if rc.active && !development_mode 
     180      raise sprintf(RubricksMessage::MESSAGE_E0003, options[:display_name]) unless self.exists?(options[:rc_id]
     181      rc = self.find(options[:rc_id], :include => 'rubricks_menu_icon') 
     182      raise RubricksError::Common::ValidateException if rc.active && options[:development_mode].blank? 
    185183      raise RubricksError::Common::ValidateException if rc.built_in 
    186184      RubricksLib.clear_temp_dir 
     
    188186      begin 
    189187        do_script(rc.name, UNINSTALL_BEFORE_SCRIPT_NAME) 
    190         RubricksLib.rm(rc.path_of_installed_component) unless development_mode 
    191         ['images', 'javascripts', 'stylesheets'].each do |dir| 
    192           RubricksLib.rm(File.join(RubricksLib::PUBLIC_DIR, dir, 'components', rc.name)) 
    193         end 
     188        RubricksLib.rm(rc.path_of_installed_component) if options[:development_mode].blank? 
     189        remove_static_files(rc.name) if options[:ignore_static_files].blank? 
    194190        ActiveRecord::Base.transaction do 
    195191          component_unregister(rc) 
    196192        end 
    197         RubricksLib.static_file_updated 
     193        RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 
    198194      rescue Exception => ex 
    199195        begin 
    200196          RubricksLib.rm("#{rc.path_of_temp_component}/_install") 
    201           RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) unless development_mode 
    202           copy_static_files(rc) 
     197          RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) if options[:development_mode].blank? 
     198          copy_static_files(rc) if options[:ignore_static_files].blank? 
    203199        rescue Exception => ex_in_ex 
    204200          logger.fatal(ex_in_ex.message) 
     
    259255    end 
    260256 
    261     def component_update(rc_id, display_name, development_mode = false) 
    262       raise sprintf(RubricksMessage::MESSAGE_E0004, display_name) unless self.exists?(rc_id) 
    263       rc = self.find(rc_id, :include => [:rubricks_component_functions, :rubricks_menu_icon]) 
     257    def component_update(*args) 
     258      options = args.flex :rc_id, :display_name, :development_mode, :ignore_static_files 
     259      raise sprintf(RubricksMessage::MESSAGE_E0004, options[:display_name]) unless self.exists?(options[:rc_id]) 
     260      rc = self.find(options[:rc_id], :include => [:rubricks_component_functions, :rubricks_menu_icon]) 
    264261      raise RubricksError::Common::ValidateException if rc.built_in 
    265262      rsi = RubricksSchemaInfo.find(:first) 
     
    275272        RubricksLib.clear_temp_dir 
    276273      end 
    277       unless development_mode 
     274      if options[:development_mode].blank? 
    278275        old_dir = File.join(RubricksLib::COMPONENT_TEMP_DIR, 'old') 
    279276        RubricksLib.mkdir(old_dir) 
     
    284281        rsi.save! 
    285282        RubricksLib.rm(rc.path_of_installable_component) 
    286         RubricksLib.rm(rc.path_of_installed_component) unless development_mode 
    287         ['images', 'javascripts', 'stylesheets'].each do |dir| 
    288           RubricksLib.rm(File.join(RubricksLib::PUBLIC_DIR, dir, 'components', rc.name)) 
    289         end 
     283        RubricksLib.rm(rc.path_of_installed_component) if options[:development_mode].blank? 
     284        remove_static_files(rc.name) if options[:ignore_static_files].blank? 
    290285        rzip.unrzip 
    291286        RubricksLib.cp(rc.path_of_temp_component, RubricksLib::INSTALL_DIR, {:required => true}) 
    292287        RubricksLib.rm(File.join(rc.path_of_temp_component, '_install')) 
    293         RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) unless development_mode 
    294         copy_static_files(rc) 
     288        RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) if options[:development_mode].blank? 
     289        copy_static_files(rc) if options[:ignore_static_files].blank? 
    295290        ci = RubricksComponentInfo.create_from_component_path(rc.name, RubricksLib::INSTALL_DIR) 
    296291        do_script(rc.name, UPDATE_BEFORE_SCRIPT_NAME) 
     
    478473          RubricksLib.rm(RubricksComponent.path_of_rzip(rc.name)) 
    479474        end 
    480         RubricksLib.static_file_updated 
     475        RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 
    481476      rescue Exception => ex 
    482477        begin 
     
    484479          ActiveRecord::Migrator.migrate("#{RubricksComponent.path_of_installable_component(rc.name)}/_install/db", current_component_schema_version) 
    485480          RubricksLib.rm(rc.path_of_installable_component) 
    486           RubricksLib.rm(rc.path_of_installed_component) unless development_mode 
    487           ['images', 'javascripts', 'stylesheets'].each do |dir| 
    488             RubricksLib.rm(File.join(RubricksLib::PUBLIC_DIR, dir, 'components', rc.name)) 
    489           end 
    490           unless development_mode 
     481          RubricksLib.rm(rc.path_of_installed_component) if options[:development_mode].blank? 
     482          remove_static_files(rc.name) if options[:ignore_static_files].blank? 
     483          if options[:development_mode].blank? 
    491484            old_dir = File.join(RubricksLib::COMPONENT_TEMP_DIR, 'old', rc.name) 
    492485            RubricksLib.cp(old_dir, RubricksLib::INSTALL_DIR, {:required => true}) 
     
    494487            RubricksLib.cp(old_dir, RubricksLib::COMPONENT_DIR, {:required => true}) 
    495488          end 
    496           copy_static_files(rc) 
     489          copy_static_files(rc) if options[:ignore_static_files].blank? 
    497490        rescue Exception => ex_in_ex 
    498491          logger.fatal(ex_in_ex.message) 
     
    569562      RubricksLib.server_reload if RubricksLib.server_control_executable? 
    570563    end 
     564 
     565    def remove_static_files(component_name) 
     566      RubricksLib::PUBLIC_SUBDIR.each do |dir| 
     567        RubricksLib.rm(File.join(RubricksLib::PUBLIC_DIR, dir, 'components', component_name)) 
     568      end 
     569    end 
    571570  end 
    572571 
  • rubricks_core/trunk/app/models/rubricks_group.rb

    r5886 r5901  
    2323    REGISTERED_GROUP_ID     = 3 
    2424    TREE_GRADE_LIMIT        = 6 
    25     TREE_CHARACTER_LIMIT    = [18, 16, 14, 12, 10, 8, 6
     25    TREE_CHARACTER_LIMIT    = [24, 22, 20, 18, 16, 14, 12
    2626  end 
    2727 
  • rubricks_core/trunk/app/models/rubricks_lib/rubricks_string_utils_lib.rb

    r5767 r5901  
    4343  } 
    4444 
    45   def clip_string(str, limit) 
    46     if str.split(//).length > limit 
    47       clipped   = hl(str.cutoff_by_char(limit)) 
    48       popup     = %Q| title="#{hl(str)}"| 
     45  def clip_string(*args) 
     46    options = args.flex :str, :limit, :smart 
     47    if options[:smart] 
     48      clipped   = hl(options[:str].cutoff_smart(options[:limit])) 
     49      popup     = (options[:str] == clipped) ? '' : %Q| title="#{hl(options[:str])}"| 
    4950    else 
    50       clipped   = hl(str
    51       popup     = '' 
     51      clipped   = hl(options[:str].cutoff_by_char(options[:limit])
     52      popup     = (options[:str] == clipped) ? '' : %Q| title="#{hl(options[:str])}"| 
    5253    end 
    5354    return clipped, popup 
  • rubricks_core/trunk/app/models/rubricks_theme.rb

    r5318 r5901  
    9090  end 
    9191 
    92   def refresh_theme_files 
     92  def refresh_theme_files(*args) 
     93    options = args.flex :ignore_time_stamp 
    9394    self.remove_theme_files 
    9495    RubricksLib::PUBLIC_SUBDIR.each do |target| 
     
    101102      end 
    102103    end 
    103     RubricksLib.static_file_updated 
     104    RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 
    104105  end 
    105106 
  • rubricks_core/trunk/components/system/admin_component/_main_component_install_window.rhtml

    r5887 r5901  
    44      <tr class="rubricks_general_table_even"> 
    55        <td> 
    6           <select id="install_component_name" name="component_name"
     6          <select id="install_component_name" name="component_name" style="width:100%;"
    77            <% @installable_components.each do |component| %> 
    88              <option value="<%= hl(component) %>"><%= hl(component) %></option> 
  • rubricks_core/trunk/components/system/admin_config/_main_tab_dashboard.rhtml

    r5781 r5901  
    5555            <td><%= hl('[_System_AdminConfig_ItemDashboardAvailable]') %></td> 
    5656            <td> 
    57               <select id="rubricks_config_dashboard_available" name="rubricks_config[dashboard_available][value]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     57              <select id="rubricks_config_dashboard_available" name="rubricks_config[dashboard_available][value]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    5858                <option value="true"<%= (RubricksConfig.get('dashboard_available')) ? ' selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    5959                <option value="false"<%= (!RubricksConfig.get('dashboard_available')) ? ' selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    7070            <tr class="rubricks_general_table_even"> 
    7171              <td> 
    72                 <select id="rubricks_dashboard_widget_<%= hl(rdw.id.to_s) %>_visible" name="rubricks_config[dashboard_available][widgets][<%= hl(rdw.id.to_s) %>][visible]" size="1"
     72                <select id="rubricks_dashboard_widget_<%= hl(rdw.id.to_s) %>_visible" name="rubricks_config[dashboard_available][widgets][<%= hl(rdw.id.to_s) %>][visible]" size="1" style="max-width:100%;"
    7373                  <option value="true"<%= (rdw.visible) ? ' selected="selected"' : '' %>><%= hl('[_Common_Validity]') %></option> 
    7474                  <option value="false"<%= (!rdw.visible) ? ' selected="selected"' : '' %>><%= hl('[_Common_Invalidity]') %></option> 
     
    7777              </td> 
    7878              <td> 
    79                 <select id="rubricks_dashboard_widget_<%= hl(rdw.id.to_s) %>_rubricks_dashboard_widget_skin_id" name="rubricks_config[dashboard_available][widgets][<%= hl(rdw.id.to_s) %>][rubricks_dashboard_widget_skin_id]" size="1"
     79                <select id="rubricks_dashboard_widget_<%= hl(rdw.id.to_s) %>_rubricks_dashboard_widget_skin_id" name="rubricks_config[dashboard_available][widgets][<%= hl(rdw.id.to_s) %>][rubricks_dashboard_widget_skin_id]" size="1" style="max-width:100%;"
    8080                  <% @rdws_list.each do |rdws| %> 
    8181                    <option value="<%= hl(rdws.id) %>"<%= (rdw.rubricks_dashboard_widget_skin_id == rdws.id) ? ' selected="selected"' : '' %>><%= hl(rdws.name) %></option> 
  • rubricks_core/trunk/components/system/admin_config/_main_tab_mail.rhtml

    r5781 r5901  
    9494              <td> 
    9595                <%= validate 'rubricks_config_mail_method', [{:enforce_parent => {:children_id => 'rubricks_config_mail_smtp_address,rubricks_config_mail_smtp_port,rubricks_config_mail_smtp_account,rubricks_config_mail_smtp_password,rubricks_config_mail_smtp_password_encode'}}] %> 
    96                 <select id="rubricks_config_mail_method" name="rubricks_config[mail_method]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     96                <select id="rubricks_config_mail_method" name="rubricks_config[mail_method]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    9797                  <option value="smtp"<%= (RubricksConfig.get('mail_method') == 'smtp') ? ' selected="selected"' : '' %>>SMTP</option> 
    9898                  <option value="sendmail"<%= (RubricksConfig.get('mail_method') == 'sendmail') ? ' selected="selected"' : '' %>>Sendmail</option> 
     
    133133              <td> 
    134134                <%= validate 'rubricks_config_mail_smtp_password_encode', [{:enforce_child => {:parent_id => 'rubricks_config_mail_method' , :regexp => '/^(sendmail)$/'}}] %> 
    135                 <select id="rubricks_config_mail_smtp_password_encode" name="rubricks_config[mail_smtp_password_encode]" size="1"
     135                <select id="rubricks_config_mail_smtp_password_encode" name="rubricks_config[mail_smtp_password_encode]" size="1" style="max-width:100%;"
    136136                  <option value="plain"<%= (RubricksConfig.get('mail_smtp_password_encode') == 'plain' ) ? ' selected="selected"' : '' %>>Plain</option> 
    137137                  <option value="login"<%= (RubricksConfig.get('mail_smtp_password_encode') == 'login' ) ? ' selected="selected"' : '' %>>Login</option> 
  • rubricks_core/trunk/components/system/admin_config/_main_tab_site.rhtml

    r5781 r5901  
    186186              <td><%= hl('[_System_AdminConfig_ItemSiteStartMenu]') %></td> 
    187187              <td> 
    188                 <select id="rubricks_config_site_start_menu" name="rubricks_config[site_start_menu]" size="1"
     188                <select id="rubricks_config_site_start_menu" name="rubricks_config[site_start_menu]" size="1" style="max-width:100%;"
    189189                  <% @menu_item_list.each do |menu_item| %> 
    190190                    <option value="<%= hl(menu_item.id) %>"<%= (RubricksConfig.get('site_start_menu').to_i == menu_item.id) ? ' selected="selected"' : '' %>><%= hl(menu_item.title) %></option> 
     
    198198              <td><%= hl('[_System_AdminConfig_ItemSiteSwitchHeader]') %></td> 
    199199              <td> 
    200                 <select id="rubricks_config_site_switch_header" name="rubricks_config[site_switch_header]" size="1"
     200                <select id="rubricks_config_site_switch_header" name="rubricks_config[site_switch_header]" size="1" style="max-width:100%;"
    201201                  <option value="true"<%= (RubricksConfig.get('site_switch_header')) ? ' selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    202202                  <option value="false"<%= (!RubricksConfig.get('site_switch_header')) ? ' selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    219219              <td> 
    220220                <%= validate 'rubricks_config_site_default_language', [{:enforce_parent => {:children_id => 'rubricks_config_site_display_kana'}}] %> 
    221                 <select id="rubricks_config_site_default_language" name="rubricks_config[site_default_language]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     221                <select id="rubricks_config_site_default_language" name="rubricks_config[site_default_language]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    222222                  <% @language_list.each do |language| %> 
    223223                    <option value="<%= language %>" <%= (RubricksConfig.get('site_default_language') == language) ? 'selected="selected"' : '' %>><%= language %></option> 
     
    232232              <td> 
    233233                <%= validate 'rubricks_config_site_display_kana', [{:enforce_child => {:parent_id => 'rubricks_config_site_default_language' , :regexp => 'false'}}] %> 
    234                 <select id="rubricks_config_site_display_kana" name="rubricks_config[site_display_kana]" size="1"
     234                <select id="rubricks_config_site_display_kana" name="rubricks_config[site_display_kana]" size="1" style="max-width:100%;"
    235235                  <option value="true"  <%= (RubricksConfig.get('site_display_kana'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    236236                  <option value="false" <%= (!RubricksConfig.get('site_display_kana')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    244244              <td><%= hl('[_System_AdminConfig_ItemSiteDefaultTheme]') %></td> 
    245245              <td> 
    246                 <select id="rubricks_config_site_default_theme" name="rubricks_config[site_default_theme]" size="1"
     246                <select id="rubricks_config_site_default_theme" name="rubricks_config[site_default_theme]" size="1" style="max-width:100%;"
    247247                  <% @rt_list.each do |rt| %> 
    248248                    <option value="<%= hl(rt.name) %>"<%= (RubricksConfig.get('site_default_theme') == rt.name) ? ' selected="selected"' : '' %>><%= hl(rt.name) %></option> 
     
    256256              <td><%= hl('[_System_AdminConfig_ItemSiteEnableMailLogin]') %></td> 
    257257              <td> 
    258                 <select id="rubricks_config_site_enable_mail_login" name="rubricks_config[site_enable_mail_login]" size="1"
     258                <select id="rubricks_config_site_enable_mail_login" name="rubricks_config[site_enable_mail_login]" size="1" style="max-width:100%;"
    259259                  <option value="true"  <%= (RubricksConfig.get('site_enable_mail_login'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    260260                  <option value="false" <%= (!RubricksConfig.get('site_enable_mail_login')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    268268              <td> 
    269269                <%= validate 'rubricks_config_site_enable_auto_login', [{:enforce_parent => {:children_id => 'rubricks_config_site_auto_login_period'}}] %> 
    270                 <select id="rubricks_config_site_enable_auto_login" name="rubricks_config[site_enable_auto_login]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     270                <select id="rubricks_config_site_enable_auto_login" name="rubricks_config[site_enable_auto_login]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    271271                  <option value="true"  <%= (RubricksConfig.get('site_enable_auto_login'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    272272                  <option value="false" <%= (!RubricksConfig.get('site_enable_auto_login')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    287287              <td><%= hl('[_System_AdminConfig_ItemSiteEnableBrowseUserInfo]') %></td> 
    288288              <td> 
    289                 <select id="rubricks_config_site_enable_browse_user_info" name="rubricks_config[site_enable_browse_user_info]" size="1"
     289                <select id="rubricks_config_site_enable_browse_user_info" name="rubricks_config[site_enable_browse_user_info]" size="1" style="max-width:100%;"
    290290                  <option value="true"  <%= (RubricksConfig.get('site_enable_browse_user_info'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    291291                  <option value="false" <%= (!RubricksConfig.get('site_enable_browse_user_info')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    298298              <td><%= hl('[_System_AdminConfig_ItemSiteRecordTrails]') %></td> 
    299299              <td> 
    300                 <select id="rubricks_config_site_record_trails" name="rubricks_config[site_record_trails]" size="1"
     300                <select id="rubricks_config_site_record_trails" name="rubricks_config[site_record_trails]" size="1" style="max-width:100%;"
    301301                  <option value="true"  <%= (RubricksConfig.get('site_record_trails'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    302302                  <option value="false" <%= (!RubricksConfig.get('site_record_trails')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    320320              <td><%= hl('[_System_AdminConfig_ItemSiteAttachmentType]') %></td> 
    321321              <td> 
    322                 <select id="rubricks_config_site_attachment_type" name="rubricks_config[site_attachment_type]" size="1"
     322                <select id="rubricks_config_site_attachment_type" name="rubricks_config[site_attachment_type]" size="1" style="max-width:100%;"
    323323                  <option value="file"     <%= (RubricksConfig.get('site_attachment_type') == 'file')     ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemSiteAttachmentTypeFile]') %></option> 
    324324                  <option value="database" <%= (RubricksConfig.get('site_attachment_type') == 'database') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemSiteAttachmentTypeDatabase]') %></option> 
     
    331331              <td><%= hl('[_System_AdminConfig_ItemSiteAdvancedBlockManagement]') %></td> 
    332332              <td> 
    333                 <select id="rubricks_config_site_advanced_block_management" name="rubricks_config[site_advanced_block_management]" size="1"
     333                <select id="rubricks_config_site_advanced_block_management" name="rubricks_config[site_advanced_block_management]" size="1" style="max-width:100%;"
    334334                  <option value="true"  <%= (RubricksConfig.get('site_advanced_block_management'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    335335                  <option value="false" <%= (!RubricksConfig.get('site_advanced_block_management')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    343343              <td> 
    344344                <%= validate 'rubricks_config_site_blockaged', [{:enforce_parent => {:children_id => 'rubricks_config_site_blockaged_access,rubricks_config_site_blockaged_message'}}] %> 
    345                 <select id="rubricks_config_site_blockaged" name="rubricks_config[site_blockaged]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     345                <select id="rubricks_config_site_blockaged" name="rubricks_config[site_blockaged]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    346346                  <option value="true"  <%= (RubricksConfig.get('site_blockaged'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    347347                  <option value="false" <%= (!RubricksConfig.get('site_blockaged')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    378378              <td><%= hl('[_System_AdminConfig_ItemSiteManagementIgnoreRefresh]') %></td> 
    379379              <td> 
    380                 <select id="rubricks_config_site_management_ignore_refresh" name="rubricks_config[site_management_ignore_refresh]" size="1"
     380                <select id="rubricks_config_site_management_ignore_refresh" name="rubricks_config[site_management_ignore_refresh]" size="1" style="max-width:100%;"
    381381                  <option value="true"  <%= (RubricksConfig.get('site_management_ignore_refresh'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    382382                  <option value="false" <%= (!RubricksConfig.get('site_management_ignore_refresh')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
  • rubricks_core/trunk/components/system/admin_config/_main_tab_user.rhtml

    r5781 r5901  
    184184              <td> 
    185185                <%= validate 'rubricks_config_user_register', [{:enforce_parent => {:children_id => 'rubricks_config_user_admit'}}] %> 
    186                 <select id="rubricks_config_user_register" name="rubricks_config[user_register]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     186                <select id="rubricks_config_user_register" name="rubricks_config[user_register]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    187187                  <option value="true"  <%= (RubricksConfig.get('user_register'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    188188                  <option value="false" <%= (!RubricksConfig.get('user_register')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    195195              <td> 
    196196                <%= validate 'rubricks_config_user_admit', [{:enforce_child => {:parent_id => 'rubricks_config_user_register' , :regexp => 'false'}}] %> 
    197                 <select id="rubricks_config_user_admit" name="rubricks_config[user_admit]" size="1"
     197                <select id="rubricks_config_user_admit" name="rubricks_config[user_admit]" size="1" style="max-width:100%;"
    198198                  <option value="none"  <%= (RubricksConfig.get('user_admit') == 'none')  ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserAdmitNone]') %></option> 
    199199                  <option value="user"  <%= (RubricksConfig.get('user_admit') == 'user')  ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserAdmitUser]') %></option> 
     
    223223              <td><%= hl('[_System_AdminConfig_ItemUserLoginNameIntensity]') %></td> 
    224224              <td> 
    225                 <select id="rubricks_config_user_login_name_intensity" name="rubricks_config[user_login_name_intensity]" size="1"
     225                <select id="rubricks_config_user_login_name_intensity" name="rubricks_config[user_login_name_intensity]" size="1" style="max-width:100%;"
    226226                  <% if @configuration[:data][:user_login_name_intensity].include?('low') %> 
    227227                    <option value="low"    <%= (RubricksConfig.get('user_login_name_intensity') == 'low')    ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserLoginNameIntensityLow]') %></option> 
     
    253253              <td><%= hl('[_System_AdminConfig_ItemUserPasswordIntensity]') %></td> 
    254254              <td> 
    255                 <select id="rubricks_config_user_password_intensity" name="rubricks_config[user_password_intensity]" size="1"
     255                <select id="rubricks_config_user_password_intensity" name="rubricks_config[user_password_intensity]" size="1" style="max-width:100%;"
    256256                  <% if @configuration[:data][:user_password_intensity].include?('low') %> 
    257257                    <option value="low"    <%= (RubricksConfig.get('user_password_intensity') == 'low') ?    'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserPasswordIntensityLow]') %></option> 
     
    280280              <td><%= hl('[_System_AdminConfig_ItemUserPasswordReuseLimit]') %></td> 
    281281              <td> 
    282                 <select id="rubricks_config_user_password_reuse_limit" name="rubricks_config[user_password_reuse_limit]" size="1"
     282                <select id="rubricks_config_user_password_reuse_limit" name="rubricks_config[user_password_reuse_limit]" size="1" style="max-width:100%;"
    283283                  <option value="0" <%= (RubricksConfig.get('user_password_reuse_limit') == 0) ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserPasswordReuseLimitNone]') %></option> 
    284284                  <% @configuration[:data][:user_password_reuse_limit].last.times do |i| %> 
     
    293293              <td><%= hl('[_System_AdminConfig_ItemUserPasswordChangeForcibly]') %></td> 
    294294              <td> 
    295                 <select id="rubricks_config_user_password_change_forcibly" name="rubricks_config[user_password_change_forcibly]" size="1"
     295                <select id="rubricks_config_user_password_change_forcibly" name="rubricks_config[user_password_change_forcibly]" size="1" style="max-width:100%;"
    296296                  <option value="true"  <%= (RubricksConfig.get('user_password_change_forcibly'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    297297                  <option value="false" <%= (!RubricksConfig.get('user_password_change_forcibly')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
     
    320320              <td><%= hl('[_System_AdminConfig_ItemUserLockSilentPeriod]') %></td> 
    321321              <td> 
    322                 <select id="rubricks_config_user_lock_silent_period" name="rubricks_config[user_lock_silent_period]" size="1"
     322                <select id="rubricks_config_user_lock_silent_period" name="rubricks_config[user_lock_silent_period]" size="1" style="max-width:100%;"
    323323                  <option value="0" <%= (RubricksConfig.get('user_lock_silent_period') == 0) ? 'selected="selected"' : '' %>><%= hl('[_Common_Indefinite]') %></option> 
    324324                  <% @configuration[:data][:user_lock_silent_period].last.times do |i| %> 
     
    333333              <td><%= hl('[_System_AdminConfig_ItemUserPermitSilentPeriod]') %></td> 
    334334              <td> 
    335                 <select id="rubricks_config_user_permit_silent_period" name="rubricks_config[user_permit_silent_period]" size="1"
     335                <select id="rubricks_config_user_permit_silent_period" name="rubricks_config[user_permit_silent_period]" size="1" style="max-width:100%;"
    336336                  <option value="0" <%= (RubricksConfig.get('user_permit_silent_period') == 0) ? 'selected="selected"' : '' %>><%= hl('[_Common_Indefinite]') %></option> 
    337337                  <% @configuration[:data][:user_permit_silent_period].last.times do |i| %> 
     
    346346              <td><%= hl('[_System_AdminConfig_ItemUserManagementGroupDisplay]') %></td> 
    347347              <td> 
    348                 <select id="rubricks_config_user_management_group_display" name="rubricks_config[user_management_group_display]" size="1"
     348                <select id="rubricks_config_user_management_group_display" name="rubricks_config[user_management_group_display]" size="1" style="max-width:100%;"
    349349                  <option value="list"     <%= (RubricksConfig.get('user_management_group_display') == 'list')     ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserManagementGroupDisplayList]') %></option> 
    350350                  <option value="treeview" <%= (RubricksConfig.get('user_management_group_display') == 'treeview') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserManagementGroupDisplayTreeview]') %></option> 
     
    372372              <td> 
    373373                <%= validate 'rubricks_config_user_guest_available', [{:enforce_parent => {:children_id => 'rubricks_config_user_guest_name'}}] %> 
    374                 <select id="rubricks_config_user_guest_available" name="rubricks_config[user_guest_available]" size="1" onchange="rubricks.system.admin_config.check_switching();"> 
     374                <select id="rubricks_config_user_guest_available" name="rubricks_config[user_guest_available]" size="1" style="max-width:100%;" onchange="rubricks.system.admin_config.check_switching();"> 
    375375                  <option value="true"  <%= (RubricksConfig.get('user_guest_available'))  ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 
    376376                  <option value="false" <%= (!RubricksConfig.get('user_guest_available')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> 
  • rubricks_core/trunk/components/system/admin_mobile/_main_tab_login.rhtml

    r5781 r5901  
    4848          <td><%= hl('[_System_AdminConfig_ItemMobileLoginWithIdent]') %></td> 
    4949          <td> 
    50             <select id="rubricks_config_mobile_login_with_ident" name="rubricks_config[mobile_login_with_ident]" size="1"
     50            <select id="rubricks_config_mobile_login_with_ident" name="rubricks_config[mobile_login_with_ident]" size="1" style="max-width:100%;"
    5151              <option value="none"     <%= (RubricksConfig.get('mobile_login_with_ident') == 'none' )     ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemMobileLoginWithIdentNone]') %></option> 
    5252              <option value="parallel" <%= (RubricksConfig.get('mobile_login_with_ident') == 'parallel' ) ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemMobileLoginWithIdentParallel]') %></option> 
  • rubricks_core/trunk/components/system/admin_skin/install_window.rhtml

    r5887 r5901  
    99        <tr class="rubricks_general_table_even"> 
    1010          <td> 
    11             <select id="rubricks_dashboard_widget_skin_name" name="rubricks_dashboard_widget_skin[name]"
     11            <select id="rubricks_dashboard_widget_skin_name" name="rubricks_dashboard_widget_skin[name]" style="width:100%;"
    1212              <% @installable_skins.each do |skin| %> 
    1313                <option value="<%= hl(skin) %>"><%= hl(skin) %></option> 
  • rubricks_core/trunk/components/system/admin_theme/install_window.rhtml

    r5887 r5901  
    99        <tr class="rubricks_general_table_even"> 
    1010          <td> 
    11             <select id="rubricks_theme_name" name="rubricks_theme[name]"
     11            <select id="rubricks_theme_name" name="rubricks_theme[name]" style="width:100%;"
    1212              <% @installable_themes.each do |theme| %> 
    1313                <option value="<%= hl(theme) %>"><%= hl(theme) %></option> 
  • rubricks_core/trunk/components/system/admin_trails/_main_trails_filter.rhtml

    r5887 r5901  
    1616      <td><%= hl('[_Common_Component]') %></td> 
    1717      <td> 
    18         <select id="filter_conditions_trails_target_component" name="filter_conditions[trails_target_component]"
     18        <select id="filter_conditions_trails_target_component" name="filter_conditions[trails_target_component]" style="max-width:100%;"
    1919          <option value="<%= hl(RubricksTrail::FILTER_DEFAULT[:trails_component_name]) %>" selected="selected"><%= hl(RubricksTrail::FILTER_DEFAULT[:trails_component_display_name]) %></option> 
    2020          <% @rc_name_list.each_with_index do |rc_name, i| %> 
  • rubricks_core/trunk/components/system/dashboard/_index_config.rhtml

    r5887 r5901  
    1717            <td><%= hl(rdwi.rubricks_dashboard_widget.rubricks_block.title) %></td> 
    1818            <td> 
    19               <select id="widget_list_<%= hl(rdwi.id) %>_hotkey" class="rubricks_dashboard_dummy" name="widget_list[<%= hl(rdwi.id) %>][hotkey]" onchange="rubricks.common.DashboardConfigManager.check_hotkey();"> 
     19              <select id="widget_list_<%= hl(rdwi.id) %>_hotkey" class="rubricks_dashboard_dummy" name="widget_list[<%= hl(rdwi.id) %>][hotkey]" style="max-width:100%;" onchange="rubricks.common.DashboardConfigManager.check_hotkey();"> 
    2020                <% @hotkey_lists.each_with_index do |hotkey, i| %> 
    2121                  <option value="<%= hl(i) %>"<%= (i == rdwi.hotkey) ? ' selected="selected"' : '' %>><%= hl(hotkey) %></option> 
     
    2525            </td> 
    2626            <td> 
    27               <select id="widget_list_<%= hl(rdwi.id) %>_skin" name="widget_list[<%= hl(rdwi.id) %>][skin]"
     27              <select id="widget_list_<%= hl(rdwi.id) %>_skin" name="widget_list[<%= hl(rdwi.id) %>][skin]" style="max-width:100%;"
    2828                <% @skin_lists.each do |rdws| %> 
    2929                  <option value="<%= hl(rdws.id) %>"<%= (rdws.id == rdwi.rubricks_dashboard_widget_skin.id) ? ' selected="selected"' : '' %>><%= hl(rdws.name) %></option> 
  • rubricks_core/trunk/components/system/search/_main_filter.rhtml

    r5688 r5901  
    88        <td><%= hl('[_Common_SearchTarget][_Common_Colon]') %></td> 
    99        <td> 
    10           <select id="tc" name="tc" onchange="rubricks.system.search.change_target_component(this.value);"> 
     10          <select id="tc" name="tc" style="max-width:100%;" onchange="rubricks.system.search.change_target_component(this.value);"> 
    1111            <option id="tc_all" value="all"<%= (@tc == 'all') ? ' selected="selected"' : '' %>>ALL</option> 
    1212            <% @rc_list.each do |rc| %> 
  • rubricks_core/trunk/components/system/user/user_select.rhtml

    r5887 r5901  
    6262      }, 
    6363      _create_option: function(data) { 
    64         var display_name = data.user_login_name + '(' + data.user_name + ')'; 
    65         if(display_name.length > <%= RubricksUser::SELECT_BOX_STRING_LIMIT %>) { 
    66           data.title      = display_name; 
    67           data.innerHTML  = display_name.unescapeHTML().truncate(<%= RubricksUser::SELECT_BOX_STRING_LIMIT %>, '').escapeHTML() + '..'; 
    68         } else { 
    69           data.innerHTML  = display_name; 
    70         } 
     64        var display     = data.user_login_name + '(' + data.user_name + ')'; 
     65        data.title      = (display.length > <%= RubricksUser::SELECT_BOX_STRING_LIMIT %>) ? display : ''; 
     66        data.innerHTML  = display; 
    7167        var el = document.createElement('option'); 
    7268        return Object.extend(el, data); 
  • rubricks_core/trunk/vendor/plugins/rubricks/lib/action_view_user_management_helper.rb

    r5781 r5901  
    66        limit ||= RubricksGroup::TREE_CHARACTER_LIMIT[tree_grade - 1] 
    77        group_name = (rg.name.match(/^\[.*\]$/)) ? hl(rg.name) : rg.name 
    8         return RubricksLib.clip_string(group_name, limit
     8        return RubricksLib.clip_string(group_name, limit, true
    99      end 
    1010