Clean createHelper

pull/1/head
yflory 4 years ago
parent ac153690f9
commit 7d460bae8f

@ -2111,13 +2111,8 @@ define([
var origin = privateData.origin;
var createHelper = function (href, text) {
var q = h('a.cp-creation-help.fa.fa-question-circle', {
'data-cptippy-html': true,
title: text,
href: origin + href,
target: "_blank",
'data-tippy-placement': "right"
});
var q = UI.createHelper(origin + href, text);
$(q).addClass('cp-creation-help');
return q;
};

@ -2473,15 +2473,7 @@ define([
// Get the upload options
var addSharedFolderModal = function (cb) {
var createHelper = function (href, text) {
var q = h('a.fa.fa-question-circle', {
style: 'text-decoration: none !important;',
'data-cptippy-html': true,
title: text,
href: APP.origin + href,
target: "_blank",
'data-tippy-placement': "right"
});
return q;
return UI.createHelper(APP.origin + href, text);
};
// Ask for name, password and owner

@ -551,8 +551,11 @@ define([
funcs.gotoURL = function (url) { ctx.sframeChan.event('EV_GOTO_URL', url); };
funcs.openURL = function (url) { ctx.sframeChan.event('EV_OPEN_URL', url); };
funcs.getBounceURL = function (url) {
return window.location.origin + '/bounce/#' + encodeURIComponent(url);
};
funcs.openUnsafeURL = function (url) {
var bounceHref = window.location.origin + '/bounce/#' + encodeURIComponent(url);
var bounceHref = getBounceURL(url);
window.open(bounceHref);
};

Loading…
Cancel
Save