Skip to content

Commit

Permalink
Static resources; adding js
Browse files Browse the repository at this point in the history
  • Loading branch information
smcmahon committed May 12, 2011
1 parent bd3260d commit 1e436ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="collective.dexterity_class">

<metal:javascriptslot fill-slot="javascript_head_slot">
<script type="text/javascript" src="test.js"
tal:attributes="src string:${view/static}/test.js"></script>
</metal:javascriptslot>

<body>

<tal:comment tal:condition="nothing">
Expand All @@ -28,7 +34,7 @@

<div tal:content="context/text_line">Text Line Field Here</div>

<div tal:content="view/upperLine">Upper-Case Text Line Field Here</div>
<div class="upperLine" tal:content="view/upperLine">Upper-Case Text Line Field Here</div>

<div tal:content="context/text_field" tal:condition="context/text_field">
Text Field Here
Expand Down
3 changes: 3 additions & 0 deletions collective/dexterity_class/static/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jQuery(function($){
$('.upperLine').css('color', 'red');
});

0 comments on commit 1e436ad

Please sign in to comment.