whitespace and indenting
This commit is contained in:
Родитель
74011e3fc6
Коммит
d8aa4db390
59
js/office.js
59
js/office.js
|
@ -39,10 +39,10 @@ var officeMain = {
|
||||||
var odfToolbarHtml =
|
var odfToolbarHtml =
|
||||||
'<div id="odf-toolbar">' +
|
'<div id="odf-toolbar">' +
|
||||||
' <button id="odf_close">' +
|
' <button id="odf_close">' +
|
||||||
t('files_odfviewer', 'Close') +
|
t('files_odfviewer', 'Close') +
|
||||||
' </button>' +
|
' </button>' +
|
||||||
' <button id="odf_invite">' +
|
' <button id="odf_invite">' +
|
||||||
t('files_odfviewer', 'Invite') +
|
t('files_odfviewer', 'Invite') +
|
||||||
' </button>' +
|
' </button>' +
|
||||||
' <span id="toolbar" class="claro"></span>' +
|
' <span id="toolbar" class="claro"></span>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
@ -97,17 +97,19 @@ var officeMain = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post(OC.Router.generate('office_session_start'),
|
$.post(
|
||||||
{'path': filepath},
|
OC.Router.generate('office_session_start'),
|
||||||
officeMain.initSession
|
{'path': filepath},
|
||||||
);
|
officeMain.initSession
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
joinSession: function(esId) {
|
joinSession: function(esId) {
|
||||||
$.post(OC.Router.generate('office_session_join') + '/' + esId,
|
$.post(
|
||||||
{},
|
OC.Router.generate('office_session_join') + '/' + esId,
|
||||||
officeMain.initSession
|
{},
|
||||||
);
|
officeMain.initSession
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateInfo : function(){
|
updateInfo : function(){
|
||||||
|
@ -116,18 +118,18 @@ var officeMain = {
|
||||||
fileIds.push($(e).attr('data-file'));
|
fileIds.push($(e).attr('data-file'));
|
||||||
});
|
});
|
||||||
$.post(
|
$.post(
|
||||||
OC.Router.generate('office_session_info'),
|
OC.Router.generate('office_session_info'),
|
||||||
{items: fileIds},
|
{items: fileIds},
|
||||||
function (response){
|
function (response){
|
||||||
if (response && response.info && response.info.length){
|
if (response && response.info && response.info.length){
|
||||||
for (var i=0;i<response.info.length;i++){
|
for (var i=0;i<response.info.length;i++){
|
||||||
$('.documentslist li[data-file='+ response.info[i].file_id +'] .session-info').text(
|
$('.documentslist li[data-file='+ response.info[i].file_id +'] .session-info').text(
|
||||||
t('office', 'Users in session:')
|
t('office', 'Users in session:')
|
||||||
+ response.info[i].users
|
+ response.info[i].users
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -183,14 +185,17 @@ $(document).ready(function() {
|
||||||
$('#inivite-input').autocomplete({
|
$('#inivite-input').autocomplete({
|
||||||
minLength: 1,
|
minLength: 1,
|
||||||
source: function(search, response) {
|
source: function(search, response) {
|
||||||
$.get(OC.Router.generate('office_user_search'), {search: $('#inivite-input').val()},
|
$.get(
|
||||||
function(result) {
|
OC.Router.generate('office_user_search'),
|
||||||
if (result.status == 'success' && result.data.length > 0) {
|
{search: $('#inivite-input').val()},
|
||||||
response(result.data);
|
function(result) {
|
||||||
} else {
|
if (result.status === 'success' && result.data.length > 0) {
|
||||||
response([t('core', 'No people found')]);
|
response(result.data);
|
||||||
|
} else {
|
||||||
|
response([t('core', 'No people found')]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
},
|
},
|
||||||
select: function(event, el) {
|
select: function(event, el) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче