mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 19:59:54 +09:00
17223554 : xquared upgrade to 0.7
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4968 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5956e254e7
commit
7c3b336e41
59 changed files with 34562 additions and 8454 deletions
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* @requires macro/Base.js
|
||||
*/
|
||||
xq.macro.IFrameMacro = xq.Class(xq.macro.Base,
|
||||
/**
|
||||
* IFrame macro
|
||||
*
|
||||
* @name xq.macro.IFrameMacro
|
||||
* @lends xq.macro.IFrameMacro.prototype
|
||||
* @extends xq.macro.Base
|
||||
* @constructor
|
||||
*/
|
||||
{
|
||||
initFromHtml: function() {
|
||||
this.params.html = this.html;
|
||||
},
|
||||
initFromParams: function() {
|
||||
if(this.params.html) return;
|
||||
|
||||
var sb = [];
|
||||
sb.push('<iframe');
|
||||
for(var attrName in this.params) {
|
||||
var attrValue = this.params[attrName];
|
||||
if(attrValue) sb.push(' ' + attrName.substring("p_".length) + '="' + attrValue + '"');
|
||||
}
|
||||
sb.push('></iframe>');
|
||||
this.params = {html:sb.join("")};
|
||||
},
|
||||
createHtml: function() {
|
||||
return this.params.html;
|
||||
}
|
||||
});
|
||||
xq.macro.IFrameMacro.recognize = function(html) {
|
||||
var p = xq.compilePattern("<IFRAME\\s+[^>]+(?:/>|>.*?</(?:IFRAME)>)", "img");
|
||||
return !!html.match(p);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue