diff --git a/app/assets/javascripts/basic/orbit_js_1.0.1.js b/app/assets/javascripts/basic/orbit_js_1.0.1.js index 3e9e5f69..b030bc9d 100644 --- a/app/assets/javascripts/basic/orbit_js_1.0.1.js +++ b/app/assets/javascripts/basic/orbit_js_1.0.1.js @@ -38,7 +38,11 @@ if($.support.touch) { $checked.each(function() { if(!$(this).closest('div').hasClass('togglebox')) { $(this).wrap('
'); - $(this).wrap(''); + if($(this).attr('type') == "hidden" && $(this).attr('value')) { + $(this).wrap(''); + } else { + $(this).wrap(''); + } $('').insertAfter($(this)); if($(this).data().deploy) { switch($(this).data().deploy) { @@ -252,8 +256,8 @@ if($.support.touch) { $arrow = $('.sub-nav-arrow'), $wrap = $('#main-wrap'), $wrapLeft = $wrap.css('margin-left'), - $position = 0, - $arrowHeightFormat = $('.position').height()-8; + $position = $arrow.outerHeight(true)*-1, + $arrowHeightFormat = $arrow.outerHeight(true)/2; if($('#sidebar').length>0) { $wrap.css({'margin-left': 61}); $wrapLeft = 61; @@ -270,7 +274,7 @@ if($.support.touch) { } // Arrow defaults position - $position = $el.eq($elIndex).offset().top-$el.eq($elIndex).height()/2+$arrowHeightFormat-$(document).scrollTop(); + $position = $el.eq($elIndex).position().top+$el.eq($elIndex).height()/2-$arrowHeightFormat+$('.scroller').position().top; $arrow.css({ 'top': $position, }); @@ -281,7 +285,7 @@ if($.support.touch) { $el.on(mouseenterEvent, function(e) { $block.siblings().removeClass('show').eq($(this).index()).addClass('show'); $arrow.stop(true, false).animate({ - top: ($(this).offset().top-$(this).height()/2)+$arrowHeightFormat-$(document).scrollTop(), + top: ($(this).position().top+$(this).height()/2)-$arrowHeightFormat+$('.scroller').position().top, },{ duration: 500, easing: 'easeInOutBack', @@ -325,7 +329,7 @@ if($.support.touch) { }) }; // $el.on('mouseleave', function() { - // $el.hasClass('active') ? $position = $el.eq($elIndex).offset().top-$el.eq($elIndex).height()/2+$arrowHeightFormat-$(document).scrollTop() : 0; + // $el.hasClass('active') ? $position = $el.eq($elIndex).position().top+$el.eq($elIndex).height()/2-$arrowHeightFormat+$('.scroller').position().top; // $(this).hasClass('active') ? '':$(this).children('span').removeClass('hover'); // }); $block.on({ @@ -372,9 +376,9 @@ if($.support.touch) { if($elIndex === null) { - $position = 0; + $position = $arrow.outerHeight(true)*-1; } else { - $position = $el.eq($elIndex).offset().top-$el.eq($elIndex).height()/2+$arrowHeightFormat-$(document).scrollTop(); + $position = $el.eq($elIndex).position().top+$el.eq($elIndex).height()/2-$arrowHeightFormat+$('.scroller').position().top; } $arrow.stop(true, false).animate({ top: $position, @@ -409,8 +413,8 @@ if($.support.touch) { }); // Sidebar Nav Drag if(/MSIE 8.0/g.test($ua)){ + $arrow.remove(); $sidebarMenu.addClass('nano') - .css({'position': 'relative', 'top': '0px'}) .children('.scroller') .addClass('content') .removeClass('scroller'); @@ -472,15 +476,6 @@ if($.support.touch) { }(window.jQuery); -var ini = function() { - api = this - api.modal = function(e) { - $('#dialog a.delete-item').attr("href", e); - $('#dialog').modal('show'); - } - -} - // Open Slide function openSlide() { var $openSlide = $('.open-slide'), @@ -506,8 +501,8 @@ function openSlide() { } function formTip() { - if($('.main-forms').length && $('.add-on').length) { - $('.main-forms .add-on, .main-forms .file-link').tooltip({ + if($('.main-forms').length && $('.add-on').length || $('.phtot-action').length) { + $('.main-forms .add-on, .main-forms .file-link, .phtot-action li').tooltip({ position: { my: "center bottom-4", at: "center top" @@ -536,10 +531,6 @@ function changeStatusHidden() { // Document Ready $(function() { - new ini(); - $('.delete').on('click', function() { - api.modal($(this).attr('rel')); - }) initialState(); $('#login').on('shown', function () { $(document.body).addClass('modalBlur'); @@ -565,7 +556,7 @@ $(function() { if($('#sidebar').length) { if(!/MSIE 8.0/g.test(navigator.userAgent)){ document.getElementById('sidebar').addEventListener('touchmove', function (e) { e.preventDefault(); }, false); - }; + } } if($('#pageslide').length) { openSlide(); diff --git a/app/assets/javascripts/lib/member/list-view.js b/app/assets/javascripts/lib/member/list-view.js index 8a1a9f39..bd40f797 100644 --- a/app/assets/javascripts/lib/member/list-view.js +++ b/app/assets/javascripts/lib/member/list-view.js @@ -1,37 +1,3 @@ -function loadViewPage(url, id) { - var $listView = $(id); - - $listView.empty().removeClass('in active'); - $listView.load(url, function(response, status, xhr) { - $(this).addClass('in active'); - $('#member-card').imagesLoaded(function() { - $('#member-card .member-avatar img').muImageResize({width: 150, height:150}); - }); - $('#member-abstract').imagesLoaded(function() { - $('#member-abstract .member-avatar img').muImageResize({width: 250, height:120}); - }); - }) -} - $(function() { - $search = window.location.pathname.substring(1); - $search = $search.split("/"); - $search = $search[$search.length-1]; - $viewType = window.localStorage.getItem('viewType') || '#member-list'; - $viewSwitchNo = window.localStorage.getItem('viewSwitchNo') || 0; - if($search == 'users-registrant-list.shtml') { - loadViewPage('member-registrant-list.html ' + $viewType, '#list-view'); - } else { - loadViewPage('member-list.html ' + $viewType, '#list-view'); - }; - $('.view-switch').children('.btn').eq($viewSwitchNo).addClass('active'); - $('.view-switch').delegate(".btn", 'click', function(e){ - var url = $(this).attr('href'), - ID = url.split("#"), - ID = '#' + ID[ID.length-1]; - window.localStorage.setItem('viewType', ID); - window.localStorage.setItem('viewSwitchNo', $(this).index()); - loadViewPage(url, '#list-view'); - e.preventDefault(); - }); + $('.member-avatar').rsImg(); }) \ No newline at end of file diff --git a/app/assets/javascripts/lib/member/member.js b/app/assets/javascripts/lib/member/member.js index 9b6fdfbe..a272f4d2 100644 --- a/app/assets/javascripts/lib/member/member.js +++ b/app/assets/javascripts/lib/member/member.js @@ -1,3 +1,4 @@ +var H,P = []; // Go to !function ($) { $.fn.goTo = function (){ @@ -13,43 +14,45 @@ } }(window.jQuery); function checkHeight() { - if($('#member-module').height() > $(window).height()) { - H = $(window).height()- - parseInt($('.wrap-inner').css('padding-top'))+ - parseInt($('.wrap-inner').css('padding-bottom'))- - $('#orbit-bar').outerHeight(true); - }else{ - H = $(window).height()- - parseInt($('.wrap-inner').css('padding-top'))+ - parseInt($('.wrap-inner').css('padding-bottom'))- - $('#filter').outerHeight()+ - parseInt($('#filter').css('margin-bottom'))- - $('#orbit-bar').outerHeight(true); - }; + // if($('#member-module').height() > $(window).height()) { + // H = $(window).height()- + // parseInt($('.wrap-inner').css('padding-top'))+ + // parseInt($('.wrap-inner').css('padding-bottom'))- + // $('#orbit-bar').outerHeight(true); + // }else{ + // H = $(window).height()- + // parseInt($('.wrap-inner').css('padding-top'))+ + // parseInt($('.wrap-inner').css('padding-bottom'))- + // $('#filter').outerHeight()+ + // parseInt($('#filter').css('margin-bottom'))- + // $('#orbit-bar').outerHeight(true); + // }; + H = $(window).height()- + parseInt($('.wrap-inner').css('padding-top'))- + $('#orbit-bar').outerHeight(true); $('#basic-info').height(H); - $('#member-roles').height(H-$('.member-avatar').outerHeight(true)-parseInt($('#member-roles').css('margin-top'))) + $('#member-roles').height(H-$('.member-avatar').outerHeight(true)-parseInt($('#member-roles').css('margin-top'))+20); + $('#module-content').height(H-$('#module-navbar .navbar').outerHeight(true)-$('.bottomnav').innerHeight()); }; $(function() { - var H; checkHeight(); - $(window).resize(function() { - checkHeight(); - // setModuleBlockWidth(); - }); + $('.wrap-inner').css('padding-bottom', 0); + $(window).resize(checkHeight); $('#member-roles h4 > span').each(function() { $(this).css('margin-left',function() { return $(this).innerWidth()/2*-1; }) }) - $('#basic-info').scrollToFixed({ - marginTop: $('#orbit-bar').outerHeight(true)+20, - }); - $('#module-navbar').scrollToFixed({ - marginTop: $('#orbit-bar').outerHeight(true), - }); + // $('#basic-info').scrollToFixed({ + // marginTop: $('#orbit-bar').outerHeight(true)+20, + // }); + // $('#module-navbar').scrollToFixed({ + // marginTop: $('#orbit-bar').outerHeight(true), + // }); // $('.member-avatar').imagesLoaded(function() { // $('#basic-info .member-avatar img').muImageResize({width: 100, height:100}); // }); - $('#member-roles').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true }); -}) \ No newline at end of file + $('.member-avatar').rsImg(); + $('#member-roles, #module-content .nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true }); +}); \ No newline at end of file diff --git a/app/assets/javascripts/lib/member/role-forms.js b/app/assets/javascripts/lib/member/role-forms.js index 185709e6..2bc69ba7 100644 --- a/app/assets/javascripts/lib/member/role-forms.js +++ b/app/assets/javascripts/lib/member/role-forms.js @@ -191,12 +191,17 @@ function returnAddressForm(element, decide) { $(function() { appendIndex = null; - if($('#new-user-forms').length) { + if($('#user-forms').length) { addressVal = []; addressArray = []; addressInputId = []; roleType = null; returnDecide = false; + $('.attributes').each(function() { + if($(this).find('.toggle-check').attr('value') == "true") { + $(this).addClass('disabled').children('.attributes-body').hide(); + } + }); $('.returnDecide').on(clickEvent, function() { returnDecide = true; }) @@ -215,21 +220,21 @@ $(function() { }); $('#address-field').on('show', getAddressForm($trigger, $('#address-field'), true)); }); - $('#new-user-forms').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) { + $('#user-forms').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) { if($(this).hasClass('togglebox')) { if($(this).hasClass('disabled')) { $(this).find('.toggle-check') .attr('value', 'false') .closest('.attributes') .removeClass('disabled') - .find('.attributes-body') + .children('.attributes-body') .fadeIn(300); } else { $(this).find('.toggle-check') .attr('value', 'true') .closest('.attributes') .addClass('disabled') - .find('.attributes-body') + .children('.attributes-body') .fadeOut(300); } $(this).toggleClass('disabled'); @@ -422,12 +427,13 @@ $(function() { if($(this).hasClass('trigger')) { // appendIndex = $(this).closest('.controls').find('.input-append').length; appendIndex = $(this).closest('.controls').find('.input-append:last-child').children('input:first-child').attr('name'); - appendIndex = appendIndex.split("]["); - appendIndex = parseInt(appendIndex[appendIndex.length-2])+1; + // appendIndex = appendIndex.split("]["); + // appendIndex = parseInt(appendIndex[appendIndex.length-2])+1; + appendIndex = parseInt(appendIndex.match(/[^[\D\]]+(?=])/g)[1])+1; + console.log(appendIndex) attributeIndex = $(this).closest('.attributes').index(); templateType = $(this).closest('.attributes').find('.dataType').children("option:selected").attr('ref'); $("#template-input-append").tmpl(setData(attributeIndex, templateType, appendIndex)).appendTo($(this).closest('.controls').find('.add-target')); - inputAppendLength(); }; if($(this).hasClass('remove-input')) { diff --git a/app/assets/stylesheets/lib/main-forms.css b/app/assets/stylesheets/lib/main-forms.css index f5dff7f6..c8b5ace5 100644 --- a/app/assets/stylesheets/lib/main-forms.css +++ b/app/assets/stylesheets/lib/main-forms.css @@ -307,7 +307,7 @@ .main-forms .field-type .control-group:last-child { margin-bottom: 10px; } -#new-user-forms .control-group .add-target .input-append, +#user-forms .control-group .add-target .input-append, .main-forms .field-type .control-group .add-target .input-append { display: block; margin-bottom: 10px; @@ -324,7 +324,7 @@ border-radius: 0 4px 4px 0; } -#new-user-forms .control-group .add-target .input-append input.last { +#user-forms .control-group .add-target .input-append input.last { border-radius: 4px; } diff --git a/app/assets/stylesheets/lib/member.css b/app/assets/stylesheets/lib/member.css index 63882f90..a2bf3195 100644 --- a/app/assets/stylesheets/lib/member.css +++ b/app/assets/stylesheets/lib/member.css @@ -2,6 +2,11 @@ #list-view h4 a { color: #000; text-decoration: none; + display: block; + overflow: hidden; + width: 100%; + text-overflow: ellipsis; + white-space: nowrap; } /* List */ @@ -106,10 +111,31 @@ #list-view #member-abstract .member-avatar .action > a.trash { background-color: #b94a48; } -#list-view #member-abstract .member-avatar > span { +/*#list-view #member-abstract .member-avatar:after { + content: ""; position: absolute; - width: 250px; - height: 120px; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: block; + margin: 0; + background-color: #000000; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); +}*/ +#list-view #member-abstract > li .member-avatar:after { + -webkit-backface-visibility: hidden; + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; display: block; margin: 0; background-color: #000000; @@ -120,7 +146,8 @@ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); } -#list-view #member-abstract > li:hover .member-avatar > span { +#list-view #member-abstract > li:hover .member-avatar:after { + -webkit-backface-visibility: hidden; opacity: .4; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: alpha(opacity=40); @@ -159,11 +186,6 @@ float: left; position: relative; } -#list-view #member-card > li:hover .member-avatar > span { - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); -} #list-view #member-card > li:hover .member-avatar .action { visibility: visible; } @@ -183,14 +205,37 @@ #list-view #member-card .member-avatar.gender-woman { border-color: #FF3196; } -#list-view #member-card .member-avatar.gender-none { +#list-view #member-card .member-avatar.gender-nene { border-color: #DDDDDD; } #list-view #member-card .member-avatar img { /*width: 100%;*/ max-width: none; } -#list-view #member-card .member-avatar > span { +#list-view #member-card > li .member-avatar:after { + -webkit-backface-visibility: hidden; + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: block; + margin: 0; + background-color: #000000; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50%; + opacity: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); +} +#list-view #member-card > li:hover .member-avatar:after { + opacity: .4; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; + filter: alpha(opacity=40); +} +/*#list-view #member-card .member-avatar > span { position: absolute; width: 150px; height: 150px; @@ -203,7 +248,7 @@ opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); -} +}*/ #list-view #member-card .member-avatar .action { position: absolute; z-index: 1; @@ -262,22 +307,25 @@ margin-top: 20px; } #profile #basic-info .member-avatar { - width: 106px; - height: 106px; + width: 103px; + height: 103px; float: left; -} -#profile #basic-info .member-avatar img { border: 3px solid #ffffff; - width: 100%; - max-width: none; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; } -#profile #basic-info .member-avatar.gender-man img { +#profile #basic-info .member-avatar:after { + content: ""; + -webkit-backface-visibility: hidden; +} +#profile #basic-info .member-avatar.gender-man { border-color: #34ADFF; } -#profile #basic-info .member-avatar.gender-woman img { +#profile #basic-info .member-avatar.gender-woman { border-color: #FF3196; } -#profile #basic-info .member-avatar.gender-none img { +#profile #basic-info .member-avatar.gender-none { border-color: #DDDDDD; } #profile #member-roles { @@ -313,18 +361,18 @@ #profile #member-roles .roles dd { color: #999999; } +#profile #module-navbar { + margin-left: 10px; +} #profile #member-module { margin-left: 360px; } -#profile #member-module #module-navbar.scroll-to-fixed-fixed { - background-color: #F3F3F3; - padding-top: 20px; -} -#profile #member-module #module-navbar.scroll-to-fixed-fixed .navbar { - margin-bottom: 10px; -} #profile #member-module #module-content { - padding: 0 10px; + padding: 0 0 0 10px; +} +#profile #member-module #module-content .content { + right: 10px; + outline: none; } diff --git a/app/controllers/admin/users_new_interface_controller.rb b/app/controllers/admin/users_new_interface_controller.rb index 4be0c605..4f4e352f 100644 --- a/app/controllers/admin/users_new_interface_controller.rb +++ b/app/controllers/admin/users_new_interface_controller.rb @@ -1,6 +1,7 @@ class Admin::UsersNewInterfaceController < OrbitMemberController helper MemberHelper + helper OrbitBackendHelper before_filter :set_attribute,:except => [:index,:show] open_for_visitor :only => [:index, :show] @@ -16,50 +17,64 @@ class Admin::UsersNewInterfaceController < OrbitMemberController @filter = params[:filter] - new_filter = params[:new_filter] + @mq = params[:mq] + @new_filter = params[:new_filter] if @filter && params[:clear] @filter.delete(params[:type]) - elsif @filter && new_filter - if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) - @filter[new_filter[:type]].delete(new_filter[:id].to_s) - elsif @filter.has_key?(new_filter[:type]) - @filter[new_filter[:type]] << new_filter[:id].to_s + elsif @filter && @new_filter + if @filter.has_key?(@new_filter[:type]) && @filter[@new_filter[:type]].include?(@new_filter[:id].to_s) + @filter[@new_filter[:type]].delete(@new_filter[:id].to_s) + elsif @filter.has_key?(@new_filter[:type]) + @filter[@new_filter[:type]] << @new_filter[:id].to_s else - @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) + @filter.merge!({@new_filter[:type] => [@new_filter[:id].to_s]}) end - elsif new_filter - @filter = {new_filter[:type] => [new_filter[:id].to_s]} + elsif @new_filter + @filter = {@new_filter[:type] => [@new_filter[:id].to_s]} end - - if @filter.blank? + if @filter.blank? and @mq.blank? render case params[:at] when 'summary' - @users=User.not_guest_user.page(page_num).per(12).asc("_id").includes('avatar') + @users=User.not_guest_user.page(page_num).per(12).desc("_id").includes('avatar') "index_summary" when 'thumbnail' - @users=User.not_guest_user.page(page_num).per(36).asc("_id").includes('avatar') + @users=User.not_guest_user.page(page_num).per(36).desc("_id").includes('avatar') "index_thumbnail" else - @users=User.not_guest_user.page(page_num).per(10).asc("_id").includes('avatar') + @users=User.not_guest_user.page(page_num).per(10).desc("_id").includes('avatar') "index" end - else + elsif @filter.blank? and !@mq.blank? render case params[:at] when 'summary' - @users=User.not_guest_user.any_in(:role_ids=>@filter['role']).page(page_num).per(12).asc("_id").includes('avatar') + @users=User.not_guest_user.any_of({:user_id => /#{@mq}/i}, {:first_name => /#{@mq}/i}, {:last_name => /#{@mq}/i}, {:email => /#{@mq}/i}, {:office_tel => /#{@mq}/i}).desc("_id").includes('avatar') "index_summary" when 'thumbnail' - @users=User.not_guest_user.any_in(:role_ids=>@filter['role']).page(page_num).per(36).asc("_id").includes('avatar') + @users=User.not_guest_user.any_of({:user_id => /#{@mq}/i}, {:first_name => /#{@mq}/i}, {:last_name => /#{@mq}/i}, {:email => /#{@mq}/i}, {:office_tel => /#{@mq}/i}).desc("_id").includes('avatar') "index_thumbnail" else - @users=User.not_guest_user.any_in(:role_ids=>@filter['role']).page(page_num).per(10).asc("_id").includes('avatar') + @users=User.not_guest_user.any_of({:user_id => /#{@mq}/i}, {:first_name => /#{@mq}/i}, {:last_name => /#{@mq}/i}, {:email => /#{@mq}/i}, {:office_tel => /#{@mq}/i}).desc("_id").includes('avatar') + "index" + end + + elsif !@filter.blank? and @mq.blank? + + render case params[:at] + when 'summary' + @users=User.not_guest_user.any_in(:role_ids=>@filter['role']).page(page_num).per(12).desc("_id").includes('avatar') + "index_summary" + when 'thumbnail' + @users=User.not_guest_user.any_in(:role_ids=>@filter['role']).page(page_num).per(36).desc("_id").includes('avatar') + "index_thumbnail" + else + @users=User.not_guest_user.any_in(:role_ids=>@filter['role']).page(page_num).per(10).desc("_id").includes('avatar') "index" end @@ -215,7 +230,13 @@ class Admin::UsersNewInterfaceController < OrbitMemberController @user.destroy end - redirect_to :action => :index + # redirect_to :action => :index + respond_to do |format| + format.html { redirect_to(admin_users_new_interface_index_url(:at=>params[:at])) } + # format.xml { head :ok } + format.js + end + end protected diff --git a/app/helpers/attribute_fields_helper.rb b/app/helpers/attribute_fields_helper.rb index d11916d0..8d2cbaeb 100644 --- a/app/helpers/attribute_fields_helper.rb +++ b/app/helpers/attribute_fields_helper.rb @@ -34,7 +34,8 @@ module AttributeFieldsHelper value = (can_muti_lang_input? ? @prefiled_value[key] : @prefiled_value) rescue nil key_field = can_muti_lang_input? ? "[#{key}]" : "" place_holder= @panel_setting["placeholder"][key] rescue '' - result = text_area_tag(get_field_name_base + key_field, value,@markup_options.merge({:placeholder=>place_holder,:for=>key})) + # result = text_area_tag(get_field_name_base + key_field, value,@markup_options.merge({:placeholder=>place_holder,:for=>key})) + result = text_field_tag(get_field_name_base + key_field, value,@markup_options.merge({:placeholder=>place_holder,:for=>key})) add_ext= @attribute_value.address_ext[key] rescue {} @@ -181,7 +182,7 @@ protected def lang_panel_tabbable_wrapper(add_more_params,&block) add_more_counter = '' - if self.markup=='text_area' or self.markup=='address' + if self.markup=='text_area' #or self.markup=='address' tmp1 = VALID_LOCALES.collect do |key| value = @prefiled_value[key] rescue nil @@ -261,7 +262,7 @@ protected link_to(I18nVariable.from_locale(key),link_entry,:data=>{:toggle=>"tab"},:class=>"btn #{(key == I18n.locale.to_s ? "active" : nil)}",:for=>key) end # of VALID_LOCALES.collect for tabs - buff2 << link_to((content_tag :i,'',:class=>'icon-edit'),"##{get_pairing_tab_class({})}_m_window", :role=>"button",:class=>'btn',:data=>{:toggle=>"modal"}) if self.markup == 'address' + buff2 << link_to((content_tag :i,'',:class=>'icon-edit'),"#address-field", :role=>"button",:class=>'btn',:data=>{:toggle=>"modal"}) if self.markup == 'address' buff2 << link_to((content_tag :i,'',:class=>'icon-trash'),"#",:class=>"btn remove-input") if self.add_more buff2.join.html_safe end # of content ul @@ -357,7 +358,7 @@ protected # address = content_tag :div,:class=>"multipleInput editMore" do address = content_tag :div,:class=>"control-group" do - label + content_tag(:div, controls_wrapper(&block), :class=>'controls') + label + content_tag(:div, controls_wrapper(&block), :class=>'controls add-input') end # of div multipleInput editMore result = address @@ -452,7 +453,7 @@ protected def gen_modal_dialog render_anywhere("shared/attribute_field/address_modal_dialog",{ :field_name=>title, - :html_id=>"#{get_pairing_tab_class({})}_m_window", + :html_id=>"address-field", :btn_class => "#{get_pairing_tab_class({})}", :field_name_basic => get_basic_field_name_base } diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 97142cf8..ce1604bc 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -7,7 +7,7 @@ class User mount_uploader :avatar, AvatarUploader - field :admin, :type => Boolean, :default => true + field :admin, :type => Boolean, :default => false field :active_role field :user_id field :sid diff --git a/app/views/admin/users_new_interface/_filter.html.erb b/app/views/admin/users_new_interface/_filter.html.erb index 9e7a1eb3..1297ed5a 100644 --- a/app/views/admin/users_new_interface/_filter.html.erb +++ b/app/views/admin/users_new_interface/_filter.html.erb @@ -4,7 +4,7 @@