Commit af876e0f3a66464588552eb95ab99f204fac2e65

Authored by nbm
1 parent 3493c2fd

Use requireJS* and requireCSS* to include css and javascript


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4298 c91229c3-7414-0410-bfa2-8a42b809f60b
templates/ktcore/metadata/conditional/editsimple.smarty
  1 +{capture assign=sCSS}
1 2 {literal}
2   -<style type="text/css">
3   -
4   -
5 3 /* inactivity */
6 4 .active .inactivity_message { display: none; }
7 5  
... ... @@ -38,30 +36,27 @@
38 36 #brad-log .severity-ERROR { color: red; font-weight: bold; }
39 37 #brad-log .explanation { font-family: monospace; white-space: pre; }
40 38  
41   -
42   -</style>
  39 +{/literal}
  40 +{/capture}
  41 +{$context->oPage->requireCSSStandalone($sCSS)}
43 42  
44 43 <!-- include the mochikit js -->
45   -<script language="javascript" src="/thirdpartyjs/MochiKit/Base.js"> </script>
46   -<script language="javascript" src="/thirdpartyjs/MochiKit/DateTime.js"> </script>
47   -<script language="javascript" src="/thirdpartyjs/MochiKit/Iter.js"> </script>
48   -<script language="javascript" src="/thirdpartyjs/MochiKit/Async.js"> </script>
49   -<script language="javascript" src="/thirdpartyjs/MochiKit/DOM.js"> </script>
  44 +{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Base.js")}
  45 +{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DateTime.js")}
  46 +{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Iter.js")}
  47 +{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Async.js")}
  48 +{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DOM.js")}
50 49  
51   -<script language="javascript" src="/presentation/lookAndFeel/knowledgeTree/js/taillog.js"> </script>
52   -<script language="javascript" src="/presentation/lookAndFeel/knowledgeTree/js/conditional_simple_edit.js"> </script>
  50 +{$context->oPage->requireJSResource("presentation/lookAndFeel/knowledgeTree/js/taillog.js")}
  51 +{$context->oPage->requireJSResource("presentation/lookAndFeel/knowledgeTree/js/conditional_simple_edit.js")}
53 52  
54 53  
55 54  
56   -<!-- custom JS -->
57   -
58   -<script language="javascript">
59   -{/literal}
  55 +{capture assign=sJS}
60 56 addLoadEvent(partial(editSimpleField, {$iMasterFieldId}));
61   -{literal}
62   -</script>
  57 +{/capture}
  58 +{$context->oPage->requireJSStandalone($sJS)}
63 59  
64   -{/literal}
65 60  
66 61  
67 62 <h2>Editing Fieldset Rules (Simple)</h2>
... ...