Massively refactor settings page templates and styling.

This restructures the styling for the Zulip settings and
administration pages to minimize use of Bootstrap and use a consistent
styling library for similar elements.

While it is basically a wash in terms of the page's visuals, it will
make our life a lot easier for future work on improving the settings
pages section of the site.
This commit is contained in:
Brock Whittaker
2016-09-13 17:20:13 -07:00
committed by Tim Abbott
parent 68c51912c9
commit 706f422c3a
13 changed files with 608 additions and 709 deletions

View File

@@ -17,7 +17,7 @@ casper.waitForSelector('#administration.tab-pane.active', function () {
// Test only admins may create streams Setting
casper.waitForSelector('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]', function () {
casper.click('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
@@ -47,7 +47,7 @@ casper.waitForSelector('input[type="checkbox"][id="id_realm_create_stream_by_adm
// Deactivate setting
casper.click('input[type="checkbox"][id="id_realm_create_stream_by_admins_only"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
casper.then(function () {
@@ -146,7 +146,7 @@ casper.then(function () {
'name': 'MouseFace',
'url': 'http://127.0.0.1:9991/static/images/integrations/logos/jenkins.png'
});
casper.click('form.admin-emoji-form input.btn');
casper.click('form.admin-emoji-form input.button');
});
});
@@ -300,7 +300,7 @@ casper.then(function () {
// deactivate "allow message editing"
casper.waitForSelector('input[type="checkbox"][id="id_realm_allow_message_editing"]', function () {
casper.click('input[type="checkbox"][id="id_realm_allow_message_editing"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
casper.then(function () {
@@ -358,7 +358,7 @@ casper.then(function () {
});
casper.waitForSelector('input[type="checkbox"][id="id_realm_allow_message_editing"]', function () {
casper.click('input[type="checkbox"][id="id_realm_allow_message_editing"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
casper.waitUntilVisible('#admin-realm-message-editing-status', function () {
casper.test.assertSelectorHasText('#admin-realm-message-editing-status', 'Users can now edit topics for all their messages, and the content of messages which are less than 10 minutes old.');
casper.test.assertEval(function () {
@@ -410,7 +410,7 @@ casper.then(function () {
casper.test.assertExists('#administration.tab-pane.active', 'Administration page is active');
});
casper.waitForSelector('form.admin-realm-form input.btn');
casper.waitForSelector('form.admin-realm-form input.button');
// deactivate message editing
casper.waitForSelector('input[type="checkbox"][id="id_realm_allow_message_editing"]', function () {
@@ -418,7 +418,7 @@ casper.waitForSelector('input[type="checkbox"][id="id_realm_allow_message_editin
$('input[type="text"][id="id_realm_message_content_edit_limit_minutes"]').val('4');
});
casper.click('input[type="checkbox"][id="id_realm_allow_message_editing"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
casper.then(function () {
@@ -437,7 +437,7 @@ casper.then(function () {
// allow message editing again, and check that the old edit limit is still there
casper.waitForSelector('input[type="checkbox"][id="id_realm_allow_message_editing"]', function () {
casper.click('input[type="checkbox"][id="id_realm_allow_message_editing"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
});
@@ -459,7 +459,7 @@ casper.then(function () {
casper.evaluate(function () {
$('input[type="text"][id="id_realm_message_content_edit_limit_minutes"]').val('0');
});
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
});
@@ -482,7 +482,7 @@ casper.then(function () {
$('input[type="text"][id="id_realm_message_content_edit_limit_minutes"]').val('moo');
});
casper.click('input[type="checkbox"][id="id_realm_allow_message_editing"]');
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
});
@@ -503,7 +503,7 @@ casper.then(function () {
casper.evaluate(function () {
$('#id_realm_default_language').val('de').change();
});
casper.click('form.admin-realm-form input.btn');
casper.click('form.admin-realm-form input.button');
});
casper.waitUntilVisible('#admin-realm-default-language-status', function () {