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