Changeset 5901
- Timestamp:
- 08/04/08 13:20:28 (4 months ago)
- Files:
-
- rubricks_core/trunk/app/models/rubricks_component.rb (modified) (12 diffs)
- rubricks_core/trunk/app/models/rubricks_group.rb (modified) (1 diff)
- rubricks_core/trunk/app/models/rubricks_lib/rubricks_string_utils_lib.rb (modified) (1 diff)
- rubricks_core/trunk/app/models/rubricks_theme.rb (modified) (2 diffs)
- rubricks_core/trunk/components/system/admin_component/_main_component_install_window.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/admin_config/_main_tab_dashboard.rhtml (modified) (3 diffs)
- rubricks_core/trunk/components/system/admin_config/_main_tab_mail.rhtml (modified) (2 diffs)
- rubricks_core/trunk/components/system/admin_config/_main_tab_site.rhtml (modified) (13 diffs)
- rubricks_core/trunk/components/system/admin_config/_main_tab_user.rhtml (modified) (10 diffs)
- rubricks_core/trunk/components/system/admin_mobile/_main_tab_login.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/admin_skin/install_window.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/admin_theme/install_window.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/admin_trails/_main_trails_filter.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/dashboard/_index_config.rhtml (modified) (2 diffs)
- rubricks_core/trunk/components/system/search/_main_filter.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user/user_select.rhtml (modified) (1 diff)
- rubricks_core/trunk/vendor/plugins/rubricks/lib/action_view_user_management_helper.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
rubricks_core/trunk/app/models/rubricks_component.rb
r5789 r5901 38 38 end 39 39 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]) 42 43 rsi = RubricksSchemaInfo.find(:first) 43 44 current_schema_version = rsi.version … … 47 48 rsi.save! 48 49 rc = self.new 49 rc.name = component_name50 rc.name = options[:component_name] 50 51 rzip = Rzip.new(rc.path_of_rzip) 51 52 ci = rzip.component_info 52 ci.name = component_name53 ci.name = options[:component_name] 53 54 ci.validate 54 55 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? 59 58 RubricksLib.clear_temp_dir(true) 60 59 rzip.unrzip 61 60 RubricksLib.cp(rc.path_of_temp_component, RubricksLib::INSTALL_DIR, {:required => true}) 62 61 RubricksLib.rm("#{rc.path_of_temp_component}/_install") 63 RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) unless development_mode64 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) 67 66 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") 69 68 rsi = RubricksSchemaInfo.find(:first) 70 69 ActiveRecord::Base.transaction do 71 component_register( component_name, ci, rsi)70 component_register(rc.name, ci, rsi) 72 71 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? 77 76 rescue Exception => ex 78 77 begin … … 80 79 rsi.save! 81 80 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? 86 83 RubricksLib.rm(rc.path_of_installable_component) 87 RubricksLib.rm(rc.path_of_installed_component) unless development_mode84 RubricksLib.rm(rc.path_of_installed_component) if options[:development_mode].blank? 88 85 rescue Exception => ex_in_ex 89 86 logger.fatal(ex_in_ex.message) … … 178 175 end 179 176 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 181 179 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_mode180 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? 185 183 raise RubricksError::Common::ValidateException if rc.built_in 186 184 RubricksLib.clear_temp_dir … … 188 186 begin 189 187 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? 194 190 ActiveRecord::Base.transaction do 195 191 component_unregister(rc) 196 192 end 197 RubricksLib.static_file_updated 193 RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 198 194 rescue Exception => ex 199 195 begin 200 196 RubricksLib.rm("#{rc.path_of_temp_component}/_install") 201 RubricksLib.cp(rc.path_of_temp_component, RubricksLib::COMPONENT_DIR, {:required => true}) unless development_mode202 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? 203 199 rescue Exception => ex_in_ex 204 200 logger.fatal(ex_in_ex.message) … … 259 255 end 260 256 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]) 264 261 raise RubricksError::Common::ValidateException if rc.built_in 265 262 rsi = RubricksSchemaInfo.find(:first) … … 275 272 RubricksLib.clear_temp_dir 276 273 end 277 unless development_mode274 if options[:development_mode].blank? 278 275 old_dir = File.join(RubricksLib::COMPONENT_TEMP_DIR, 'old') 279 276 RubricksLib.mkdir(old_dir) … … 284 281 rsi.save! 285 282 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? 290 285 rzip.unrzip 291 286 RubricksLib.cp(rc.path_of_temp_component, RubricksLib::INSTALL_DIR, {:required => true}) 292 287 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_mode294 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? 295 290 ci = RubricksComponentInfo.create_from_component_path(rc.name, RubricksLib::INSTALL_DIR) 296 291 do_script(rc.name, UPDATE_BEFORE_SCRIPT_NAME) … … 478 473 RubricksLib.rm(RubricksComponent.path_of_rzip(rc.name)) 479 474 end 480 RubricksLib.static_file_updated 475 RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 481 476 rescue Exception => ex 482 477 begin … … 484 479 ActiveRecord::Migrator.migrate("#{RubricksComponent.path_of_installable_component(rc.name)}/_install/db", current_component_schema_version) 485 480 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? 491 484 old_dir = File.join(RubricksLib::COMPONENT_TEMP_DIR, 'old', rc.name) 492 485 RubricksLib.cp(old_dir, RubricksLib::INSTALL_DIR, {:required => true}) … … 494 487 RubricksLib.cp(old_dir, RubricksLib::COMPONENT_DIR, {:required => true}) 495 488 end 496 copy_static_files(rc) 489 copy_static_files(rc) if options[:ignore_static_files].blank? 497 490 rescue Exception => ex_in_ex 498 491 logger.fatal(ex_in_ex.message) … … 569 562 RubricksLib.server_reload if RubricksLib.server_control_executable? 570 563 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 571 570 end 572 571 rubricks_core/trunk/app/models/rubricks_group.rb
r5886 r5901 23 23 REGISTERED_GROUP_ID = 3 24 24 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] 26 26 end 27 27 rubricks_core/trunk/app/models/rubricks_lib/rubricks_string_utils_lib.rb
r5767 r5901 43 43 } 44 44 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])}"| 49 50 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])}"| 52 53 end 53 54 return clipped, popup rubricks_core/trunk/app/models/rubricks_theme.rb
r5318 r5901 90 90 end 91 91 92 def refresh_theme_files 92 def refresh_theme_files(*args) 93 options = args.flex :ignore_time_stamp 93 94 self.remove_theme_files 94 95 RubricksLib::PUBLIC_SUBDIR.each do |target| … … 101 102 end 102 103 end 103 RubricksLib.static_file_updated 104 RubricksLib.static_file_updated if options[:ignore_time_stamp].blank? 104 105 end 105 106 rubricks_core/trunk/components/system/admin_component/_main_component_install_window.rhtml
r5887 r5901 4 4 <tr class="rubricks_general_table_even"> 5 5 <td> 6 <select id="install_component_name" name="component_name" >6 <select id="install_component_name" name="component_name" style="width:100%;"> 7 7 <% @installable_components.each do |component| %> 8 8 <option value="<%= hl(component) %>"><%= hl(component) %></option> rubricks_core/trunk/components/system/admin_config/_main_tab_dashboard.rhtml
r5781 r5901 55 55 <td><%= hl('[_System_AdminConfig_ItemDashboardAvailable]') %></td> 56 56 <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();"> 58 58 <option value="true"<%= (RubricksConfig.get('dashboard_available')) ? ' selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 59 59 <option value="false"<%= (!RubricksConfig.get('dashboard_available')) ? ' selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 70 70 <tr class="rubricks_general_table_even"> 71 71 <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%;"> 73 73 <option value="true"<%= (rdw.visible) ? ' selected="selected"' : '' %>><%= hl('[_Common_Validity]') %></option> 74 74 <option value="false"<%= (!rdw.visible) ? ' selected="selected"' : '' %>><%= hl('[_Common_Invalidity]') %></option> … … 77 77 </td> 78 78 <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%;"> 80 80 <% @rdws_list.each do |rdws| %> 81 81 <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 94 94 <td> 95 95 <%= 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();"> 97 97 <option value="smtp"<%= (RubricksConfig.get('mail_method') == 'smtp') ? ' selected="selected"' : '' %>>SMTP</option> 98 98 <option value="sendmail"<%= (RubricksConfig.get('mail_method') == 'sendmail') ? ' selected="selected"' : '' %>>Sendmail</option> … … 133 133 <td> 134 134 <%= 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%;"> 136 136 <option value="plain"<%= (RubricksConfig.get('mail_smtp_password_encode') == 'plain' ) ? ' selected="selected"' : '' %>>Plain</option> 137 137 <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 186 186 <td><%= hl('[_System_AdminConfig_ItemSiteStartMenu]') %></td> 187 187 <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%;"> 189 189 <% @menu_item_list.each do |menu_item| %> 190 190 <option value="<%= hl(menu_item.id) %>"<%= (RubricksConfig.get('site_start_menu').to_i == menu_item.id) ? ' selected="selected"' : '' %>><%= hl(menu_item.title) %></option> … … 198 198 <td><%= hl('[_System_AdminConfig_ItemSiteSwitchHeader]') %></td> 199 199 <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%;"> 201 201 <option value="true"<%= (RubricksConfig.get('site_switch_header')) ? ' selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 202 202 <option value="false"<%= (!RubricksConfig.get('site_switch_header')) ? ' selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 219 219 <td> 220 220 <%= 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();"> 222 222 <% @language_list.each do |language| %> 223 223 <option value="<%= language %>" <%= (RubricksConfig.get('site_default_language') == language) ? 'selected="selected"' : '' %>><%= language %></option> … … 232 232 <td> 233 233 <%= 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%;"> 235 235 <option value="true" <%= (RubricksConfig.get('site_display_kana')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 236 236 <option value="false" <%= (!RubricksConfig.get('site_display_kana')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 244 244 <td><%= hl('[_System_AdminConfig_ItemSiteDefaultTheme]') %></td> 245 245 <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%;"> 247 247 <% @rt_list.each do |rt| %> 248 248 <option value="<%= hl(rt.name) %>"<%= (RubricksConfig.get('site_default_theme') == rt.name) ? ' selected="selected"' : '' %>><%= hl(rt.name) %></option> … … 256 256 <td><%= hl('[_System_AdminConfig_ItemSiteEnableMailLogin]') %></td> 257 257 <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%;"> 259 259 <option value="true" <%= (RubricksConfig.get('site_enable_mail_login')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 260 260 <option value="false" <%= (!RubricksConfig.get('site_enable_mail_login')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 268 268 <td> 269 269 <%= 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();"> 271 271 <option value="true" <%= (RubricksConfig.get('site_enable_auto_login')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 272 272 <option value="false" <%= (!RubricksConfig.get('site_enable_auto_login')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 287 287 <td><%= hl('[_System_AdminConfig_ItemSiteEnableBrowseUserInfo]') %></td> 288 288 <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%;"> 290 290 <option value="true" <%= (RubricksConfig.get('site_enable_browse_user_info')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 291 291 <option value="false" <%= (!RubricksConfig.get('site_enable_browse_user_info')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 298 298 <td><%= hl('[_System_AdminConfig_ItemSiteRecordTrails]') %></td> 299 299 <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%;"> 301 301 <option value="true" <%= (RubricksConfig.get('site_record_trails')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 302 302 <option value="false" <%= (!RubricksConfig.get('site_record_trails')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 320 320 <td><%= hl('[_System_AdminConfig_ItemSiteAttachmentType]') %></td> 321 321 <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%;"> 323 323 <option value="file" <%= (RubricksConfig.get('site_attachment_type') == 'file') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemSiteAttachmentTypeFile]') %></option> 324 324 <option value="database" <%= (RubricksConfig.get('site_attachment_type') == 'database') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemSiteAttachmentTypeDatabase]') %></option> … … 331 331 <td><%= hl('[_System_AdminConfig_ItemSiteAdvancedBlockManagement]') %></td> 332 332 <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%;"> 334 334 <option value="true" <%= (RubricksConfig.get('site_advanced_block_management')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 335 335 <option value="false" <%= (!RubricksConfig.get('site_advanced_block_management')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 343 343 <td> 344 344 <%= 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();"> 346 346 <option value="true" <%= (RubricksConfig.get('site_blockaged')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 347 347 <option value="false" <%= (!RubricksConfig.get('site_blockaged')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 378 378 <td><%= hl('[_System_AdminConfig_ItemSiteManagementIgnoreRefresh]') %></td> 379 379 <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%;"> 381 381 <option value="true" <%= (RubricksConfig.get('site_management_ignore_refresh')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 382 382 <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 184 184 <td> 185 185 <%= 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();"> 187 187 <option value="true" <%= (RubricksConfig.get('user_register')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 188 188 <option value="false" <%= (!RubricksConfig.get('user_register')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 195 195 <td> 196 196 <%= 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%;"> 198 198 <option value="none" <%= (RubricksConfig.get('user_admit') == 'none') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserAdmitNone]') %></option> 199 199 <option value="user" <%= (RubricksConfig.get('user_admit') == 'user') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserAdmitUser]') %></option> … … 223 223 <td><%= hl('[_System_AdminConfig_ItemUserLoginNameIntensity]') %></td> 224 224 <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%;"> 226 226 <% if @configuration[:data][:user_login_name_intensity].include?('low') %> 227 227 <option value="low" <%= (RubricksConfig.get('user_login_name_intensity') == 'low') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserLoginNameIntensityLow]') %></option> … … 253 253 <td><%= hl('[_System_AdminConfig_ItemUserPasswordIntensity]') %></td> 254 254 <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%;"> 256 256 <% if @configuration[:data][:user_password_intensity].include?('low') %> 257 257 <option value="low" <%= (RubricksConfig.get('user_password_intensity') == 'low') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserPasswordIntensityLow]') %></option> … … 280 280 <td><%= hl('[_System_AdminConfig_ItemUserPasswordReuseLimit]') %></td> 281 281 <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%;"> 283 283 <option value="0" <%= (RubricksConfig.get('user_password_reuse_limit') == 0) ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserPasswordReuseLimitNone]') %></option> 284 284 <% @configuration[:data][:user_password_reuse_limit].last.times do |i| %> … … 293 293 <td><%= hl('[_System_AdminConfig_ItemUserPasswordChangeForcibly]') %></td> 294 294 <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%;"> 296 296 <option value="true" <%= (RubricksConfig.get('user_password_change_forcibly')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 297 297 <option value="false" <%= (!RubricksConfig.get('user_password_change_forcibly')) ? 'selected="selected"' : '' %>><%= hl('[_Common_No]') %></option> … … 320 320 <td><%= hl('[_System_AdminConfig_ItemUserLockSilentPeriod]') %></td> 321 321 <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%;"> 323 323 <option value="0" <%= (RubricksConfig.get('user_lock_silent_period') == 0) ? 'selected="selected"' : '' %>><%= hl('[_Common_Indefinite]') %></option> 324 324 <% @configuration[:data][:user_lock_silent_period].last.times do |i| %> … … 333 333 <td><%= hl('[_System_AdminConfig_ItemUserPermitSilentPeriod]') %></td> 334 334 <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%;"> 336 336 <option value="0" <%= (RubricksConfig.get('user_permit_silent_period') == 0) ? 'selected="selected"' : '' %>><%= hl('[_Common_Indefinite]') %></option> 337 337 <% @configuration[:data][:user_permit_silent_period].last.times do |i| %> … … 346 346 <td><%= hl('[_System_AdminConfig_ItemUserManagementGroupDisplay]') %></td> 347 347 <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%;"> 349 349 <option value="list" <%= (RubricksConfig.get('user_management_group_display') == 'list') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserManagementGroupDisplayList]') %></option> 350 350 <option value="treeview" <%= (RubricksConfig.get('user_management_group_display') == 'treeview') ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemUserManagementGroupDisplayTreeview]') %></option> … … 372 372 <td> 373 373 <%= 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();"> 375 375 <option value="true" <%= (RubricksConfig.get('user_guest_available')) ? 'selected="selected"' : '' %>><%= hl('[_Common_Yes]') %></option> 376 376 <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 48 48 <td><%= hl('[_System_AdminConfig_ItemMobileLoginWithIdent]') %></td> 49 49 <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%;"> 51 51 <option value="none" <%= (RubricksConfig.get('mobile_login_with_ident') == 'none' ) ? 'selected="selected"' : '' %>><%= hl('[_System_AdminConfig_ItemMobileLoginWithIdentNone]') %></option> 52 52 <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 9 9 <tr class="rubricks_general_table_even"> 10 10 <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%;"> 12 12 <% @installable_skins.each do |skin| %> 13 13 <option value="<%= hl(skin) %>"><%= hl(skin) %></option> rubricks_core/trunk/components/system/admin_theme/install_window.rhtml
r5887 r5901 9 9 <tr class="rubricks_general_table_even"> 10 10 <td> 11 <select id="rubricks_theme_name" name="rubricks_theme[name]" >11 <select id="rubricks_theme_name" name="rubricks_theme[name]" style="width:100%;"> 12 12 <% @installable_themes.each do |theme| %> 13 13 <option value="<%= hl(theme) %>"><%= hl(theme) %></option> rubricks_core/trunk/components/system/admin_trails/_main_trails_filter.rhtml
r5887 r5901 16 16 <td><%= hl('[_Common_Component]') %></td> 17 17 <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%;"> 19 19 <option value="<%= hl(RubricksTrail::FILTER_DEFAULT[:trails_component_name]) %>" selected="selected"><%= hl(RubricksTrail::FILTER_DEFAULT[:trails_component_display_name]) %></option> 20 20 <% @rc_name_list.each_with_index do |rc_name, i| %> rubricks_core/trunk/components/system/dashboard/_index_config.rhtml
r5887 r5901 17 17 <td><%= hl(rdwi.rubricks_dashboard_widget.rubricks_block.title) %></td> 18 18 <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();"> 20 20 <% @hotkey_lists.each_with_index do |hotkey, i| %> 21 21 <option value="<%= hl(i) %>"<%= (i == rdwi.hotkey) ? ' selected="selected"' : '' %>><%= hl(hotkey) %></option> … … 25 25 </td> 26 26 <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%;"> 28 28 <% @skin_lists.each do |rdws| %> 29 29 <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 8 8 <td><%= hl('[_Common_SearchTarget][_Common_Colon]') %></td> 9 9 <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);"> 11 11 <option id="tc_all" value="all"<%= (@tc == 'all') ? ' selected="selected"' : '' %>>ALL</option> 12 12 <% @rc_list.each do |rc| %> rubricks_core/trunk/components/system/user/user_select.rhtml
r5887 r5901 62 62 }, 63 63 _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; 71 67 var el = document.createElement('option'); 72 68 return Object.extend(el, data); rubricks_core/trunk/vendor/plugins/rubricks/lib/action_view_user_management_helper.rb
r5781 r5901 6 6 limit ||= RubricksGroup::TREE_CHARACTER_LIMIT[tree_grade - 1] 7 7 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) 9 9 end 10 10
