Skip to content

Commit

Permalink
Add AjaxManager support
Browse files Browse the repository at this point in the history
  • Loading branch information
danyaPostfactum committed Jun 10, 2013
1 parent 0e21730 commit e57006c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="babel-language[[+className:notempty=` [[+className]]`]]">
<a href="[[+resourceUrl]]">[[%babel.language_[[+cultureKey]]? &topic=`default` &namespace=`babel`]] ([[+contextKey]])</a>
<a href="[[+resourceUrl]]" onclick="[[+resourceId:notempty=`MODx.loadPage(MODx.action['resource/update'], 'id=[[+resourceId]]');`]]return false">[[%babel.language_[[+cultureKey]]? &topic=`default` &namespace=`babel`]] ([[+contextKey]])</a>
[[+showLayer:notempty=`
<div class="babel-language-layer">
<form method="post" action="[[+formUrl]]">
Expand Down
13 changes: 11 additions & 2 deletions core/components/babel/elements/plugins/babel.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,17 @@
$modx->event->output($output);

/* include CSS */
$modx->regClientCSS($babel->config['cssUrl'].'babel.css?v=6');
$modx->regClientStartupScript($babel->config['jsUrl'].'babel.js?v=3');
$modx->controller->addCss($babel->config['cssUrl'].'babel.css');
$modx->controller->addHtml('<script type="text/javascript">
Ext.onReady(function() {
Ext.select("div.babel-language:has(.babel-language-layer)").on("mouseenter", function(){
Ext.get(this).child(".babel-language-layer").show();
})
.on("mouseleave", function(){
Ext.get(this).child(".babel-language-layer").hide();
});
});
</script>');
break;

case 'OnDocFormSave':
Expand Down

0 comments on commit e57006c

Please sign in to comment.