Updates jquery-impromptu in order to fix issues with modal dialogs.

This commit is contained in:
paweldomas 2015-03-10 13:47:47 +01:00
parent f48633fa1d
commit c296940fd4
6 changed files with 767 additions and 559 deletions

View File

@ -41,7 +41,7 @@
Link used for inline installation of chrome desktop streaming extension,
is updated automatically from the code with the value defined in config.js -->
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/diibjkoicjeejcmhdnailmkgecihlobk">
<script src="libs/jquery-impromptu.js"></script>
<script src="libs/jquery-impromptu.js?v=2"></script>
<script src="libs/jquery.autosize.js"></script>
</head>
<body>

1273
libs/jquery-impromptu.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
/* global $, APP */
/* Initial "authentication required" dialog */
var authDialog = null;
/* Loop retry ID that wits for other user to create the room */
@ -8,7 +10,7 @@ var Authentication = {
openAuthenticationDialog: function (roomName, intervalCallback, callback) {
// This is the loop that will wait for the room to be created by
// someone else. 'auth_required.moderator' will bring us back here.
authRetryId = window.setTimeout(intervalCallback , 5000);
authRetryId = window.setTimeout(intervalCallback, 5000);
// Show prompt only if it's not open
if (authDialog !== null) {
return;
@ -19,10 +21,11 @@ var Authentication = {
var title = APP.translation.generateTranslatonHTML("dialog.Stop");
var msg = APP.translation.generateTranslatonHTML("dialog.AuthMsg",
{room: room});
var button = APP.translation.generateTranslatonHTML(
"dialog.Authenticate");
var buttons = {};
buttons.authenticate = {title: button, value: "authNow"};
var buttonTxt
= APP.translation.generateTranslatonHTML("dialog.Authenticate");
var buttons = [];
buttons.push({title: buttonTxt, value: "authNow"});
authDialog = APP.UI.messageHandler.openDialog(
title,
@ -41,7 +44,7 @@ var Authentication = {
}
);
},
closeAuthenticationWindow:function () {
closeAuthenticationWindow: function () {
if (authenticationWindow) {
authenticationWindow.close();
authenticationWindow = null;

View File

@ -66,11 +66,15 @@ var Prezi = {
"dialog.Share");
var backButton = APP.translation.generateTranslatonHTML(
"dialog.Back");
var buttons = {};
var buttons1 = {};
buttons1.button1 = buttons.button1 = {title: cancelButton, value: false};
buttons.button2 = {title: shareButton, value: true};
buttons1.button2 = {title: backButton, value: true};
var buttons = [];
var buttons1 = [];
// Cancel button to both states
buttons.push({title: cancelButton, value: false});
buttons1.push({title: cancelButton, value: false});
// Share button
buttons.push({title: shareButton, value: true});
// Back button
buttons1.push({title: backButton, value: true});
var linkError = APP.translation.generateTranslatonHTML(
"dialog.preziLinkError");
var defaultUrl = APP.translation.translateString("defaultPreziLink",

View File

@ -104,8 +104,8 @@ function hangup() {
"dialog.hungUp");
var button = APP.translation.generateTranslatonHTML(
"dialog.joinAgain");
var buttons = {};
buttons.joinAgain = {title: button, value: true};
var buttons = [];
buttons.push({title: button, value: true});
UI.messageHandler.openDialog(
title,

View File

@ -1,4 +1,4 @@
/* global $, jQuery */
/* global $, APP, jQuery, toastr */
var messageHandler = (function(my) {
/**
@ -37,17 +37,21 @@ var messageHandler = (function(my) {
persistent, leftButtonKey, submitFunction, loadedFunction,
closeFunction)
{
var buttons = [];
var leftButton = APP.translation.generateTranslatonHTML(leftButtonKey);
var buttons = {};
buttons.button1 = {title: leftButton, value: true};
var cancelButton = APP.translation.generateTranslatonHTML("dialog.Cancel");
buttons.button2 = {title: cancelButton, value: false};
buttons.push({ title: leftButton, value: true});
var cancelButton
= APP.translation.generateTranslatonHTML("dialog.Cancel");
buttons.push({title: cancelButton, value: false});
var message = msgString, title = titleString;
if(titleKey)
if (titleKey)
{
title = APP.translation.generateTranslatonHTML(titleKey);
}
if(msgKey) {
if (msgKey) {
message = APP.translation.generateTranslatonHTML(msgKey);
}
$.prompt(message, {