Fix #826
This commit is contained in:
parent
5b079f0518
commit
190e1dd5b9
@ -12621,23 +12621,20 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($.hasClass(this, "embedded")) {
|
if ($.hasClass(this, "embedded")) {
|
||||||
if (!$.hasClass(this.previousElementSibling, 'linkify')) {
|
$.rm(this.nextElementSibling);
|
||||||
$.rm(this.previousElementSibling);
|
|
||||||
}
|
|
||||||
this.previousElementSibling.hidden = false;
|
|
||||||
this.textContent = '(embed)';
|
this.textContent = '(embed)';
|
||||||
} else {
|
} else {
|
||||||
this.previousElementSibling.hidden = true;
|
$.after(this, Embedding.cb.embed(this));
|
||||||
$.before(this, Embedding.cb.embed(this));
|
|
||||||
this.textContent = '(unembed)';
|
this.textContent = '(unembed)';
|
||||||
}
|
}
|
||||||
return $.toggleClass(this, 'embedded');
|
return $.toggleClass(this, 'embedded');
|
||||||
},
|
},
|
||||||
embed: function(a) {
|
embed: function(a) {
|
||||||
var el, type;
|
var container, el, type;
|
||||||
el = (type = Embedding.types[a.dataset.key]).el(a);
|
container = $.el('div');
|
||||||
el.style.cssText = type.style != null ? type.style : "border: 0; width: 640px; height: 390px";
|
$.add(container, el = (type = Embedding.types[a.dataset.key]).el(a));
|
||||||
return el;
|
el.style.cssText = type.style != null ? type.style : "border:0;width:640px;height:390px";
|
||||||
|
return container;
|
||||||
},
|
},
|
||||||
title: function(req, data) {
|
title: function(req, data) {
|
||||||
var key, link, link2, options, post, post2, service, status, text, uid, _i, _j, _len, _len1, _ref, _ref1;
|
var key, link, link2, options, post, post2, service, status, text, uid, _i, _j, _len, _len1, _ref, _ref1;
|
||||||
|
|||||||
@ -12644,23 +12644,20 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($.hasClass(this, "embedded")) {
|
if ($.hasClass(this, "embedded")) {
|
||||||
if (!$.hasClass(this.previousElementSibling, 'linkify')) {
|
$.rm(this.nextElementSibling);
|
||||||
$.rm(this.previousElementSibling);
|
|
||||||
}
|
|
||||||
this.previousElementSibling.hidden = false;
|
|
||||||
this.textContent = '(embed)';
|
this.textContent = '(embed)';
|
||||||
} else {
|
} else {
|
||||||
this.previousElementSibling.hidden = true;
|
$.after(this, Embedding.cb.embed(this));
|
||||||
$.before(this, Embedding.cb.embed(this));
|
|
||||||
this.textContent = '(unembed)';
|
this.textContent = '(unembed)';
|
||||||
}
|
}
|
||||||
return $.toggleClass(this, 'embedded');
|
return $.toggleClass(this, 'embedded');
|
||||||
},
|
},
|
||||||
embed: function(a) {
|
embed: function(a) {
|
||||||
var el, type;
|
var container, el, type;
|
||||||
el = (type = Embedding.types[a.dataset.key]).el(a);
|
container = $.el('div');
|
||||||
el.style.cssText = type.style != null ? type.style : "border: 0; width: 640px; height: 390px";
|
$.add(container, el = (type = Embedding.types[a.dataset.key]).el(a));
|
||||||
return el;
|
el.style.cssText = type.style != null ? type.style : "border:0;width:640px;height:390px";
|
||||||
|
return container;
|
||||||
},
|
},
|
||||||
title: function(req, data) {
|
title: function(req, data) {
|
||||||
var key, link, link2, options, post, post2, service, status, text, uid, _i, _j, _len, _len1, _ref, _ref1;
|
var key, link, link2, options, post, post2, service, status, text, uid, _i, _j, _len, _len1, _ref, _ref1;
|
||||||
|
|||||||
@ -117,26 +117,25 @@ Embedding =
|
|||||||
$.rmClass Embedding.dialog, 'empty'
|
$.rmClass Embedding.dialog, 'empty'
|
||||||
return
|
return
|
||||||
if $.hasClass @, "embedded"
|
if $.hasClass @, "embedded"
|
||||||
$.rm @previousElementSibling unless $.hasClass @previousElementSibling, 'linkify'
|
$.rm @nextElementSibling
|
||||||
@previousElementSibling.hidden = false
|
|
||||||
@textContent = '(embed)'
|
@textContent = '(embed)'
|
||||||
else
|
else
|
||||||
@previousElementSibling.hidden = true
|
$.after @, Embedding.cb.embed @
|
||||||
$.before @, Embedding.cb.embed @
|
|
||||||
@textContent = '(unembed)'
|
@textContent = '(unembed)'
|
||||||
$.toggleClass @, 'embedded'
|
$.toggleClass @, 'embedded'
|
||||||
|
|
||||||
embed: (a) ->
|
embed: (a) ->
|
||||||
# We create an element to embed
|
# We create an element to embed
|
||||||
el = (type = Embedding.types[a.dataset.key]).el a
|
container = $.el 'div'
|
||||||
|
$.add container, el = (type = Embedding.types[a.dataset.key]).el a
|
||||||
|
|
||||||
# Set style values.
|
# Set style values.
|
||||||
el.style.cssText = if type.style?
|
el.style.cssText = if type.style?
|
||||||
type.style
|
type.style
|
||||||
else
|
else
|
||||||
"border: 0; width: 640px; height: 390px"
|
"border:0;width:640px;height:390px"
|
||||||
|
|
||||||
return el
|
return container
|
||||||
|
|
||||||
title: (req, data) ->
|
title: (req, data) ->
|
||||||
{key, uid, options, link, post} = data
|
{key, uid, options, link, post} = data
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user