Commit 118de918 authored by Ivan Tyagov's avatar Ivan Tyagov

Try to use jquery from adsafe block.

parent cf80d76d
......@@ -41,7 +41,9 @@
\074script src="adsafe.js"\076\074/script\076\n
\074script src="jquery/core/jquery.js"\076\074/script\076\n
\074script src="jquery/plugin/renderjs/renderjs.js"\076\074/script\076\n
\074script src="interactor.js"\076\074/script\076\n
\074script src="jquery/ui/js/jquery-ui.js"\076\074/script\076\n
\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" /\076\n
\n
\074/head\076\n
\n
......@@ -49,7 +51,8 @@
\n
\074h1\076test\074/h1\076\n
\n
\074div id="content" gadget="test_gadgets/A"\076\074/div\076\n
\074!-- \074div id="content" gadget="test_gadgets/A"\076\074/div\076 --\076\n
\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
......@@ -57,7 +60,7 @@
$(document).ready(function() {\n
RenderJs.bootstrap($("#content"));\n
// XXX: we use timeouts as we do not know if gadget structure is yet ready, how to do that in a generic way?\n
window.setTimeout(\'RenderJs.update($("#content"));\', DEFAULT_GADGET_DOM_READY_TIMEOUT);\n
//window.setTimeout(\'RenderJs.update($("#content"));\', DEFAULT_GADGET_DOM_READY_TIMEOUT);\n
});\n
//]]\076\n
\074/script\076\n
......@@ -65,16 +68,17 @@
\074!-- Adsafe test --\076\n
\074div id="WIDGETNAME_"\076\n
Adsafe\n
\n
\074input type=text autocomplete=off\076\n
\n
\074script type="text/javascript" language="javascript"\076\n
ADSAFE.go("WIDGETNAME_", function (dom) {\n
ADSAFE.go("WIDGETNAME_", function (dom) {\n
"use strict";\n
eval("alert(\'1\');");\n
// This is where the code for the widget is placed. It can access\n
// the document through the dom parameter, allowing it indirect\n
// access to html elements, allowing it to change content, styling,\n
// and behavior.\n
\n
});\n
var input = dom.q("input_text");\n
alert(input);\n
input.datepicker({ dateFormat: \'dd/mm/yy\' });\n
input.datepicker(\'setDate\', Date());\n
});\n
\074/script\076\n
\074/div\076\n
\n
......
6
\ No newline at end of file
7
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment