~ubuntu-branches/ubuntu/trusty/horizon/trusty-proposed

« back to all changes in this revision

Viewing changes to horizon/static/horizon/js/horizon.membership.js

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-12-05 14:39:15 UTC
  • mto: This revision was merged to the branch mainline in revision 61.
  • Revision ID: package-import@ubuntu.com-20131205143915-5u8q3kdxdw8e7maz
Tags: upstream-2014.1~b1
ImportĀ upstreamĀ versionĀ 2014.1~b1

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
        roles_to_display.push(horizon.membership.roles[step_slug][role_ids[i]]);
183
183
    }
184
184
    text = roles_to_display.join(', ');
185
 
    if (text.length == 0) text = gettext('No roles');
 
185
    if (text.length === 0) {
 
186
      text = gettext('No roles');
 
187
    }
186
188
    $roles_display.text(text);
187
189
  },
188
190
 
196
198
    var roles = [];
197
199
    for (var r in horizon.membership.roles[step_slug]) {
198
200
      var role = {};
199
 
      role['role_id'] = r;
200
 
      role['role_name'] = horizon.membership.roles[step_slug][r];
 
201
      role.role_id = r;
 
202
      role.role_name = horizon.membership.roles[step_slug][r];
201
203
      roles.push(role);
202
204
    }
203
205
 
435
437
        var $form = $(this);
436
438
 
437
439
        // Do nothing if this isn't a membership modal
438
 
        if ($form.find('div.' + step_slug + '_membership').length == 0) {
 
440
        if ($form.find('div.' + step_slug + '_membership').length === 0) {
439
441
           return; // continue
440
442
        }
441
443
 
456
458
        }
457
459
 
458
460
        // unfocus filter fields
459
 
        if (step_id.indexOf('update') ==0) {
 
461
        if (step_id.indexOf('update') === 0) {
460
462
            $form.find("#" + step_id + " input").blur();
461
463
        }
462
464