Added sync/publish icons in front of document title
This commit is contained in:
parent
9482694dff
commit
9972874722
@ -113,17 +113,33 @@ define([
|
||||
FileDescriptor.prototype.composeTitle = function() {
|
||||
var result = [];
|
||||
var syncAttributesList = _.values(this.syncLocations);
|
||||
var publishAttributesList = _.values(this.publishLocations);
|
||||
var attributesList = syncAttributesList.concat(publishAttributesList);
|
||||
_.chain(attributesList).sortBy(function(attributes) {
|
||||
var syncLocationIcon = [];
|
||||
_.chain(syncAttributesList).sortBy(function(attributes) {
|
||||
return attributes.provider.providerId;
|
||||
}).each(function(attributes) {
|
||||
var classes = 'icon-provider-' + attributes.provider.providerId;
|
||||
if(attributes.isRealtime === true) {
|
||||
classes += ' realtime';
|
||||
}
|
||||
result.push('<i class="' + classes + '"></i>');
|
||||
attributes.isRealtime === true && (classes += ' realtime');
|
||||
syncLocationIcon.push('<i class="' + classes + '"></i>');
|
||||
});
|
||||
if(syncLocationIcon.length !== 0) {
|
||||
result.push('<i class="icon-refresh title-icon-category"></i><span class="title-icon-container">');
|
||||
result = result.concat(syncLocationIcon);
|
||||
result.push('</span>');
|
||||
}
|
||||
var publishAttributesList = _.values(this.publishLocations);
|
||||
var publishLocationIcon = [];
|
||||
_.chain(publishAttributesList).sortBy(function(attributes) {
|
||||
return attributes.provider.providerId;
|
||||
}).each(function(attributes) {
|
||||
var classes = 'icon-provider-' + attributes.provider.providerId;
|
||||
attributes.isRealtime === true && (classes += ' realtime');
|
||||
publishLocationIcon.push('<i class="' + classes + '"></i>');
|
||||
});
|
||||
if(publishLocationIcon.length !== 0) {
|
||||
result.push('<i class="icon-share title-icon-category"></i><span class="title-icon-container">');
|
||||
result = result.concat(publishLocationIcon);
|
||||
result.push('</span>');
|
||||
}
|
||||
result.push(' ');
|
||||
result.push(this.title);
|
||||
return result.join('');
|
||||
|
@ -35,7 +35,7 @@ define([
|
||||
buttonPublish.onCreateButton = function() {
|
||||
var button = crel('button', {
|
||||
class: 'btn btn-success button-publish',
|
||||
title: 'Publish this document'
|
||||
title: 'Publish document'
|
||||
}, crel('i', {
|
||||
class: 'icon-share'
|
||||
}));
|
||||
|
@ -19,7 +19,7 @@
|
||||
class="btn btn-success action-create-file" title="New document">
|
||||
<i class="icon-file"></i>
|
||||
</button>
|
||||
<button class="btn btn-success" title="Delete current document"
|
||||
<button class="btn btn-success" title="Delete document"
|
||||
data-toggle="modal" data-target=".modal-remove-file-confirm">
|
||||
<i class="icon-trash"></i>
|
||||
</button></li>
|
||||
@ -29,7 +29,7 @@
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<li><a class="btn btn-success file-title-navbar" href="#"
|
||||
title="Rename current document"> </a></li>
|
||||
title="Rename document"> </a></li>
|
||||
<li><input type="text"
|
||||
class="col-lg-4 form-control hide input-file-title"
|
||||
placeholder="Document title" /></li>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown"
|
||||
title="Share this document">
|
||||
title="Share document">
|
||||
<i class="icon-link"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu pull-right link-container">
|
||||
|
@ -321,9 +321,6 @@ a {
|
||||
max-width: 280px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
i {
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.input-file-title {
|
||||
@ -367,7 +364,6 @@ a {
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
a > i {
|
||||
margin-right: 3px;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
@ -1205,6 +1201,25 @@ div.dropdown-menu textarea {
|
||||
background-position: -144px 0;
|
||||
}
|
||||
|
||||
// File titles
|
||||
.title-icon-category {
|
||||
display: none;
|
||||
.file-title-navbar & {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
opacity: 0.1;
|
||||
margin-left: -8px;
|
||||
margin-right: -8px;
|
||||
margin-top: -2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
.title-icon-container {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* Google picker */
|
||||
.picker-dialog {
|
||||
|
Loading…
Reference in New Issue
Block a user