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() {
|
FileDescriptor.prototype.composeTitle = function() {
|
||||||
var result = [];
|
var result = [];
|
||||||
var syncAttributesList = _.values(this.syncLocations);
|
var syncAttributesList = _.values(this.syncLocations);
|
||||||
var publishAttributesList = _.values(this.publishLocations);
|
var syncLocationIcon = [];
|
||||||
var attributesList = syncAttributesList.concat(publishAttributesList);
|
_.chain(syncAttributesList).sortBy(function(attributes) {
|
||||||
_.chain(attributesList).sortBy(function(attributes) {
|
|
||||||
return attributes.provider.providerId;
|
return attributes.provider.providerId;
|
||||||
}).each(function(attributes) {
|
}).each(function(attributes) {
|
||||||
var classes = 'icon-provider-' + attributes.provider.providerId;
|
var classes = 'icon-provider-' + attributes.provider.providerId;
|
||||||
if(attributes.isRealtime === true) {
|
attributes.isRealtime === true && (classes += ' realtime');
|
||||||
classes += ' realtime';
|
syncLocationIcon.push('<i class="' + classes + '"></i>');
|
||||||
}
|
|
||||||
result.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(' ');
|
||||||
result.push(this.title);
|
result.push(this.title);
|
||||||
return result.join('');
|
return result.join('');
|
||||||
|
@ -35,7 +35,7 @@ define([
|
|||||||
buttonPublish.onCreateButton = function() {
|
buttonPublish.onCreateButton = function() {
|
||||||
var button = crel('button', {
|
var button = crel('button', {
|
||||||
class: 'btn btn-success button-publish',
|
class: 'btn btn-success button-publish',
|
||||||
title: 'Publish this document'
|
title: 'Publish document'
|
||||||
}, crel('i', {
|
}, crel('i', {
|
||||||
class: 'icon-share'
|
class: 'icon-share'
|
||||||
}));
|
}));
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
class="btn btn-success action-create-file" title="New document">
|
class="btn btn-success action-create-file" title="New document">
|
||||||
<i class="icon-file"></i>
|
<i class="icon-file"></i>
|
||||||
</button>
|
</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">
|
data-toggle="modal" data-target=".modal-remove-file-confirm">
|
||||||
<i class="icon-trash"></i>
|
<i class="icon-trash"></i>
|
||||||
</button></li>
|
</button></li>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
<li><a class="btn btn-success file-title-navbar" href="#"
|
<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"
|
<li><input type="text"
|
||||||
class="col-lg-4 form-control hide input-file-title"
|
class="col-lg-4 form-control hide input-file-title"
|
||||||
placeholder="Document title" /></li>
|
placeholder="Document title" /></li>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown"
|
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown"
|
||||||
title="Share this document">
|
title="Share document">
|
||||||
<i class="icon-link"></i>
|
<i class="icon-link"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu pull-right link-container">
|
<div class="dropdown-menu pull-right link-container">
|
||||||
|
@ -321,9 +321,6 @@ a {
|
|||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
i {
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-file-title {
|
.input-file-title {
|
||||||
@ -367,7 +364,6 @@ a {
|
|||||||
padding-bottom: 30px;
|
padding-bottom: 30px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
a > i {
|
a > i {
|
||||||
margin-right: 3px;
|
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1205,6 +1201,25 @@ div.dropdown-menu textarea {
|
|||||||
background-position: -144px 0;
|
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 */
|
/* Google picker */
|
||||||
.picker-dialog {
|
.picker-dialog {
|
||||||
|
Loading…
Reference in New Issue
Block a user