mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-26 12:45:29 +08:00
fix tooltip, style and code
This commit is contained in:
@ -152,8 +152,16 @@
|
||||
config.callback(btn);
|
||||
}
|
||||
});
|
||||
|
||||
$dlgWarning.on('hidden.bs.modal', function() {
|
||||
$dlgWarning.remove();
|
||||
});
|
||||
|
||||
$dlgWarning.modal('show');
|
||||
$dlgWarning.modal({
|
||||
backdrop: 'static',
|
||||
keyboard: false,
|
||||
show: true
|
||||
});
|
||||
};
|
||||
|
||||
function updateEmbedCode(){
|
||||
|
||||
@ -761,8 +761,8 @@
|
||||
padding: 10px;
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #337ab7;
|
||||
border-color: #2e6da4;
|
||||
background-color: #7d858c;
|
||||
border-color: #7d858c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,8 @@ DE.ApplicationController = new(function(){
|
||||
bodyWidth = 0,
|
||||
requireUserAction = true;
|
||||
|
||||
var LoadingDocument = -256;
|
||||
var LoadingDocument = -256,
|
||||
WarningShown = false;
|
||||
|
||||
// Initialize analytics
|
||||
// -------------------------
|
||||
@ -231,7 +232,7 @@ DE.ApplicationController = new(function(){
|
||||
}
|
||||
|
||||
function onDocMouseMoveEnd() {
|
||||
if (me.isHideBodyTip) {
|
||||
if (me.isHideBodyTip || WarningShown) {
|
||||
if ( $tooltip ) {
|
||||
$tooltip.tooltip('hide');
|
||||
$tooltip = false;
|
||||
@ -666,7 +667,7 @@ DE.ApplicationController = new(function(){
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#dlg-warning').css('z-index', 20002).modal({backdrop: 'static', keyboard: false, show: true});
|
||||
$('#dlg-warning').css('z-index', 20002);
|
||||
$('#dlg-warning button.close, #dlg-warning .modal-footer').remove();
|
||||
return;
|
||||
}
|
||||
@ -771,13 +772,17 @@ DE.ApplicationController = new(function(){
|
||||
if (type===AscCommon.c_oAscUrlType.Http || type===AscCommon.c_oAscUrlType.Email)
|
||||
window.open(url, '_blank');
|
||||
else {
|
||||
WarningShown = true;
|
||||
common.controller.modals.showWarning({
|
||||
title: me.txtTitleWarning,
|
||||
message: me.txtOpenWarning,
|
||||
buttons: [me.txtYes, me.txtNo],
|
||||
primary: me.txtYes,
|
||||
callback: function(btn) {
|
||||
(btn == me.txtYes) && window.open(url);
|
||||
callback: function (btn) {
|
||||
WarningShown = false;
|
||||
if (btn === me.txtYes) {
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -44,7 +44,8 @@ PE.ApplicationController = new(function(){
|
||||
labelDocName,
|
||||
requireUserAction = true;
|
||||
|
||||
var LoadingDocument = -256;
|
||||
var LoadingDocument = -256,
|
||||
WarningShown = false;
|
||||
|
||||
// Initialize analytics
|
||||
// -------------------------
|
||||
@ -216,6 +217,11 @@ PE.ApplicationController = new(function(){
|
||||
}
|
||||
|
||||
function onDocMouseMove(data) {
|
||||
if (WarningShown) {
|
||||
if ($tooltip) {
|
||||
$tooltip.tooltip('hide');
|
||||
}
|
||||
}
|
||||
if (data) {
|
||||
if (data.get_Type() == 1) { // hyperlink
|
||||
me.isHideBodyTip = false;
|
||||
@ -535,7 +541,7 @@ PE.ApplicationController = new(function(){
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#dlg-warning').css('z-index', 20002).modal({backdrop: 'static', keyboard: false, show: true});
|
||||
$('#dlg-warning').css('z-index', 20002);
|
||||
$('#dlg-warning button.close, #dlg-warning .modal-footer').remove();
|
||||
return;
|
||||
}
|
||||
@ -613,13 +619,17 @@ PE.ApplicationController = new(function(){
|
||||
if (type===AscCommon.c_oAscUrlType.Http || type===AscCommon.c_oAscUrlType.Email)
|
||||
window.open(url, '_blank');
|
||||
else {
|
||||
WarningShown = true;
|
||||
common.controller.modals.showWarning({
|
||||
title: me.txtTitleWarning,
|
||||
message: me.txtOpenWarning,
|
||||
buttons: [me.txtYes, me.txtNo],
|
||||
primary: me.txtYes,
|
||||
callback: function(btn) {
|
||||
(btn == me.txtYes) && window.open(url);
|
||||
callback: function (btn) {
|
||||
WarningShown = false;
|
||||
if (btn === me.txtYes) {
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -47,7 +47,8 @@ SSE.ApplicationController = new(function(){
|
||||
ttOffset = [6, -15],
|
||||
labelDocName;
|
||||
|
||||
var LoadingDocument = -256;
|
||||
var LoadingDocument = -256,
|
||||
WarningShown = false;
|
||||
|
||||
// Initialize analytics
|
||||
// -------------------------
|
||||
@ -663,13 +664,17 @@ SSE.ApplicationController = new(function(){
|
||||
if (type===AscCommon.c_oAscUrlType.Http || type===AscCommon.c_oAscUrlType.Email)
|
||||
window.open(url, '_blank');
|
||||
else {
|
||||
WarningShown = true;
|
||||
common.controller.modals.showWarning({
|
||||
title: me.txtTitleWarning,
|
||||
message: me.txtOpenWarning,
|
||||
buttons: [me.txtYes, me.txtNo],
|
||||
primary: me.txtYes,
|
||||
callback: function(btn) {
|
||||
(btn == me.txtYes) && window.open(url);
|
||||
callback: function (btn) {
|
||||
WarningShown = false;
|
||||
if (btn === me.txtYes) {
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -837,6 +842,11 @@ SSE.ApplicationController = new(function(){
|
||||
}
|
||||
|
||||
function onApiMouseMove(array) {
|
||||
if (WarningShown) {
|
||||
if ($tooltip) {
|
||||
$tooltip.tooltip('hide');
|
||||
}
|
||||
}
|
||||
if ( array.length ) {
|
||||
var ttdata;
|
||||
for (var i = array.length; i > 0; i--) {
|
||||
|
||||
@ -44,7 +44,8 @@ VE.ApplicationController = new(function(){
|
||||
labelDocName,
|
||||
requireUserAction = true;
|
||||
|
||||
var LoadingDocument = -256;
|
||||
var LoadingDocument = -256,
|
||||
WarningShown = false;
|
||||
|
||||
// Initialize analytics
|
||||
// -------------------------
|
||||
@ -357,6 +358,11 @@ VE.ApplicationController = new(function(){
|
||||
}
|
||||
|
||||
function onDocMouseMove(data) {
|
||||
if (WarningShown) {
|
||||
if ($tooltip) {
|
||||
$tooltip.tooltip('hide');
|
||||
}
|
||||
}
|
||||
if (data) {
|
||||
if (data.get_Type() == 1) { // hyperlink
|
||||
me.isHideBodyTip = false;
|
||||
@ -605,7 +611,7 @@ VE.ApplicationController = new(function(){
|
||||
buttons: []
|
||||
});
|
||||
|
||||
$('#dlg-warning').css('z-index', 20002).modal({backdrop: 'static', keyboard: false, show: true});
|
||||
$('#dlg-warning').css('z-index', 20002);
|
||||
$('#dlg-warning button.close, #dlg-warning .modal-footer').remove();;
|
||||
return;
|
||||
}
|
||||
@ -656,13 +662,17 @@ VE.ApplicationController = new(function(){
|
||||
if (type===AscCommon.c_oAscUrlType.Http || type===AscCommon.c_oAscUrlType.Email)
|
||||
window.open(url, '_blank');
|
||||
else {
|
||||
WarningShown = true;
|
||||
common.controller.modals.showWarning({
|
||||
title: me.txtTitleWarning,
|
||||
message: me.txtOpenWarning,
|
||||
buttons: [me.txtYes, me.txtNo],
|
||||
primary: me.txtYes,
|
||||
callback: function(btn) {
|
||||
(btn == me.txtYes) && window.open(url);
|
||||
callback: function (btn) {
|
||||
WarningShown = false;
|
||||
if (btn === me.txtYes) {
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user