test/dummy/tmp/cache/assets/DBD/330/sprockets%2F51a9cf8afaaa9b816cb8a70ac7512a21 in rollout_admin-0.0.5 vs test/dummy/tmp/cache/assets/DBD/330/sprockets%2F51a9cf8afaaa9b816cb8a70ac7512a21 in rollout_admin-0.0.6
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1360491345.673336:@value"{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1361259073.5271978:@value"Q{I"
class:EFI"BundledAsset; FI"logical_path; FI"rollout_admin/admin.js; FI"
pathname; FI"f/Users/abalsam/Documents/projects/rollout_admin/app/assets/javascripts/rollout_admin/admin.js.erb; FI"content_type; FI"application/javascript; FI"
-mtime; FI"2013-02-10T11:15:34+01:00; FI"length; FiI"digest; F"%69a3023bda44134fd91ad3d0e0b82fc9I"source; FI"
+mtime; FI"2013-02-19T08:30:47+01:00; FI"length; FidI"digest; F"%6dd2ff1d9b16e30cb2f6910b3bc3ad35I"source; FI"d
$(function(){
$('a.icon-chevron-down').click(
function(){
$(this).parent().find('div.details').fadeIn(1000);
@@ -21,11 +21,11 @@
$(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('/testing/remove.json', {object_type:"user", user: $(this).closest("li").text(), feature: context}, function(data) {
+ $.post('/testing/remove.json', {object_type:"user", user: $(this).data('id'), feature: context}, function(data) {
that.remove();
if ($("li",ulist).length == 1) {
ulist.children(':last').before('<li>No members</li>');
}
});
@@ -65,11 +65,11 @@
$that = $(this);
$.getJSON('/testing/get_users.json', function(json) {
userlist='<h5>Select users to add</h5><form id="userlist"><ul class="unstyled">';
$.each(json, function() {
- userlist += '<li><input type="checkbox", value="'+this.id+'" data-username="'+this.Name+'"> '+this.Name+', '+this.email+'</li>';
+ userlist += '<li><input type="checkbox", value="'+this.id+'" data-username="'+this.name+'"> '+this.name+', '+this.email+'</li>';
});
userlist +='</ul></form>';
$('#addUserModal').find("div.modal-body").html(userlist);
@@ -82,17 +82,20 @@
allUsers.push($(this).val());
allUserNames.push($(this).data("username"));
});
$.post('/testing/add.json', {object_type:"user", user: allUsers.join(), feature: context}, function(data) {
+ console.log(data);
list = $that.closest('ul');
if (list.children(':first').text() == "No members") {
list.children(':first').remove();
}
- allUserNames.forEach(function(entry) {
- list.children(':last').before('<li><i class="icon-minus delete_user"></i>'+entry+'</li>');
- });
+ $.each(data, function() {
+ console.log(this);
+ list.children(':last').before('<li><i class="icon-minus delete_user" data-id="'+this.id+'"></i>'+this.name+'</li>');
+ });
+
});
$('#addUserModal').modal('hide');
});
$('#addUserModal').modal();
@@ -144,6 +147,6 @@
});
$('#addIPModal').modal();
}
);
});
-; FI"required_assets_digest; F"%ff80bdef3790a6daa8da03e3cd8608f6I"
_version; F"%6776f581a4329e299531e1d52aa59832
+; FI"required_assets_digest; F"%1355a8e8745a3f5d2a38bd45141433ebI"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file