mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-02 11:59:17 -05:00
Merge pull request #1972 from verg/user_pref_save_btn
Add Save button to top of user preferences
This commit is contained in:
commit
3eec3136d5
4 changed files with 56 additions and 17 deletions
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
|
|
||||||
|
<div class="control-group save-button" id='save-button-top'>
|
||||||
|
<div class="controls">
|
||||||
|
{{partial 'user/preferences/saveButton'}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">{{i18n user.username.title}}</label>
|
<label class="control-label">{{i18n user.username.title}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
@ -84,13 +90,13 @@
|
||||||
<label class="control-label">{{i18n user.email_settings}}</label>
|
<label class="control-label">{{i18n user.email_settings}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{#if Discourse.SiteSettings.enable_mailing_list_mode}}
|
{{#if Discourse.SiteSettings.enable_mailing_list_mode}}
|
||||||
<label>
|
<label class="checkbox-label">
|
||||||
{{view Ember.Checkbox checkedBinding="mailing_list_mode"}}
|
{{view Ember.Checkbox checkedBinding="mailing_list_mode"}}
|
||||||
{{i18n user.mailing_list_mode}}
|
{{i18n user.mailing_list_mode}}
|
||||||
</label>
|
</label>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<label>{{view Ember.Checkbox checkedBinding="email_digests"}}
|
<label class="checkbox-label">{{view Ember.Checkbox checkedBinding="email_digests"}}
|
||||||
{{i18n user.email_digests.title}}</label>
|
{{i18n user.email_digests.title}}</label>
|
||||||
|
|
||||||
{{#if email_digests}}
|
{{#if email_digests}}
|
||||||
|
@ -98,11 +104,11 @@
|
||||||
{{combobox valueAttribute="value" content=digestFrequencies value=digest_after_days}}
|
{{combobox valueAttribute="value" content=digestFrequencies value=digest_after_days}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<label>{{view Ember.Checkbox checkedBinding="email_private_messages"}}
|
<label class="checkbox-label">{{view Ember.Checkbox checkedBinding="email_private_messages"}}
|
||||||
{{i18n user.email_private_messages}}</label>
|
{{i18n user.email_private_messages}}</label>
|
||||||
<label>{{view Ember.Checkbox checkedBinding="email_direct"}}
|
<label class="checkbox-label">{{view Ember.Checkbox checkedBinding="email_direct"}}
|
||||||
{{i18n user.email_direct}}</label>
|
{{i18n user.email_direct}}</label>
|
||||||
<label>{{view Ember.Checkbox checkedBinding="email_always"}}
|
<label class="checkbox-label">{{view Ember.Checkbox checkedBinding="email_always"}}
|
||||||
{{i18n user.email_always}}</label>
|
{{i18n user.email_always}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class='instructions'>
|
<div class='instructions'>
|
||||||
|
@ -113,25 +119,27 @@
|
||||||
<div class="control-group other">
|
<div class="control-group other">
|
||||||
|
|
||||||
<label class="control-label">{{i18n user.other_settings}}</label>
|
<label class="control-label">{{i18n user.other_settings}}</label>
|
||||||
<div class="controls">
|
<div class="controls controls-dropdown">
|
||||||
<label>{{i18n user.auto_track_topics}}</label>
|
<label>{{i18n user.auto_track_topics}}</label>
|
||||||
{{combobox valueAttribute="value" content=autoTrackDurations value=auto_track_topics_after_msecs}}
|
{{combobox valueAttribute="value" content=autoTrackDurations value=auto_track_topics_after_msecs}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="controls controls-dropdown">
|
||||||
<label>{{i18n user.new_topic_duration.label}}</label>
|
<label>{{i18n user.new_topic_duration.label}}</label>
|
||||||
{{combobox valueAttribute="value" content=considerNewTopicOptions value=new_topic_duration_minutes}}
|
{{combobox valueAttribute="value" content=considerNewTopicOptions value=new_topic_duration_minutes}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<label>{{view Ember.Checkbox checkedBinding="external_links_in_new_tab"}}
|
<label class="checkbox-label">{{view Ember.Checkbox checkedBinding="external_links_in_new_tab"}}
|
||||||
{{i18n user.external_links_in_new_tab}}</label>
|
{{i18n user.external_links_in_new_tab}}</label>
|
||||||
<label>{{view Ember.Checkbox checkedBinding="enable_quoting"}}
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox-label">{{view Ember.Checkbox checkedBinding="enable_quoting"}}
|
||||||
{{i18n user.enable_quoting}}</label>
|
{{i18n user.enable_quoting}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<label>
|
<label class='checkbox-label'>
|
||||||
{{view Ember.Checkbox checkedBinding="dynamic_favicon"}}
|
{{view Ember.Checkbox checkedBinding="dynamic_favicon"}}
|
||||||
{{i18n user.dynamic_favicon}}
|
{{i18n user.dynamic_favicon}}
|
||||||
</label>
|
</label>
|
||||||
|
@ -141,17 +149,17 @@
|
||||||
|
|
||||||
<div class="control-group category">
|
<div class="control-group category">
|
||||||
<label class="control-label">{{i18n user.categories_settings}}</label>
|
<label class="control-label">{{i18n user.categories_settings}}</label>
|
||||||
<div class="controls">
|
<div class="controls category-controls">
|
||||||
<label>{{i18n user.watched_categories}}</label>
|
<label>{{i18n user.watched_categories}}</label>
|
||||||
{{category-group categories=watchedCategories}}
|
{{category-group categories=watchedCategories}}
|
||||||
</div>
|
</div>
|
||||||
<div class="instructions">{{i18n user.watched_categories_instructions}}</div>
|
<div class="instructions">{{i18n user.watched_categories_instructions}}</div>
|
||||||
<div class="controls">
|
<div class="controls category-controls">
|
||||||
<label>{{i18n user.tracked_categories}}</label>
|
<label>{{i18n user.tracked_categories}}</label>
|
||||||
{{category-group categories=trackedCategories}}
|
{{category-group categories=trackedCategories}}
|
||||||
</div>
|
</div>
|
||||||
<div class="instructions">{{i18n user.tracked_categories_instructions}}</div>
|
<div class="instructions">{{i18n user.tracked_categories_instructions}}</div>
|
||||||
<div class="controls">
|
<div class="controls category-controls">
|
||||||
<label>{{i18n user.muted_categories}}</label>
|
<label>{{i18n user.muted_categories}}</label>
|
||||||
{{category-group categories=mutedCategories}}
|
{{category-group categories=mutedCategories}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -160,8 +168,7 @@
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<button {{action save}} {{bind-attr disabled="saveDisabled"}} class="btn btn-primary">{{saveButtonText}}</button>
|
{{partial 'user/preferences/saveButton'}}
|
||||||
{{#if saved}}{{i18n saved}}{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<button {{action save}} {{bind-attr disabled="saveDisabled"}} class="btn btn-primary">{{saveButtonText}}</button>
|
||||||
|
{{#if saved}}{{i18n saved}}{{/if}}
|
|
@ -72,6 +72,10 @@
|
||||||
width: 280px;
|
width: 280px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#save-button-top {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-navigation {
|
.user-navigation {
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
@import "../common/foundation/mixins";
|
@import "../common/foundation/mixins";
|
||||||
|
|
||||||
.user-preferences {
|
.user-preferences {
|
||||||
|
.control-group {
|
||||||
|
// border-bottom: 1px solid #e5e5e5;
|
||||||
|
padding: 8px 36px 8px 8px;
|
||||||
|
}
|
||||||
|
.control-label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
textarea {
|
textarea {
|
||||||
width: 530px;
|
width: 530px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
@ -15,9 +22,11 @@
|
||||||
}
|
}
|
||||||
.instructions {
|
.instructions {
|
||||||
color: $primary_medium;
|
color: $primary_medium;
|
||||||
margin-left: 165px;
|
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
.category-controls {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
.avatar {
|
.avatar {
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
}
|
}
|
||||||
|
@ -32,12 +41,29 @@
|
||||||
width: 520px;
|
width: 520px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.other .controls {
|
.other .controls-dropdown {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
padding-left: 5px;
|
||||||
select {
|
select {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.save-button {
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
max-width: 200px;
|
||||||
|
button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-label {
|
||||||
|
overflow: auto;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 5px 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#about-me {
|
#about-me {
|
||||||
|
|
Loading…
Reference in a new issue