Changeset - 7bbe7dfaa48b
[Not reviewed]
default
0 8 0
Mads Kiilerich - 9 years ago 2016-10-27 16:01:57
madski@unity3d.com
style: replace some disabled btn with Bootstrap compatible label markup

Based on work by Dominik Ruf.
8 files changed with 26 insertions and 15 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -3084,6 +3084,7 @@ div.gravatar img {
 
    border: 1px solid #576622;
 
}
 

	
 
.label,
 
.btn {
 
    color: #515151;
 
    background-color: #DADADA;
 
@@ -3097,11 +3098,16 @@ div.gravatar img {
 
    outline: none;
 
    margin: 0px 3px 3px 0px;
 
    border-radius: 4px 4px 4px 4px !important;
 
    cursor: pointer !important;
 
    padding: 3px 3px 3px 3px;
 
    display: inline-block;
 
    white-space: nowrap;
 
}
 
.btn {
 
    cursor: pointer !important;
 
}
 
.label {
 
    cursor: default !important;
 
}
 

	
 
ul.nav-stacked {
 
    margin: 20px;
 
@@ -3139,6 +3145,7 @@ input[disabled].btn,
 
    color: #999;
 
}
 

	
 
.label,
 
.btn.btn-sm {
 
    padding: 3px 8px;
 
}
 
@@ -3165,6 +3172,7 @@ input[disabled].btn,
 
    box-shadow: none !important;
 
}
 

	
 
.label.label-danger,
 
