Created
March 10, 2011 06:04
-
-
Save brendo/863643 to your computer and use it in GitHub Desktop.
Extension Listing export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#overlay { | |
display: none; | |
width: 50%; | |
height: auto; | |
background: #FFF; | |
padding: 20px; | |
border: 1px solid #E6E6E5; | |
position: absolute; | |
top: 0; | |
z-index: 10; | |
left: 25%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' => '[email protected]' | |
), | |
'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