diff --git a/public/res/classes/FileDescriptor.js b/public/res/classes/FileDescriptor.js index 90e3f893..0ce30d3a 100644 --- a/public/res/classes/FileDescriptor.js +++ b/public/res/classes/FileDescriptor.js @@ -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(''); + attributes.isRealtime === true && (classes += ' realtime'); + syncLocationIcon.push(''); }); + if(syncLocationIcon.length !== 0) { + result.push(''); + result = result.concat(syncLocationIcon); + result.push(''); + } + 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(''); + }); + if(publishLocationIcon.length !== 0) { + result.push(''); + result = result.concat(publishLocationIcon); + result.push(''); + } result.push(' '); result.push(this.title); return result.join(''); diff --git a/public/res/extensions/buttonPublish.js b/public/res/extensions/buttonPublish.js index 6cbbdfe3..47a2ceb4 100644 --- a/public/res/extensions/buttonPublish.js +++ b/public/res/extensions/buttonPublish.js @@ -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' })); diff --git a/public/res/html/bodyIndex.html b/public/res/html/bodyIndex.html index 4da4e1d6..b1864bf6 100644 --- a/public/res/html/bodyIndex.html +++ b/public/res/html/bodyIndex.html @@ -19,7 +19,7 @@ class="btn btn-success action-create-file" title="New document"> - @@ -29,7 +29,7 @@