aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/stuff/test/auth.js54
-rw-r--r--src/guff/views/ecrs/test/auth.ecr42
2 files changed, 48 insertions, 48 deletions
diff --git a/data/stuff/test/auth.js b/data/stuff/test/auth.js
index a374364..b973e25 100644
--- a/data/stuff/test/auth.js
+++ b/data/stuff/test/auth.js
@@ -110,27 +110,27 @@ jQuery(function($) {
$('#users .active').removeClass('active');
me.addClass('active');
- $('#edit-dialog').data('row', me.data('row')).modal('show');
+ $('#user-edit-dialog').data('row', me.data('row')).modal('show');
// stop event
return false;
});
- $('#add-dialog').on('show.bs.modal', function() {
+ $('#user-add-dialog').on('show.bs.modal', function() {
$.each(['name', 'email', 'password'], function(i, id) {
- $('#add-' + id).val('');
+ $('#user-add-' + id).val('');
});
- $('#add-role').val('guest');
+ $('#user-add-role').val('guest');
});
- $('#add-dialog').on('shown.bs.modal', function() {
- $('#add-name').focus();
+ $('#user-add-dialog').on('shown.bs.modal', function() {
+ $('#user-add-name').focus();
});
- $('#add-name, #add-email, #add-password').keydown(function(ev) {
+ $('#user-add-name, #user-add-email, #user-add-password').keydown(function(ev) {
if (ev.which == 13) {
setTimeout(function() {
- $('#add-confirm').click();
+ $('#user-add-confirm').click();
}, 10);
// stop event
@@ -138,7 +138,7 @@ jQuery(function($) {
}
});
- $('#add-confirm').click(function() {
+ $('#user-add-confirm').click(function() {
var me = $(this);
if (me.hasClass('disabled'))
@@ -148,10 +148,10 @@ jQuery(function($) {
me.toggleClass('disabled').find('.loading').toggleClass('hidden');
send('test/add_user', {
- name: $('#add-name').val(),
- email: $('#add-email').val(),
- password: $('#add-password').val(),
- role: $('#add-role').val(),
+ name: $('#user-add-name').val(),
+ email: $('#user-add-email').val(),
+ password: $('#user-add-password').val(),
+ role: $('#user-add-role').val(),
active: 't',
}).always(function() {
// toggle loading
@@ -161,14 +161,14 @@ jQuery(function($) {
}).done(function(r) {
console.log(r);
reload();
- $('#add-dialog').modal('hide');
+ $('#user-add-dialog').modal('hide');
});
// stop event
return false;
});
- $('#edit-dialog').on('show.bs.modal', function() {
+ $('#user-edit-dialog').on('show.bs.modal', function() {
var row = $(this).data('row');
$.each({
@@ -176,23 +176,23 @@ jQuery(function($) {
email: 'email',
role: 'role_name',
}, function(id, col) {
- $('#edit-' + id).val(row[col]);
+ $('#user-edit-' + id).val(row[col]);
});
});
- $('#edit-dialog').on('shown.bs.modal', function() {
- $('#edit-name').focus();
+ $('#user-edit-dialog').on('shown.bs.modal', function() {
+ $('#user-edit-name').focus();
});
- $('#edit-dialog').on('hide.bs.modal', function() {
+ $('#user-edit-dialog').on('hide.bs.modal', function() {
// clear highlight
$('#users .active').removeClass('active');
});
- $('#edit-name, #edit-email').keydown(function(ev) {
+ $('#user-edit-name, #user-edit-email').keydown(function(ev) {
if (ev.which == 13) {
setTimeout(function() {
- $('#edit-confirm').click();
+ $('#user-edit-confirm').click();
}, 10);
// stop event
@@ -200,9 +200,9 @@ jQuery(function($) {
}
});
- $('#edit-confirm').click(function() {
+ $('#user-edit-confirm').click(function() {
var me = $(this),
- user_id = $('#edit-dialog').data('row').user_id;
+ user_id = $('#user-edit-dialog').data('row').user_id;
if (me.hasClass('disabled'))
return false;
@@ -212,9 +212,9 @@ jQuery(function($) {
send('test/edit_user', {
user_id: user_id,
- name: $('#edit-name').val(),
- email: $('#edit-email').val(),
- role: $('#edit-role').val(),
+ name: $('#user-edit-name').val(),
+ email: $('#user-edit-email').val(),
+ role: $('#user-edit-role').val(),
}).always(function() {
// toggle loading
me.toggleClass('disabled').find('.loading').toggleClass('hidden');
@@ -223,7 +223,7 @@ jQuery(function($) {
}).done(function(r) {
console.log(r);
reload();
- $('#edit-dialog').modal('hide');
+ $('#user-edit-dialog').modal('hide');
});
// stop event
diff --git a/src/guff/views/ecrs/test/auth.ecr b/src/guff/views/ecrs/test/auth.ecr
index f7ea4f6..301094a 100644
--- a/src/guff/views/ecrs/test/auth.ecr
+++ b/src/guff/views/ecrs/test/auth.ecr
@@ -32,7 +32,7 @@
class='btn btn-primary'
title='Create new post.'
data-toggle='modal'
- data-target='#add-dialog'
+ data-target='#user-add-dialog'
>
<i class='fa fa-plus-circle'></i>
New Post
@@ -59,7 +59,7 @@
class='btn btn-primary'
title='Create new post.'
data-toggle='modal'
- data-target='#add-dialog'
+ data-target='#user-add-dialog'
>
<i class='fa fa-plus-circle'></i>
New Post
@@ -96,7 +96,7 @@
class='btn btn-primary'
title='Create new user.'
data-toggle='modal'
- data-target='#add-dialog'
+ data-target='#user-add-dialog'
>
<i class='fa fa-user-plus'></i>
Add User
@@ -197,7 +197,7 @@
</div><!-- col-md-10 -->
</div><!-- container -->
-<div id='add-dialog' class='modal fade' role='dialog'>
+<div id='user-add-dialog' class='modal fade' role='dialog'>
<div class='modal-dialog' role='document'>
<div class='modal-content'>
<div class='modal-header'>
@@ -220,13 +220,13 @@
<div class='modal-body'>
<div class='form-group'>
- <label for='add-name'>
+ <label for='user-add-name'>
Name
</label>
<input
type='text'
- id='add-name'
+ id='user-add-name'
class='form-control'
title='Enter name of user.'
placeholder='John Doe'
@@ -234,13 +234,13 @@
</div><!-- form-group -->
<div class='form-group'>
- <label for='add-email'>
+ <label for='user-add-email'>
Email Address
</label>
<input
type='text'
- id='add-email'
+ id='user-add-email'
class='form-control'
title='Enter user email.'
placeholder='johndoe@example.com'
@@ -248,25 +248,25 @@
</div><!-- form-group -->
<div class='form-group'>
- <label for='add-password'>
+ <label for='user-add-password'>
Password
</label>
<input
type='password'
- id='add-password'
+ id='user-add-password'
class='form-control'
title='Enter password.'
/>
</div><!-- form-group -->
<div class='form-group'>
- <label for='add-role'>
+ <label for='user-add-role'>
Role
</label>
<select
- id='add-role'
+ id='user-add-role'
class='form-control'
title='Choose role of user.'
><%=
@@ -277,7 +277,7 @@
<div class='modal-footer'>
<button
- id='add-confirm'
+ id='user-add-confirm'
class='btn btn-primary'
title='Create new user.'
>
@@ -304,7 +304,7 @@
</div><!-- modal-dialog -->
</div><!-- modal -->
-<div id='edit-dialog' class='modal fade' role='dialog'>
+<div id='user-edit-dialog' class='modal fade' role='dialog'>
<div class='modal-dialog' role='document'>
<div class='modal-content'>
<div class='modal-header'>
@@ -327,13 +327,13 @@
<div class='modal-body'>
<div class='form-group'>
- <label for='edit-name'>
+ <label for='user-edit-name'>
Name
</label>
<input
type='text'
- id='edit-name'
+ id='user-edit-name'
class='form-control'
title='Enter name of user.'
placeholder='John Doe'
@@ -341,13 +341,13 @@
</div><!-- form-group -->
<div class='form-group'>
- <label for='edit-email'>
+ <label for='user-edit-email'>
Email Address
</label>
<input
type='text'
- id='edit-email'
+ id='user-edit-email'
class='form-control'
title='Enter user email.'
placeholder='johndoe@example.com'
@@ -355,12 +355,12 @@
</div><!-- form-group -->
<div class='form-group'>
- <label for='edit-role'>
+ <label for='user-edit-role'>
Role
</label>
<select
- id='edit-role'
+ id='user-edit-role'
class='form-control'
title='Choose role of user.'
><%=
@@ -371,7 +371,7 @@
<div class='modal-footer'>
<button
- id='edit-confirm'
+ id='user-edit-confirm'
class='btn btn-primary'
title='Update user.'
>