o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1360459622.323385: @value"{I" class:EFI"ProcessedAsset;FI"logical_path;FI"rollout_admin/admin.js;FI" pathname;FI"b/Users/abalsam/Documents/projects/rollout_admin/app/assets/javascripts/rollout_admin/admin.js;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-02-10T02:24:28+01:00;FI" length;FiGI" digest;F"%286877d8999caef867744556270b14c0I" source;FI"G$(function(){ $('a.icon-chevron-down').click( function(){ $(this).parent().find('div.details').fadeIn(1000); $(this).hide(); $(this).parent().find('a.icon-chevron-up').show(); } ); $('a.icon-chevron-up').click( function(){ $(this).parent().find('div.details').fadeOut(500); $(this).hide(); $(this).parent().find('a.icon-chevron-down').show(); } ); $(document).delegate('i.delete_user', 'click', function(){ var context=$(this).closest("div").parent().find("h4#feature_name").html(), that=$(this).closest("li"), ulist=$(this).closest("ul"); $.post('/rollout_admin/remove.json', {object_type:"user", user: $(this).closest("li").text(), feature: context}, function(data) { that.remove(); if ($("li",ulist).length == 1) { ulist.children(':last').before('
  • No members
  • '); } }); }); $(document).delegate('i.delete_group','click', function(){ var context=$(this).closest("div").parent().find("h4#feature_name").html(), that=$(this).closest("li"), ulist=$(this).closest("ul"); $.post('/rollout_admin/remove.json', {object_type:"group", group: $(this).closest("li").text(), feature: context}, function(data) { that.remove(); if ($("li",ulist).length == 1) { ulist.children(':last').before('
  • No members
  • '); } }); }); $(document).delegate('i.delete_ip','click', function(){ var context=$(this).closest("div").parent().find("h4#feature_name").html(), that=$(this).closest("li"), ulist=$(this).closest("ul"); $.post('/rollout_admin/remove.json', {object_type:"ip", ip: $(this).closest("li").text(), feature: context}, function(data) { that.remove(); if ($("li",ulist).length == 1) { ulist.children(':last').before('
  • No members
  • '); } }); }); $('i.add_users').click( function(){ context=$(this).closest("div").parent().find("h4#feature_name").html(); $('.feature_name').html(context); $that = $(this); $.getJSON('/rollout_admin/get_users.json', function(json) { userlist='
    Select users to add
    '; $('#addUserModal').find("div.modal-body").html(userlist); // clear former event handlers $('#addUserModal').find("div.modal-footer").find("button.btn-primary").unbind(); $('#addUserModal').find("div.modal-footer").find("button.btn-primary").click(function() { var allUsers = []; var allUserNames = []; $('#userlist :checked').each(function() { allUsers.push($(this).val()); allUserNames.push($(this).data("username")); }); $.post('/rollout_admin/add.json', {object_type:"user", user: allUsers.join(), feature: context}, function(data) { list = $that.closest('ul'); if (list.children(':first').text() == "No members") { list.children(':first').remove(); } allUserNames.forEach(function(entry) { list.children(':last').before('
  • '+entry+'
  • '); }); }); $('#addUserModal').modal('hide'); }); $('#addUserModal').modal(); }); } ); $('i.add_groups').click( function(){ context=$(this).closest("div").parent().find("h4#feature_name").html(); $('.feature_name').html(context); $that = $(this); // clear former event handlers $('#addGroupModal').find("div.modal-footer").find("button.btn-primary").unbind(); $('#addGroupModal').find("div.modal-footer").find("button.btn-primary").click(function() { $.post('/rollout_admin/add.json', {object_type:"group", group: $('#addGroupModal').find("div.modal-body").find("input#group_name").val(), feature: context}, function(data) { list = $that.closest('ul'); if (list.children(':first').text() == "No members") { list.children(':first').remove(); } list.children(':last').before('
  • '+$('#addGroupModal').find("div.modal-body").find("input#group_name").val()+'
  • '); $('#addGroupModal').find("div.modal-body").find("input#group_name").val(''); }); $('#addGroupModal').modal('hide'); }); $('#addGroupModal').modal(); } ); $('i.add_ips').click( function(){ context=$(this).closest("div").parent().find("h4#feature_name").html(); $('.feature_name').html(context); $that = $(this); // clear former event handlers $('#addIPModal').find("div.modal-footer").find("button.btn-primary").unbind(); $('#addIPModal').find("div.modal-footer").find("button.btn-primary").click(function() { $.post('/rollout_admin/add.json', {object_type:"ip", ip: $('#addIPModal').find("div.modal-body").find("input#ipaddr").val(), feature: context}, function(data) { list = $that.closest('ul'); if (list.children(':first').text() == "No members") { list.children(':first').remove(); } list.children(':last').before('
  • '+$('#addIPModal').find("div.modal-body").find("input#ipaddr").val()+'
  • '); $('#addIPModal').find("div.modal-body").find("input#ipaddr").val(''); }); $('#addIPModal').modal('hide'); }); $('#addIPModal').modal(); } ); }); ;FI"dependency_digest;F"%8b3c172f18f0015cc394369f54f60f39I"required_paths;F[I"b/Users/abalsam/Documents/projects/rollout_admin/app/assets/javascripts/rollout_admin/admin.js;FI"dependency_paths;F[{I" path;FI"b/Users/abalsam/Documents/projects/rollout_admin/app/assets/javascripts/rollout_admin/admin.js;FI" mtime;FI"2013-02-10T02:24:28+01:00;FI" digest;F"%244f17760d2abac2911dd9f5f3e28f92I" _version;F"%6776f581a4329e299531e1d52aa59832