Skip to content

Instantly share code, notes, and snippets.

@brendo
Created March 10, 2011 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendo/863643 to your computer and use it in GitHub Desktop.
Save brendo/863643 to your computer and use it in GitHub Desktop.
Extension Listing export
#overlay {
display: none;
width: 50%;
height: auto;
background: #FFF;
padding: 20px;
border: 1px solid #E6E6E5;
position: absolute;
top: 0;
z-index: 10;
left: 25%;
}
jQuery(document).ready(function() {
var $ = jQuery;
$('#nav').find('+ h2').append(
'<a href="#" class="create button" title="Export">Export</a>'
);
$('body').append(
'<div id="overlay">\
<a href="#" class="close">close</a>\
<pre></pre>\
</div>'
);
$('a.create').live('click', function() {
var $table = $('table').clone();
$table.find('tr td:last-child, th:last-child').remove();
$('#overlay').find('pre').append($table.text()).end().fadeIn();
});
$('a.close').live('click', function() {
$('#overlay').fadeOut();
});
});
<?php
class Extension_Export_Extension_List extends Extension {
/*-------------------------------------------------------------------------
Definition:
-------------------------------------------------------------------------*/
public function about() {
return array(
'name' => 'Export Extension List',
'version' => '0.9',
'release-date' => '2011-03-10',
'author' => array(
'name' => 'Brendan Abbott',
'website' => 'http://bloodbone.ws/',
'email' => 'brendan@bloodbone.ws'
),
'description' => 'Allows you to export the list of all extensions in your Symphony installation.'
);
}
public function getSubscribedDelegates() {
return array(
array(
'page' => '/backend/',
'delegate' => 'InitaliseAdminPageHead',
'callback' => 'initaliseAdminPageHead'
)
);
}
public function initaliseAdminPageHead($context) {
$page = $context['parent']->Page;
if($page instanceof contentSystemExtensions) {
$page->addScriptToHead(URL . '/extensions/export_extension_list/assets/export_extension_list.extensions.js', 100);
$page->addStylesheetToHead(URL . '/extensions/export_extension_list/assets/export_extension_list.extensions.css', 'screen', 101);
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment