Browse Source

Rename select2 input id to select-participants.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
pull/374/head
Ivan Sein 8 years ago
parent
commit
42bcae4549
  1. 10
      js/app.js
  2. 8
      js/calls.js
  3. 2
      templates/index.php

10
js/app.js

@ -39,7 +39,7 @@
_searchTerm: '',
guestNick: null,
_registerPageEvents: function() {
$('#edit-roomname').select2({
$('#select-participants').select2({
ajax: {
url: OC.linkToOCS('apps/files_sharing/api/v1') + 'sharees',
dataType: 'json',
@ -110,7 +110,7 @@
}
});
$('#edit-roomname').on("click", function() {
$('#select-participants').on("click", function() {
$('.select2-drop').find('.avatar').each(function () {
var element = $(this);
if (element.data('user-display-name')) {
@ -121,7 +121,7 @@
});
});
$('#edit-roomname').on("select2-selecting", function(e) {
$('#select-participants').on("select2-selecting", function(e) {
switch (e.object.type) {
case "user":
OCA.SpreedMe.Calls.createOneToOneVideoCall(e.val);
@ -138,7 +138,7 @@
}
});
$('#edit-roomname').on("select2-loaded", function() {
$('#select-participants').on("select2-loaded", function() {
$('.select2-drop').find('.avatar').each(function () {
var element = $(this);
if (element.data('user-display-name')) {
@ -520,7 +520,7 @@
self._roomsView.render();
if (data.length === 0) {
$('#edit-roomname').select2('open');
$('#select-participants').select2('open');
}
});
}

8
js/calls.js

@ -11,10 +11,10 @@
function initCalls(signaling_connection) {
signaling = signaling_connection;
var editRoomname = $('#edit-roomname');
editRoomname.keyup(function () {
editRoomname.tooltip('hide');
editRoomname.removeClass('error');
var selectParticipants = $('#select-participants');
selectParticipants.keyup(function () {
selectParticipants.tooltip('hide');
selectParticipants.removeClass('error');
});
OCA.SpreedMe.Calls.leaveAllCalls();

2
templates/index.php

@ -28,7 +28,7 @@ script(
<div id="app" class="nc-enable-screensharing-extension" data-token="<?php p($_['token']) ?>">
<div id="app-navigation" class="icon-loading">
<form id="oca-spreedme-add-room">
<input id="edit-roomname" class="select2-offscreen" type="text" placeholder="<?php p($l->t('Choose person …')) ?>"/>
<input id="select-participants" class="select2-offscreen" type="text" placeholder="<?php p($l->t('Choose person …')) ?>"/>
</form>
<ul id="spreedme-room-list" class="with-icon">
</ul>

Loading…
Cancel
Save