mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
New styles for toltips (Opentip)
Selector new functionality x-script tag support for templates
This commit is contained in:
parent
c1c817c837
commit
80c5e35a29
47 changed files with 2641 additions and 315 deletions
38
dev/Component/Script.js
Normal file
38
dev/Component/Script.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
AbstractComponent = require('Component/Abstract')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {Object} oParams
|
||||
*
|
||||
* @extends AbstractComponent
|
||||
*/
|
||||
function ScriptComponent(oParams)
|
||||
{
|
||||
AbstractComponent.call(this);
|
||||
|
||||
if (oParams.component && oParams.component.templateNodes && oParams.element)
|
||||
{
|
||||
oParams.element.text('');
|
||||
if (oParams.component.templateNodes[0] && oParams.component.templateNodes[0].nodeValue)
|
||||
{
|
||||
oParams.element.replaceWith(
|
||||
$('<script></script>').text(oParams.component.templateNodes[0].nodeValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_.extend(ScriptComponent.prototype, AbstractComponent.prototype);
|
||||
|
||||
module.exports = AbstractComponent.componentExportHelper(ScriptComponent);
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue