Skip to content

Commit

Permalink
Added README and JS embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
rc1 committed Dec 19, 2010
1 parent 777583e commit 57c6d43
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
Empty file removed README
Empty file.
23 changes: 23 additions & 0 deletions README.markdown
@@ -0,0 +1,23 @@
Piano: Keyboard Shortcut Extension for Symphony
===============================================

A Symphony CMS extension that enables the use of the keyboard shortcuts (Currently ⌘+S and ⌘+N to save and create new entries respectively.)

Status:
* Proof of concept
* implements: ⌘+S and ⌘+N
* Missing
* PC Support.
* Future
* More:
* Delete selected when listing entries
* ...

-------------------

- Version: 0.1
- Author: Ross Cairns <ross[~~]electricglen.com>
- Build Date: 19th Dec 2010
- Requirements: unsure

-------------------
5 changes: 5 additions & 0 deletions assets/piano.js
@@ -0,0 +1,5 @@
(function($){
$(document).ready(function(){
console.log("Piano Activated");
});
})(jQuery);
41 changes: 41 additions & 0 deletions extension.driver.php
@@ -0,0 +1,41 @@
<?php

class extension_thumbnail extends Extension {

public function about(){
return array(
'name' => 'Piano',
'version' => '0.1',
'release-date' => '19th Dec 2010',
'author' => array(
'name' => 'Ross Cairns',
'website' => 'http://rosscairns.com/',
'email' => 'ross[~~]electricglen.com'
)
);
}

public function getSubscribedDelegates()
{
return array(
array(
'page' => '/administration/',
'delegate' => 'AdminPagePreGenerate',
'callback' => '__appendAssets'
)
);
}

public function __appendAssets($context)
{
$callback = $this->_Parent->getPageCallback();

if ($callback['driver'] == 'publish' && ($callback['context']['page'] == 'index' || $callback['context']['page'] == 'edit'))
{
$page = Administration::instance()->Page;

$page->addScriptToHead(URL . '/extensions/thumbnail/assets/piano.js', 105);
}
}

}

0 comments on commit 57c6d43

Please sign in to comment.