Skip to content

Instantly share code, notes, and snippets.

@dpobel
Created October 4, 2012 14:31
Show Gist options
  • Select an option

  • Save dpobel/3833889 to your computer and use it in GitHub Desktop.

Select an option

Save dpobel/3833889 to your computer and use it in GitHub Desktop.
{* design/admin/templates/children_detailed.tpl *}
{* ... *}
<script type="text/javascript">
YUI(YUI3_config).use('updatepanels', function (Y) {
{/literal}
// lots of code JS here...
{literal}
// here Y.eZ.updatePanelsHeight is available!
// it can be passed as a paramater to sortableSubitem.init so that it's called
// when necessary
YUILoader.require(['datatable', 'button', 'container', 'cookie', 'element']);
YUILoader.onSuccess = function() {
sortableSubitems.init(confObj, labelsObj, createGroups, createOptions);
};
var options = [];
YUILoader.insert(options, 'js');
});
{/literal}
{undef $section $visible_columns $locales}
</script>
{* ... *}
YUI(YUI3_config).add('updatepanels', function(Y) {
Y.namespace('eZ');
Y.eZ.updatePanelsHeight = function () {
// the code
}
}, '1.0.0', {'requires': ['node']});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment