Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix various scrolling issues in UserCompleter for ShareDialog, show l…
…oading indicator, fix long group names.
  • Loading branch information
cdujeu committed Mar 23, 2016
1 parent 0eb2fbc commit 3f05a91
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
17 changes: 11 additions & 6 deletions core/src/plugins/action.share/res/react-share-form.css
@@ -1,8 +1,9 @@
div.form-react_share_form div.dialogTitle {
display: none;
}
div.form-react_share_form div.dialogContent {
overflow-x: hidden !important;
div.form-react_share_form div.dialogContent .ie_material_checkbox_fix {
-ms-overflow-x: hidden !important;
-ms-overflow-y: hidden !important;
}
div#react_share_form {
font-family: Roboto, sans-serif;
Expand All @@ -21,7 +22,7 @@ div#react_share_form .mui-tabs-container .mui-tab-item-container {
background-color: #4aceb0 !important;
}
div#react_share_form .mui-tabs-container .mui-tab-template {
min-height: 300px;
min-height: 390px;
}
div#react_share_form .shared-users-rights-header {
color: #ADADAD;
Expand All @@ -36,13 +37,17 @@ div#react_share_form .shared-users-rights-header span {
width: 37px;
text-transform: uppercase;
}
div#react_share_form .suggest-search.icon-search {
div#react_share_form .suggest-search.icon-search,
div#react_share_form .suggest-search.icon-refresh {
color: #C1C1C1;
font-size: 18px;
position: absolute;
right: 15px;
top: 2px;
}
div#react_share_form .suggest-search.icon-refresh {
top: 12px;
}
div#react_share_form div.share-form-users .react-autosuggest input#users-autosuggest {
font-size: 16px;
padding-bottom: 8px !important;
Expand Down Expand Up @@ -371,8 +376,8 @@ div#react_share_form a.revert-button {
div.react-autosuggest {
padding-left: 1px;
}
div.react-autosuggest li.react-autosuggest__suggestion .user-badge {
display: block !important;
div.react-autosuggest li.react-autosuggest__suggestion {
display: block;
}
div.react-autosuggest .react-autosuggest__suggestion--focused {
background-color: aliceblue;
Expand Down
16 changes: 10 additions & 6 deletions core/src/plugins/action.share/res/react-share-form.less
Expand Up @@ -16,9 +16,12 @@ div.form-react_share_form {
display: none;
}
div.dialogContent{
overflow-x: hidden !important;
.ie_material_checkbox_fix{
-ms-overflow-x: hidden !important;
-ms-overflow-y: hidden !important;
}
}
}

div#react_share_form {
font-family: Roboto, sans-serif;
Expand All @@ -37,7 +40,7 @@ div#react_share_form {
background-color: @color0 !important;
}
.mui-tab-template {
min-height: 300px;
min-height: 390px;
}
}
.shared-users-rights-header {
Expand All @@ -53,13 +56,16 @@ div#react_share_form {
text-transform: uppercase;
}
}
.suggest-search.icon-search {
.suggest-search.icon-search, .suggest-search.icon-refresh {
color: #C1C1C1;
font-size: 18px;
position: absolute;
right: 15px;
top: 2px;
}
.suggest-search.icon-refresh{
top: 12px;
}
div.share-form-users{
.react-autosuggest{
input#users-autosuggest{
Expand Down Expand Up @@ -392,9 +398,7 @@ div#react_share_form {
div.react-autosuggest {
padding-left: 1px;
li.react-autosuggest__suggestion{
.user-badge{
display: block !important;
}
display: block;
}
.react-autosuggest__suggestion--focused {
background-color: aliceblue;
Expand Down
6 changes: 3 additions & 3 deletions core/src/plugins/action.share/res/react/ShareDialog.js
Expand Up @@ -808,7 +808,7 @@
disableForNotOwner = true;
}
return (
<div style={{padding:16}} className="reset-pydio-forms">
<div style={{padding:16}} className="reset-pydio-forms ie_material_checkbox_fix">
<ReactMUI.Checkbox
disabled={this.context.isReadonly() || disableForNotOwner}
onCheck={this.toggleLink}
Expand Down Expand Up @@ -989,7 +989,7 @@
<div>
<h3>{this.context.getMessage('71')}</h3>
<div className="section-legend">{this.context.getMessage('70r')}</div>
<div style={{margin:'10px 0 20px'}}>
<div style={{margin:'10px 0 20px'}} className="ie_material_checkbox_fix">
{perms.map(function(p){
return (
<div style={{display:'inline-block',width:'30%'}}>
Expand Down Expand Up @@ -1401,7 +1401,7 @@
);
}
return (
<div className="reset-pydio-forms">
<div className="reset-pydio-forms ie_material_checkbox_fix">
<h3>{this.context.getMessage('199')}</h3>
{showToggle}
{showTransfer}
Expand Down
Expand Up @@ -33,13 +33,19 @@
},

getInitialState:function(){
return {createUser: null, showComplete: true};
return {createUser: null, showComplete: true, loading:false};
},

getSuggestions(input, callback){
if(!this.state.showComplete){
callback(null, []);
return;
}
var excludes = this.props.excludes;
var disallowTemporary = this.props.existingOnly && !this.props.freeValueAllowed;
this.setState({loading:true});
PydioUsers.Client.authorizedUsersStartingWith(input, function(users){
this.setState({loading:false});
if(disallowTemporary){
users = users.filter(function(user){
return !user.getTemporary();
Expand All @@ -51,7 +57,7 @@
});
}
callback(null, users);
}, this.props.usersOnly, this.props.existingOnly);
}.bind(this), this.props.usersOnly, this.props.existingOnly);
},

suggestionValue: function(suggestion){
Expand Down Expand Up @@ -128,7 +134,7 @@
};
return (
<div style={{position:'relative'}} className={this.props.className + (this.state.showComplete ? '':' list-force-hide')}>
<span className="suggest-search icon-search"/>
<span className={"suggest-search icon-" + (this.state.loading && this.state.showComplete ? 'refresh rotating' : 'search')}/>
<ReactAutoSuggest
ref="autosuggest"
cache={false}
Expand Down

0 comments on commit 3f05a91

Please sign in to comment.