.btn.btn-danger {
 
    color: #fff;
 
    background-color: #c43c35;
 
@@ -3174,6 +3182,7 @@ input[disabled].btn,
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 
.label.label-primary,
 
.btn.btn-primary {
 
    color: #fff;
 
    background-color: #339bb9;
 
@@ -3183,6 +3192,7 @@ input[disabled].btn,
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 
.label.label-success,
 
.btn.btn-success {
 
    color: #fff;
 
    background-color: #57a957;
 
@@ -3192,6 +3202,7 @@ input[disabled].btn,
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 
.label.label-warning,
 
.btn.btn-warning {
 
    color: #fff;
 
    background-color: #faa732;
 
@@ -4203,7 +4214,7 @@ span.pr-closed-tag {
 
}
 

	
 
#perms .perm_tag {
 
    padding: 1px 3px 1px 3px;
 
    padding: 3px 3px 1px 3px;
 
    font-size: 10px;
 
    font-weight: bold;
 
    text-transform: uppercase;
kallithea/templates/admin/gists/show.html
Show inline comments
 
@@ -34,9 +34,9 @@
 
                    <div class="stats">
 
                        <div class="left" style="margin: -4px 0px 0px 0px">
 
                          %if c.gist.gist_type == 'public':
 
                            <div class="btn btn-success btn-xs disabled">${_('Public Gist')}</div>
 
                            <div class="label label-success">${_('Public Gist')}</div>
 
                          %else:
 
                            <div class="btn btn-warning btn-xs disabled">${_('Private Gist')}</div>
 
                            <div class="label label-warning">${_('Private Gist')}</div>
 
                          %endif
 
                        </div>
 
                        <div class="left item">
kallithea/templates/admin/my_account/my_account_api_keys.html
Show inline comments
 
@@ -3,7 +3,7 @@
 
    <tr>
 
        <td style="width: 450px"><div class="truncate autoexpand" style="width:120px;font-size:16px;font-family: monospace">${c.user.api_key}</div></td>
 
        <td>
 
            <span class="btn btn-success btn-xs disabled">${_('Built-in')}</span>
 
            <span class="label label-success">${_('Built-in')}</span>
 
        </td>
 
        <td>${_('Expires')}: ${_('Never')}</td>
 
        <td>
kallithea/templates/admin/my_account/my_account_emails.html
Show inline comments
 
@@ -6,7 +6,7 @@
 
    %endif
 
    <td><div class="email">${c.user.email}</div></td>
 
    <td>
 
        <span class="btn btn-success btn-xs disabled">${_('Primary')}</span>
 
        <span class="label label-success">${_('Primary')}</span>
 
    </td>
 
    </tr>
 
    %if c.user_email_map:
kallithea/templates/admin/users/user_edit_api_keys.html
Show inline comments
 
@@ -3,7 +3,7 @@
 
    <tr>
 
        <td style="width: 450px"><div class="truncate autoexpand" style="width:120px;font-size:16px;font-family: monospace">${c.user.api_key}</div></td>
 
        <td>
 
            <span class="btn btn-success btn-xs disabled">${_('Built-in')}</span>
 
            <span class="label label-success">${_('Built-in')}</span>
 
        </td>
 
        <td>${_('Expires')}: ${_('Never')}</td>
 
        <td>
kallithea/templates/admin/users/user_edit_emails.html
Show inline comments
 
@@ -6,7 +6,7 @@
 
    %endif
 
    <td><div class="email">${c.user.email}</div></td>
 
    <td>
 
        <span class="btn btn-success btn-xs disabled">${_('Primary')}</span>
 
        <span class="label label-success">${_('Primary')}</span>
 
    </td>
 
    </tr>
 
    %if c.user_email_map:
kallithea/templates/data_table/_dt_elements.html
Show inline comments
 
@@ -136,11 +136,11 @@
 
<%def name="repo_state(repo_state)">
 
  <div>
 
    %if repo_state == u'repo_state_pending':
 
        <div class="btn btn-default btn-xs btn-info disabled">${_('Creating')}</div>
 
        <div class="label label-info">${_('Creating')}</div>
 
    %elif repo_state == u'repo_state_created':
 
        <div class="btn btn-success btn-xs disabled">${_('Created')}</div>
 
        <div class="label label-success">${_('Created')}</div>
 
    %else:
 
        <div class="btn btn-danger btn-xs disabled" title="${repo_state}">invalid</div>
 
        <div class="label label-danger" title="${repo_state}">invalid</div>
 
    %endif
 
  </div>
 
</%def>
kallithea/tests/functional/test_admin_gists.py
Show inline comments
 
@@ -73,7 +73,7 @@ class TestGistsController(TestController
 
        response = response.follow()
 
        response.mustcontain('added file: foo')
 
        response.mustcontain('gist test')
 
        response.mustcontain('<div class="btn btn-success btn-xs disabled">Public Gist</div>')
 
        response.mustcontain('<div class="label label-success">Public Gist</div>')
 

	
 
    def test_create_with_path_with_dirs(self):
 
        self.log_user()
 
@@ -106,7 +106,7 @@ class TestGistsController(TestController
 
        response = response.follow()
 
        response.mustcontain('added file: private-foo<')
 
        response.mustcontain('private gist test')
 
        response.mustcontain('<div class="btn btn-warning btn-xs disabled">Private Gist</div>')
 
        response.mustcontain('<div class="label label-warning">Private Gist</div>')
 

	
 
    def test_create_with_description(self):
 
        self.log_user()
 
@@ -122,7 +122,7 @@ class TestGistsController(TestController
 
        response.mustcontain('added file: foo-desc')
 
        response.mustcontain('gist test')
 
        response.mustcontain('gist-desc')
 
        response.mustcontain('<div class="btn btn-success btn-xs disabled">Public Gist</div>')
 
        response.mustcontain('<div class="label label-success">Public Gist</div>')
 

	
 
    def test_new(self):
 
        self.log_user()
 
@@ -152,7 +152,7 @@ class TestGistsController(TestController
 
        response.mustcontain('added file: gist-show-me<')
 
        response.mustcontain('%s - created' % TEST_USER_ADMIN_LOGIN)
 
        response.mustcontain('gist-desc')
 
        response.mustcontain('<div class="btn btn-success btn-xs disabled">Public Gist</div>')
 
        response.mustcontain('<div class="label label-success">Public Gist</div>')
 

	
 
    def test_show_as_raw(self):
 
        gist = _create_gist('gist-show-me', content='GIST CONTENT')
0 comments (0 inline, 0 general)