Skip to content

Commit

Permalink
Use new Symphony.Context in JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Dunn committed Feb 5, 2011
1 parent 71fb6cd commit 342d0b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions assets/publish-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ var PublishTabs = {
var has_invalid_tabs = false;
this.tab_controls = jQuery('<ul id="publish-tabs-controls"></ul>');

var publish_tabs = Symphony.Context.get('publish-tabs');

for(tab in publish_tabs) {

var main_fields = '';
Expand Down
2 changes: 1 addition & 1 deletion extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function initializeAdmin($context) {

$page->addElementToHead(new XMLElement(
'script',
'var publish_tabs = ' . json_encode($tabs),
"Symphony.Context.add('publish-tabs', " . json_encode($tabs) . ")",
array('type' => 'text/javascript')
), 987654321);
}
Expand Down

0 comments on commit 342d0b2

Please sign in to comment.