Changeset 5912
- Timestamp:
- 08/13/08 13:46:18 (3 months ago)
- Files:
-
- rubricks_core/trunk/components/system/account/_user_show_print_content.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/account/user_show.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/languages/chinese.rb (modified) (1 diff)
- rubricks_core/trunk/components/system/languages/english.rb (modified) (1 diff)
- rubricks_core/trunk/components/system/languages/japanese.rb (modified) (2 diffs)
- rubricks_core/trunk/components/system/user/_group_list_line.rhtml (deleted)
- rubricks_core/trunk/components/system/user/group_list.rhtml (deleted)
- rubricks_core/trunk/components/system/user/group_select.rhtml (modified) (5 diffs)
- rubricks_core/trunk/components/system/user/user_select.rhtml (modified) (6 diffs)
- rubricks_core/trunk/components/system/user_controller.rb (modified) (4 diffs)
- rubricks_core/trunk/components/system/user_management/_group_show_tab_group_info_edit_content.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/_group_show_tab_group_info_print_content.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/_main_tab_group.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/_user_show_edit_content.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/_user_show_print_content.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/group_create_window.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/group_list.rhtml (deleted)
- rubricks_core/trunk/components/system/user_management/group_management_update_list_and_detail.rjs (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/group_management_update_list_without_detail.rjs (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/group_show.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/main.rhtml (modified) (2 diffs)
- rubricks_core/trunk/components/system/user_management/user_create_window.rhtml (modified) (1 diff)
- rubricks_core/trunk/components/system/user_management/user_show.rhtml (modified) (1 diff)
- rubricks_core/trunk/languages/english.rb (modified) (2 diffs)
- rubricks_core/trunk/languages/japanese.rb (modified) (2 diffs)
- rubricks_core/trunk/public/javascripts/components/system/src_system_user_management.js (modified) (22 diffs)
- rubricks_core/trunk/public/javascripts/components/system/system.js (modified) (19 diffs)
- rubricks_core/trunk/vendor/plugins/rubricks/lib/action_controller_user_management.rb (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
rubricks_core/trunk/components/system/account/_user_show_print_content.rhtml
r5834 r5912 70 70 </tr> 71 71 <% end %> 72 <% if group_tree? %> 73 <tr class="rubricks_general_table_even"> 74 <td><%= hl('[_Common_GroupBelongsTo]') %></td> 75 <td colspan="2"> 76 <div class="overflow_auto"> 77 <% @ru.rubricks_groups.delete_if{|rg| rg.private_component_id != RubricksComponent::RUBRICKS_SYSTEM_COMPONENT_ID}.each do |rg| %> 78 <p><%= hl(rg.name) %></p> 79 <% end %> 80 </div> 81 </td> 82 </tr> 83 <% end %> 72 <tr class="rubricks_general_table_even"> 73 <td><%= hl('[_Common_GroupBelongsTo]') %></td> 74 <td colspan="2"> 75 <div class="overflow_auto"> 76 <% @ru.rubricks_groups.delete_if{|rg| rg.private_component_id != RubricksComponent::RUBRICKS_SYSTEM_COMPONENT_ID}.each do |rg| %> 77 <p><%= hl(rg.name) %></p> 78 <% end %> 79 </div> 80 </td> 81 </tr> 84 82 <% if @editable_ru_columns['_Common_Signature'] %> 85 83 <tr class="rubricks_general_table_even"> rubricks_core/trunk/components/system/account/user_show.rhtml
r5745 r5912 38 38 </div> 39 39 </div> 40 <script type="text/javascript"> 40 <% end %> 41 <script type="text/javascript"> 42 (function() { 43 var functions = rubricks.system.admin_user.functions; 41 44 rubricks.common.FormEditor.readMode('user_management_area'); 42 rubricks.system.admin_user.functions.print_target_set('account', '<%= hl(@ru.id) %>', ''); 43 </script> 44 <% end %> 45 functions.print_target_set('account', '<%= hl(@ru.id) %>', ''); 46 functions.detail_area_show(); 47 })(); 48 </script> rubricks_core/trunk/components/system/languages/chinese.rb
r5860 r5912 478 478 å«è±æã»æ°åã', 479 479 '_System_Login_MessageChangePasswordReuseLimit' => 'æè¿%dæ¬¡çæ§å¯ç äžèœéæ°äœ¿çšã', 480 '_System_Login_MessageRelease' => '2008/0 7/14 çæ¬éç¥ (version1.02)',480 '_System_Login_MessageRelease' => '2008/08/07 çæ¬éç¥ (version1.02.1)', 481 481 '_System_Login_PasswordConfirm' => '[确讀]', 482 482 '_System_Login_PasswordNew' => 'æ°å¯ç ', rubricks_core/trunk/components/system/languages/english.rb
r5848 r5912 115 115 '_System_AdminConfig_ItemSiteEnableMailLogin' => 'Permit to login with email address', 116 116 '_System_AdminConfig_ItemSiteManagementIgnoreRefresh' => 'Ignore page refresh through site management', 117 '_System_AdminConfig_ItemSiteMultilingual' => 'Support multi language environment', 117 118 '_System_AdminConfig_ItemSiteName' => 'Site Name', 118 119 '_System_AdminConfig_ItemSiteProxy' => 'HTTP Proxy', rubricks_core/trunk/components/system/languages/japanese.rb
r5848 r5912 151 151 '_System_AdminConfig_ItemSiteEnableMailLogin' => 'ã¡ãŒã«ã¢ãã¬ã¹ã«ãããã°ã€ã³ãèš±å¯', 152 152 '_System_AdminConfig_ItemSiteManagementIgnoreRefresh' => 'ãµã€ã管çæã«åèªèŸŒãæå¶ãã', 153 '_System_AdminConfig_ItemSiteMultilingual' => 'å€èšèªæ··åšç°å¢ã§å©çšãã', 153 154 '_System_AdminConfig_ItemSiteName' => 'ãµã€ãå', 154 155 '_System_AdminConfig_ItemSiteProxy' => 'HTTPãããã·', … … 495 496 èŠããããŸãã', 496 497 '_System_Login_MessageChangePasswordReuseLimit' => 'éå»%dååã®ãã¹ã¯ãŒããåå©çšããããšã¯ã§ããŸããã', 497 '_System_Login_MessageRelease' => '2008/0 7/14 ããŒãžã§ã³ã¢ããã®ãç¥ãã (version1.02)',498 '_System_Login_MessageRelease' => '2008/08/07 远å ãªãªãŒã¹ã®ãç¥ãã (version1.02.1)', 498 499 '_System_Login_PasswordConfirm' => '[確èªå 499 500 ¥å]', rubricks_core/trunk/components/system/user/group_select.rhtml
r5887 r5912 12 12 this.callbacks.before_cancel(); 13 13 <% if @options[:refresh] %> 14 <% if @group_tree %>15 var tree = this.group_tree;14 var tree = this.group_tree; 15 if(tree) { 16 16 if(tree.selected) { 17 17 tree.selectEffect(tree.selected.id); … … 21 21 tree.selectEffect(target_el); 22 22 } 23 <% else %> 24 this.group_list.unselectAll(); 25 <% end %> 23 } 26 24 <% end %> 25 this.refresh_buttons(); 27 26 this.callbacks.after_cancel(); 28 27 }, 29 group_list_change_grade: function(event, rg_id) { 30 Event.stop(event); 31 new Ajax.Updater( 32 "<%= hl(@options[:prefix]) %>group_list_frame", 33 "<%= url_for(:controller => '/system/user', :action => 'group_list') %>", 34 { 35 asynchronous:true, 36 evalScripts:true, 37 parameters:{id:rg_id, options:'<%= @params_options %>'}, 38 onLoaded:function(request){rubricks.common.rubricks_wait_message_close();}, 39 onLoading:function(request){rubricks.common.rubricks_wait_message_open();} 28 refresh_buttons: function() { 29 if(<%= @options[:submittable_always].blank?.to_s %>) { 30 var tree = this.group_tree; 31 if(tree.selected) { 32 this._form_enable(); 33 } else { 34 this._form_disable(); 40 35 } 41 );36 } 42 37 }, 43 38 submit: function() { … … 45 40 this._initial_selected = selected[0]; 46 41 this.callbacks.before_submit(selected[0], selected[1]); 42 this.refresh_buttons(); 47 43 this.callbacks.after_submit(selected[0], selected[1]); 48 44 }, 45 _form_disable: function() { 46 if(<%= @options[:submittable_always].blank?.to_s %>) { 47 var button = $('<%= hl(@options[:prefix]) %>submit_button'); 48 button.disabled = true; 49 if(!Element.hasClassName(button, 'disabled')) { 50 Element.addClassName(button, 'disabled'); 51 } 52 } 53 }, 54 _form_enable: function() { 55 if(<%= @options[:submittable_always].blank?.to_s %>) { 56 var button = $('<%= hl(@options[:prefix]) %>submit_button'); 57 button.disabled = false; 58 if(Element.hasClassName(button, 'disabled')) { 59 Element.removeClassName(button, 'disabled'); 60 } 61 } 62 }, 49 63 _get_selected: function() { 50 var targetGroupId = null; 51 var targetGroupName = null; 52 <% if @group_tree %> 53 var selected = this.group_tree.selected; 64 var tg_id = null; 65 var tg_name = null; 66 var tree = this.group_tree; 67 if(tree) { 68 var selected = tree.selected; 54 69 if(selected) { 55 t argetGroupId = selected.id.replace(/^<%= hl(@options[:prefix]) %>group_tree_group_/, '');56 if(t argetGroupId) {57 var targetGroup = $("<%= hl(@options[:prefix]) %>rg_" + targetGroupId);58 t argetGroupName = (targetGroup.title) ? targetGroup.title : targetGroup.innerHTML;70 tg_id = selected.id.replace(/^<%= hl(@options[:prefix]) %>group_tree_group_/, ''); 71 if(tg_id) { 72 var obj = $("<%= hl(@options[:prefix]) %>rg_" + tg_id); 73 tg_name = (obj.title) ? obj.title : obj.innerHTML; 59 74 } 60 75 } 61 <% else %> 62 targetGroupId = rubricks.system.user.group_select.<%= hl(@options[:prefix]) %>.group_list.getSelected()[0]; 63 if(targetGroupId) { 64 targetGroupName = $("<%= hl(@options[:prefix]) %>group_list_group_" + targetGroupId).innerHTML; 65 } 66 <% end %> 67 return [targetGroupId, targetGroupName]; 76 } 77 return [tg_id, tg_name]; 68 78 } 69 79 }; … … 72 82 <div id="<%= hl(@options[:prefix]) %>select_frame"> 73 83 <div class="system_user_select_frame system_user_border rubricks_list_body_color rubricks_general_table_border"> 74 <% if @group_tree %> 75 <div class="system_admin_user_group_tree"> 76 <% render_treeview(@root_rg_list, "#{hl(@options[:prefix])}group_tree", "rubricks.system.user.group_select.#{hl(@options[:prefix])}.group_tree", {:enableUnselected => ((@options[:allow_unselect]) ? 'true' : 'false'), :initialSelected => "#{hl(@options[:prefix])}group_tree_group_#{@options[:initial_selected]}"}, true) do |rg| %> 77 <%= render_group(rg, "#{hl(@options[:prefix])}rg_") %> 78 <% end %> 79 </div> 80 <% else %> 81 <div id="<%= hl(@options[:prefix]) %>group_list_frame" class="system_user_select_list rubricks_general_filter_border"> 82 <%= simple_render_component('/system/user', 'group_list', {:options => @options}) %> 83 </div> 84 <% end %> 84 <div class="system_admin_user_group_tree"> 85 <% render_treeview(@root_rg_list, "#{hl(@options[:prefix])}group_tree", "rubricks.system.user.group_select.#{hl(@options[:prefix])}.group_tree", {:callBackFunctions => "[function() {rubricks.system.user.group_select.#{hl(@options[:prefix])}._form_enable();}]", :enableUnselected => ((@options[:allow_unselect]) ? 'true' : 'false'), :initialSelected => "#{hl(@options[:prefix])}group_tree_group_#{@options[:initial_selected]}", :unselected => "function() {rubricks.system.user.group_select.#{hl(@options[:prefix])}._form_disable();}"}, true) do |rg| %> 86 <%= render_group(rg, "#{hl(@options[:prefix])}rg_") %> 87 <% end %> 88 </div> 85 89 </div> 86 90 <% form_tag({:controller => '/'}, {:id => "#{hl(@options[:prefix])}form"}) do %> … … 91 95 <% end %> 92 96 </div> 97 <script type="text/javascript"> 98 rubricks.system.user.group_select.<%= hl(@options[:prefix]) %>.refresh_buttons(); 99 </script> rubricks_core/trunk/components/system/user/user_select.rhtml
r5901 r5912 36 36 ); 37 37 } 38 this.refresh_buttons(); 38 39 SpinelzUtil._redrawForIE('rubricks_all_division'); 39 40 this.callbacks.after_add(); … … 42 43 this.callbacks.before_cancel(); 43 44 this._select_box_reset(); 45 this.refresh_buttons(); 44 46 this.callbacks.after_cancel(); 45 47 }, … … 48 50 rubricks.common.fire_onsubmit("<%= hl(@options[:prefix]) %>filter_form"); 49 51 }, 52 refresh_buttons: function() { 53 if(<%= @options[:submittable_always].blank?.to_s %>) { 54 var el_select = $("<%= hl(@options[:prefix]) %>selected"); 55 if(el_select.length > 0) { 56 this._form_enable(); 57 } else { 58 this._form_disable(); 59 } 60 } 61 }, 50 62 remove: function() { 51 63 this.callbacks.before_remove(); 52 64 var el_select = $("<%= hl(@options[:prefix]) %>selected"); 53 65 $A(el_select).each(function(el) {if(el.selected) {el_select.removeChild(el);}}); 66 this.refresh_buttons(); 54 67 SpinelzUtil._redrawForIE('rubricks_all_division'); 55 68 this.callbacks.after_remove(); … … 58 71 var selected = this._get_selected(); 59 72 this._select_box_reset(); 73 this.refresh_buttons(); 60 74 this.callbacks.before_submit(selected[0], selected[1]); 61 75 this.callbacks.after_submit(selected[0], selected[1]); … … 67 81 var el = document.createElement('option'); 68 82 return Object.extend(el, data); 83 }, 84 _form_disable: function() { 85 if(<%= @options[:submittable_always].blank?.to_s %>) { 86 var button = $('<%= hl(@options[:prefix]) %>submit_button'); 87 button.disabled = true; 88 if(!Element.hasClassName(button, 'disabled')) { 89 Element.addClassName(button, 'disabled'); 90 } 91 } 92 }, 93 _form_enable: function() { 94 if(<%= @options[:submittable_always].blank?.to_s %>) { 95 var button = $('<%= hl(@options[:prefix]) %>submit_button'); 96 button.disabled = false; 97 if(Element.hasClassName(button, 'disabled')) { 98 Element.removeClassName(button, 'disabled'); 99 } 100 } 69 101 }, 70 102 _get_selected: function() { … … 178 210 <script type="text/javascript"> 179 211 rubricks.system.user.user_select.<%= hl(@options[:prefix]) %>.initial_data = $A($("<%= hl(@options[:prefix]) %>selected")); 212 rubricks.system.user.user_select.<%= hl(@options[:prefix]) %>.refresh_buttons(); 180 213 </script> rubricks_core/trunk/components/system/user_controller.rb
r5820 r5912 2 2 uses_component_template_root 3 3 authorize :access, :component => :system 4 5 def group_list6 @options = fix_options(params[:options])7 @params_options = @options.to_json.json_fix_special_char8 @rg = RubricksGroup.find_effective_group(params[:id]) rescue nil9 conditions = (@rg) ? ['effective = true and private_component_id = ? and parent_id = ?', @options[:private_component_id], @rg.id] : ['effective = true and private_component_id = ? and parent_id is NULL', @options[:private_component_id]]10 @pages, @rg_list = paginate(:rubricks_group, :conditions => conditions, :order => 'rubricks_groups.kana, rubricks_groups.name asc', :per_page => RubricksLib::LIST_PER_PAGE)11 end12 4 13 5 def group_select … … 22 14 :str_cancel_button => '[_Common_Cancel]', 23 15 :str_submit_button => '[_Common_Decide]', 16 :submittable_always => true, 24 17 }.merge(input_options) 25 @params_options = @options.to_json.json_fix_special_char 26 @group_tree = (group_tree?) ? true : false 27 if @group_tree 28 @root_rg_list = RubricksGroup.find_rubricks_groups(:root => true, :rc_id => @options[:private_component_id]) 29 end 18 @root_rg_list = RubricksGroup.find_rubricks_groups(:root => true, :rc_id => @options[:private_component_id]) 30 19 end 31 20 … … 60 49 :str_selected_title => '[_System_User_TargetUser]', 61 50 :str_submit_button => '[_Common_Decide]', 51 :submittable_always => true, 62 52 }.merge(input_options) 63 53 @options[:limit_msg] ||= (@options[:limit] <= 1) ? '[_System_User_MessageUserLimitSingle]' : RubricksLib.hl(['[_System_User_MessageUserLimitMultiple]', @options[:limit]]) … … 78 68 end 79 69 return options 80 end81 82 def group_tree?83 RubricksConfig.get('user_management_group_display') == 'treeview'84 70 end 85 71 rubricks_core/trunk/components/system/user_management/_group_show_tab_group_info_edit_content.rhtml
r5820 r5912 8 8 </td> 9 9 </tr> 10 <% if RubricksLib.current_lang == 'japanese' %> 11 <tr class="rubricks_general_table_even"> 12 <td><%= hl('[_Common_Kana]') %></td> 13 <td> 14 <%= validate 'rubricks_group_edit_kana', [{:required => true}, {:length => '1..64'}, {:kana => true}] %> 15 <%= text_field 'rubricks_group_edit', 'kana', :size => 20, :class => 'input_text_inactive focus', :value => l(@rg.kana) %> 16 <span id="rubricks_group_edit_kana_msg"></span> 17 </td> 18 </tr> 19 <% end %> 10 <tr class="rubricks_general_table_even"> 11 <td><%= hl('[_Common_SortKey]') %></td> 12 <td> 13 <%= validate 'rubricks_group_edit_sort_key', [{:length => '0..16'}, {:sort_key => true}] %> 14 <%= text_field 'rubricks_group_edit', 'sort_key', :size => 20, :class => 'input_text_inactive focus', :value => l(@rg.sort_key) %> 15 <span id="rubricks_group_edit_sort_key_msg"></span> 16 </td> 17 </tr> 20 18 <tr class="rubricks_general_table_even"> 21 19 <td><%= hl('[_Common_Description]') %></td> rubricks_core/trunk/components/system/user_management/_group_show_tab_group_info_print_content.rhtml
r5277 r5912 4 4 <td style="width:70%;"><div class="overflow_auto"><%= hl(@rg.name) %></div></td> 5 5 </tr> 6 <% if RubricksLib.current_lang == 'japanese' && RubricksConfig.get('site_display_kana') %> 7 <tr class="rubricks_general_table_even"> 8 <td><%= hl('[_Common_Kana]') %></td> 9 <td><div class="overflow_auto"><%= hl(@rg.kana) %></div></td> 10 </tr> 11 <% end %> 6 <tr class="rubricks_general_table_even"> 7 <td><%= hl('[_Common_SortKey]') %></td> 8 <td><div class="overflow_auto"><%= hl(@rg.sort_key) %></div></td> 9 </tr> 12 10 <tr class="rubricks_general_table_even"> 13 11 <td><%= hl('[_Common_Description]') %></td> rubricks_core/trunk/components/system/user_management/_main_tab_group.rhtml
r5355 r5912 5 5 <%= @group_tree %> 6 6 </div> 7 <% else %>8 <div id="rubricks_group_list_frame">9 <%= @group_list %>10 </div>11 7 <% end %> 12 8 <% end %> rubricks_core/trunk/components/system/user_management/_user_show_edit_content.rhtml
r5834 r5912 77 77 </td> 78 78 </tr> 79 <% if group_tree? &&@ru.effective %>79 <% if @ru.effective %> 80 80 <tr class="rubricks_general_table_even"> 81 81 <td><%= hl('[_Common_GroupBelongsTo]') %></td> rubricks_core/trunk/components/system/user_management/_user_show_print_content.rhtml
r5834 r5912 62 62 <td colspan="2"><div class="overflow_auto"><%= hl(@ru.rubricks_theme_name) %></div></td> 63 63 </tr> 64 <% if group_tree? %> 65 <tr class="rubricks_general_table_even"> 66 <td><%= hl('[_Common_GroupBelongsTo]') %></td> 67 <td colspan="2"> 68 <div class="overflow_auto"> 69 <% @ru.rubricks_groups.delete_if{|rg| rg.private_component_id != RubricksComponent::RUBRICKS_SYSTEM_COMPONENT_ID}.each do |rg| %> 70 <p><%= hl(rg.name) %></p> 71 <% end %> 72 </div> 73 </td> 74 </tr> 75 <% end %> 64 <tr class="rubricks_general_table_even"> 65 <td><%= hl('[_Common_GroupBelongsTo]') %></td> 66 <td colspan="2"> 67 <div class="overflow_auto"> 68 <% @ru.rubricks_groups.delete_if{|rg| rg.private_component_id != RubricksComponent::RUBRICKS_SYSTEM_COMPONENT_ID}.each do |rg| %> 69 <p><%= hl(rg.name) %></p> 70 <% end %> 71 </div> 72 </td> 73 </tr> 76 74 <% @additional_function[:user_show_column][:read].each do |partial| %> 77 75 <%= render :partial => partial %> rubricks_core/trunk/components/system/user_management/group_create_window.rhtml
r5887 r5912 6 6 <tr class="rubricks_general_table_even"> 7 7 <td style="width:20%;"><%= hl(@options[:str_group_name]) %></td> 8 <%= validate 'rubricks_group_name', [{:required => true}, {:length => {:value => '1..64'}}, {:regexp => {:value => "/#{l('[_Common_GroupNameFormat]')}/", :msg => hl('[_System_AdminUser_MessageGroupNameFormat]')}}] %> 9 <td style="width:80%;"><%= text_field 'rubricks_group', 'name', :size => 20, :class => 'input_text_inactive focus' %><span id="rubricks_group_name_msg"></span></td> 8 <td style="width:80%;"> 9 <%= validate 'rubricks_group_name', [{:required => true}, {:length => {:value => '1..64'}}, {:regexp => {:value => "/#{l('[_Common_GroupNameFormat]')}/", :msg => hl('[_System_AdminUser_MessageGroupNameFormat]')}}] %> 10 <%= text_field 'rubricks_group', 'name', :size => 20, :class => 'input_text_inactive focus' %> 11 <span id="rubricks_group_name_msg"></span> 12 </td> 10 13 </tr> 11 <% if RubricksLib.current_lang == 'japanese' %> 12 <tr class="rubricks_general_table_even"> 13 <td><%= hl('[_Common_Kana]') %></td> 14 <%= validate 'rubricks_group_kana', [{:required => true}, {:length => '1..64'}, {:kana => true}] %> 15 <td><%= text_field 'rubricks_group', 'kana', :size => 20, :class => 'input_text_inactive focus' %><span id="rubricks_group_kana_msg"></span></td> 16 </tr> 17 <% end %> 14 <tr class="rubricks_general_table_even"> 15 <td><%= hl('[_Common_SortKey]') %></td> 16 <td> 17 <%= validate 'rubricks_group_sort_key', [{:length => '0..16'}, {:sort_key => true}] %> 18 <%= text_field 'rubricks_group', 'sort_key', :size => 20, :class => 'input_text_inactive focus' %> 19 <span id="rubricks_group_sort_key_msg"></span> 20 </td> 21 </tr> 18 22 <tr class="rubricks_general_table_even"> 19 23 <td><%= hl('[_Common_Description]') %></td> 20 <%= validate 'rubricks_group_description', [{:length => {:value => '0..80'}}] %> 21 <td><%= text_field 'rubricks_group', 'description', :size => 32, :class => 'input_text_inactive focus' %><span id="rubricks_group_description_msg"></span></td> 24 <td> 25 <%= validate 'rubricks_group_description', [{:length => {:value => '0..80'}}] %> 26 <%= text_field 'rubricks_group', 'description', :size => 32, :class => 'input_text_inactive focus' %> 27 <span id="rubricks_group_description_msg"></span> 28 </td> 22 29 </tr> 23 30 <tr class="rubricks_general_table_even"> rubricks_core/trunk/components/system/user_management/group_management_update_list_and_detail.rjs
r5745 r5912 3 3 page << %Q|rubricks.system.admin_user.variables.group_changed = true;| 4 4 page << %Q|Element.update($('rubricks_group_tree_frame'), #{@group_tree.to_json});| unless @group_tree.nil? 5 page << %Q|Element.update($('rubricks_group_list_frame'), #{@group_list.to_json});| unless @group_list.nil?6 5 page << %Q|Element.update($('user_management_detail'), #{@detail.to_json});| 7 6 page << %Q|rubricks.system.admin_user.functions.detail_area_show();| rubricks_core/trunk/components/system/user_management/group_management_update_list_without_detail.rjs
r5781 r5912 3 3 page << %Q|rubricks.system.admin_user.variables.group_changed = true;| 4 4 page << %Q|Element.update($('rubricks_group_tree_frame'), #{@group_tree.to_json});| unless @group_tree.nil? 5 page << %Q|Element.update($('rubricks_group_list_frame'), #{@group_list.to_json});| unless @group_list.nil?6 5 page << <<-"EOS" 7 6 if(AjaxHistoryPageManager.getSpecifiedValue('rubricks_system_admin_user') == '') { rubricks_core/trunk/components/system/user_management/group_show.rhtml
r5355 r5912 10 10 <script type="text/javascript"> 11 11 (function() { 12 var variables = rubricks.system.admin_user.variables;13 var target = variables.print_group_tab[<%= hl(@tab) %>];14 if(!target) {15 target ='group_info';16 }17 rubricks.system.admin_user.functions.print_target_set(target, '<%= hl(@rg.id) %>', '0');12 var admin_user = rubricks.system.admin_user; 13 var functions = admin_user.functions; 14 var variables = admin_user.variables; 15 var target = variables.print_group_tab[<%= hl(@tab) %>] || 'group_info'; 16 functions.print_target_set(target, '<%= hl(@rg.id) %>', '0'); 17 functions.detail_area_show(); 18 18 variables.flg_group_user_edit_window_loaded = false; 19 19 })(); rubricks_core/trunk/components/system/user_management/main.rhtml
r5791 r5912 10 10 flg_user_import_window_loaded: false, 11 11 group_grade_limit: <%= hl(RubricksGroup::TREE_GRADE_LIMIT) %>, 12 group_tree: <%= (@group_tree) ? 'true' : 'false' %>,13 12 msg_group_grade_limit: "<%= hl(@options[:msg_group_grade_limit]) %>", 14 13 msg_user_admit_confirm: "<%= hl(@options[:msg_user_admit_confirm]) %>", … … 23 22 url_group_create_window: "<%= url_for(:controller => params[:controller].sub(%r(^/?), '/'), :action => 'group_create_window') %>", 24 23 url_group_delete: "<%= url_for(:controller => params[:controller].sub(%r(^/?), '/'), :action => 'group_delete') %>", 25 url_group_list: "<%= url_for(:controller => params[:controller].sub(%r(^/?), '/'), :action => 'group_list') %>",26 24 url_group_show: "<%= url_for(:controller => params[:controller].sub(%r(^/?), '/'), :action => 'group_show') %>", 27 25 url_group_tree: "<%= url_for(:controller => params[:controller].sub(%r(^/?), '/'), :action => 'group_tree') %>", rubricks_core/trunk/components/system/user_management/user_create_window.rhtml
r5887 r5912 82 82 </td> 83 83 </tr> 84 <% if group_tree? %> 85 <tr class="rubricks_general_table_even"> 86 <td><%= hl('[_Common_GroupBelongsTo]') %></td> 87 <td> 88 <div class="overflow_auto"> 89 <% @user_rg_list.each do |rg| %> 90 <p> 91 <input type="checkbox" id="rubricks_user_groups_<%= hl(rg.id) %>" name="rubricks_user[groups][]" value="<%= hl(rg.id) %>" class="check" /> 92 <label for="rubricks_user_groups_<%= hl(rg.id) %>"><%= hl(rg.name) %></label> 93 </p> 94 <% end %> 95 </div> 96 </td> 97 </tr> 98 <% end %> 84 <tr class="rubricks_general_table_even"> 85 <td><%= hl('[_Common_GroupBelongsTo]') %></td> 86 <td> 87 <div class="overflow_auto"> 88 <% @user_rg_list.each do |rg| %> 89 <p> 90 <input type="checkbox" id="rubricks_user_groups_<%= hl(rg.id) %>" name="rubricks_user[groups][]" value="<%= hl(rg.id) %>" class="check" /> 91 <label for="rubricks_user_groups_<%= hl(rg.id) %>"><%= hl(rg.name) %></label> 92 </p> 93 <% end %> 94 </div> 95 </td> 96 </tr> 99 97 <% @additional_function[:user_show_column][:create].each do |partial| %> 100 98 <%= render :partial => partial %> rubricks_core/trunk/components/system/user_management/user_show.rhtml
r5745 r5912 61 61 </div> 62 62 </div> 63 <script type="text/javascript">64 rubricks.common.FormEditor.readMode('user_management_area');65 rubricks.system.admin_user.functions.print_target_set('user', '<%= hl(@ru.id) %>', '');66 </script>67 63 <% end %> 68 64 <% @additional_function[:user_show_window].each do |partial| %> 69 65 <%= render :partial => partial %> 70 66 <% end %> 67 <script type="text/javascript"> 68 (function() { 69 var functions = rubricks.system.admin_user.functions; 70 rubricks.common.FormEditor.readMode('user_management_area'); 71 functions.print_target_set('user', '<%= hl(@ru.id) %>', ''); 72 functions.detail_area_show(); 73 })(); 74 </script> rubricks_core/trunk/languages/english.rb
r5834 r5912 285 285 '_Common_Signature' => 'Signature', 286 286 '_Common_SiteAdmin' => 'Site Admin', 287 '_Common_Sort' => 'Sort', 288 '_Common_SortKey' => 'Sort Key', 289 '_Common_SortKeyFormat' => '^[a-z0-9]*$', 287 290 '_Common_SortKeyUserId' => 'User ID', 288 291 '_Common_SortKeyUserName' => 'User Name', … … 380 383 '_Common_Validate_Regulation' => 'plz agree to the regulation.', 381 384 '_Common_Validate_Required' => 'required.', 385 '_Common_Validate_SortKey' => 'plz input lower case alphanumeric.', 382 386 '_Common_Validate_Url' => 'invalid url.', 383 387 '_Common_Validate_ValidEmail' => 'invalid email address.', rubricks_core/trunk/languages/japanese.rb
r5834 r5912 320 320 '_Common_SiteAdmin' => 'ãµã€ã管çè 321 321 ', 322 '_Common_Sort' => 'ãœãŒã', 323 '_Common_SortKey' => 'ãœãŒãããŒ', 324 '_Common_SortKeyFormat' => '^[a-z0-9]*$', 322 325 '_Common_SortKeyUserId' => 'ãŠãŒã¶IDã®', 323 326 '_Common_SortKeyUserName' => 'ãŠãŒã¶å(ãã¿ããª)ã®', … … 443 446 ¥åã¯å¿ 444 447 é ã§ãã', 448 '_Common_Validate_SortKey' => 'åè§å°æåã®ã¢ã«ãã¡ããããããã¯æ°åã§å 449 ¥åããŠãã ããã', 445 450 '_Common_Validate_Url' => 'äžæ£ãªURL圢åŒã§ãã', 446 451 '_Common_Validate_ValidEmail' => 'äžæ£ãªeã¡ãŒã«åœ¢åŒã§ãã', rubricks_core/trunk/public/javascripts/components/system/src_system_user_management.js
r5833 r5912 47 47 if(variables.flg_group_create_window_loaded) { 48 48 this.group_create_form_clear(); 49 if(variables.group_tree) { 50 if(variables.rubricks_group_tree) { 51 if(variables.rubricks_group_tree.getHierarchyNumber() >= variables.group_grade_limit) { 52 rubricks.common.rubricks_message_window_open(variables.msg_group_grade_limit, 'error'); 53 return false; 49 if(variables.rubricks_group_tree) { 50 if(variables.rubricks_group_tree.getHierarchyNumber() >= variables.group_grade_limit) { 51 rubricks.common.rubricks_message_window_open(variables.msg_group_grade_limit, 'error'); 52 return false; 53 } else { 54 if(variables.rubricks_group_tree.selected) { 55 var rg_id = variables.rubricks_group_tree.selected.id.replace(/^rubricks_group_tree_group_/, ''); 56 $('rubricks_group_parent_id').value = rg_id; 54 57 } else { 55 if(variables.rubricks_group_tree.selected) { 56 var rg_id = variables.rubricks_group_tree.selected.id.replace(/^rubricks_group_tree_group_/, ''); 57 $('rubricks_group_parent_id').value = rg_id; 58 } else { 59 $('rubricks_group_parent_id').value = ''; 60 } 61 } 62 } 63 } else { 64 var rubricks_group_list = variables.rubricks_group_list; 65 if(rubricks_group_list) { 66 if(variables.group_grade >= variables.group_grade_limit - 1) { 67 rubricks.common.rubricks_message_window_open(variables.msg_group_grade_limit, 'error'); 68 return false; 69 } else { 70 if(rubricks_group_list.getSelected().length > 0) { 71 $('rubricks_group_parent_id').value = rubricks_group_list.getSelected(); 72 } else { 73 $('rubricks_group_parent_id').value = variables.parent_group_id; 74 } 58 $('rubricks_group_parent_id').value = ''; 75 59 } 76 60 } … … 90 74 asynchronous: true, 91 75 evalScripts: true, 92 onLoading: function(request) {rubricks.common.rubricks_wait_message_open();}76 onLoading: function(request) {rubricks.common.rubricks_wait_message_open();} 93 77 } 94 78 ); … … 101 85 evalScripts: true, 102 86 parameters: {delete_id:delete_id_str}, 103 onLoaded: function(request) {rubricks.common.rubricks_wait_message_close();},104 onLoading: function(request) {rubricks.common.rubricks_wait_message_open();}87 onLoaded: function(request) {rubricks.common.rubricks_wait_message_close();}, 88 onLoading: function(request) {rubricks.common.rubricks_wait_message_open();} 105 89 } 106 90 ); … … 110 94 rubricks.common.FormEditor.editMode('group_info_management_area'); 111 95 }, 112 group_list_change_grade: function(event, rg_id) {113 Event.stop(event);114 this.refresh_group_list(rg_id, true);115 },116 96 group_permission_edit_mode: function() { 117 97 rubricks.common.FormEditor.editMode('group_permission_management_area'); … … 134 114 }, 135 115 group_select_effect: function(rg_id) { 136 var variables = rubricks.system.admin_user.variables; 137 if(variables.group_tree) { 138 variables.rubricks_group_tree.selectEffect('rubricks_group_tree_group_' + rg_id, {enableUnselected:false}); 139 } else { 140 var rubricks_group_list = variables.rubricks_group_list; 141 if(rubricks_group_list) { 142 var selected = rubricks_group_list.getSelected(); 143 if(selected[0] != rg_id) { 144 rubricks_group_list.unselectAll(); 145 rubricks_group_list.selectEffect(rubricks_group_list.buildTrId(rg_id)); 146 } 147 } 148 } 116 rubricks.system.admin_user.variables.rubricks_group_tree.selectEffect('rubricks_group_tree_group_' + rg_id, {enableUnselected:false}); 149 117 }, 150 118 group_tab_activate: function() { 151 119 this.group_tab_activate_effect(); 152 SelectableTableManager.activate('rubricks_group_list');153 120 }, 154 121 group_tab_activate_effect: function() { … … 179 146 evalScripts: true, 180 147 parameters: {id:variables.target_group_id}, 181 onLoading: function(request) {rubricks.common.rubricks_wait_message_open();}148 onLoading: function(request) {rubricks.common.rubricks_wait_message_open();} 182 149 } 183 150 ); … … 230 197 } 231 198 }, 232 refresh_group_list: function(rg_id, show_wait, focus_id) {233 var variables = rubricks.system.admin_user.variables;234 if(!variables.group_tree) {235 var options;236 var params = {id:rg_id, focus_id:focus_id};237 if(show_wait) {238 options = {239 asynchronous:true,240 evalScripts:true,241 parameters:params,242 onLoaded:function(request){rubricks.common.rubricks_wait_message_close();},243 onLoading:function(request){rubricks.common.rubricks_wait_message_open();}244 };245 } else {246 options = {247 as
