restore file
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2328080 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
1cb34d3856
commit
a8cfa83ca3
8 changed files with 72 additions and 30 deletions
|
@ -146,7 +146,7 @@ class MCI_Footnotes_Layout_Init {
|
||||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher");
|
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher");
|
||||||
echo $l_obj_Template->getContent();
|
echo $l_obj_Template->getContent();
|
||||||
|
|
||||||
printf('<em>visit <a href="http://cheret.de" target="_blank">Mark Cheret</a> or <a href="http://herndler.org" target="_blank">herndler.org</a></em>');
|
printf('<em>visit <a href="http://manfisher.net/" target="_blank">ManFisher Medien ManuFaktur</a> or <a href="http://herndler.org" target="_blank">herndler.org</a></em>');
|
||||||
printf("<br/><br/>");
|
printf("<br/><br/>");
|
||||||
printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
printf("<h3>%s</h3>", __('Take a look on other Plugins we have developed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,7 @@ class MCI_Footnotes {
|
||||||
MCI_Footnotes_WYSIWYG::registerHooks();
|
MCI_Footnotes_WYSIWYG::registerHooks();
|
||||||
// register general hooks
|
// register general hooks
|
||||||
MCI_Footnotes_Hooks::registerHooks();
|
MCI_Footnotes_Hooks::registerHooks();
|
||||||
// register all Widgets of the Plugin.
|
|
||||||
$this->initializeWidgets();
|
|
||||||
// initialize the Plugin Dashboard
|
// initialize the Plugin Dashboard
|
||||||
$this->initializeDashboard();
|
$this->initializeDashboard();
|
||||||
// initialize the Plugin Task
|
// initialize the Plugin Task
|
||||||
|
@ -49,6 +48,8 @@ class MCI_Footnotes {
|
||||||
add_action('init', array($this, 'registerPublic'));
|
add_action('init', array($this, 'registerPublic'));
|
||||||
// Enqueue all Public Stylesheets and Scripts
|
// Enqueue all Public Stylesheets and Scripts
|
||||||
add_action('wp_enqueue_scripts', array($this, 'registerPublic'));
|
add_action('wp_enqueue_scripts', array($this, 'registerPublic'));
|
||||||
|
// Register all Widgets of the Plugin.
|
||||||
|
add_action('widgets_init', array($this, 'initializeWidgets'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,8 +58,8 @@ class MCI_Footnotes {
|
||||||
* @author Stefan Herndler
|
* @author Stefan Herndler
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
private function initializeWidgets() {
|
public function initializeWidgets() {
|
||||||
add_action('widgets_init', create_function('', 'return register_widget("MCI_Footnotes_Widget_ReferenceContainer");'));
|
register_widget("MCI_Footnotes_Widget_ReferenceContainer");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Plugin URI: http://wordpress.org/plugins/footnotes/
|
Plugin URI: http://wordpress.org/plugins/footnotes/
|
||||||
Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
|
Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
|
||||||
Author: Mark Cheret
|
Author: Mark Cheret
|
||||||
Version: 1.6.5
|
Version: 1.6.4
|
||||||
Author URI: http://cheret.de/plugins/footnotes-2/
|
Author URI: http://cheret.de/plugins/footnotes-2/
|
||||||
Text Domain: footnotes
|
Text Domain: footnotes
|
||||||
Domain Path: /languages
|
Domain Path: /languages
|
||||||
|
|
|
@ -61,8 +61,8 @@
|
||||||
getInfo : function() {
|
getInfo : function() {
|
||||||
return {
|
return {
|
||||||
longname : 'Inserts the Footnotes short code.',
|
longname : 'Inserts the Footnotes short code.',
|
||||||
author : 'Mark Cheret',
|
author : 'ManFisher Medien ManuFaktur',
|
||||||
authorurl : 'http://cheret.de',
|
authorurl : 'http://http://manfisher.net/',
|
||||||
infourl : 'http://wordpress.org/plugins/footnotes/',
|
infourl : 'http://wordpress.org/plugins/footnotes/',
|
||||||
version : "1.5.0"
|
version : "1.5.0"
|
||||||
};
|
};
|
||||||
|
|
41
templates/dashboard/editor-button.html
Normal file
41
templates/dashboard/editor-button.html
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
<script type="text/javascript">
|
||||||
|
/**
|
||||||
|
* adds a tag in at the beginning and at the end of a selected text in the specific text area
|
||||||
|
* @param string elementID
|
||||||
|
* @param string openTag
|
||||||
|
* @param string closeTag
|
||||||
|
*/
|
||||||
|
function MCI_Footnotes_wrapText(elementID, openTag, closeTag) {
|
||||||
|
var textArea = jQuery('#' + elementID);
|
||||||
|
var len = textArea.val().length;
|
||||||
|
var start = textArea[0].selectionStart;
|
||||||
|
var end = textArea[0].selectionEnd;
|
||||||
|
var selectedText = textArea.val().substring(start, end);
|
||||||
|
var replacement = openTag + selectedText + closeTag;
|
||||||
|
textArea.val(textArea.val().substring(0, start) + replacement + textArea.val().substring(end, len));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* adds a new button to the plain text editor
|
||||||
|
*/
|
||||||
|
QTags.addButton( 'MCI_Footnotes_QuickTag_button', 'footnotes', MCI_Footnotes_text_editor_callback );
|
||||||
|
/**
|
||||||
|
* callback function when the button is clicked
|
||||||
|
* executes a ajax call to get the start and end tag for the footnotes and
|
||||||
|
* adds them in before and after the selected text
|
||||||
|
*/
|
||||||
|
function MCI_Footnotes_text_editor_callback() {
|
||||||
|
jQuery.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '/wp-admin/admin-ajax.php',
|
||||||
|
data: {
|
||||||
|
action: 'footnotes_getTags'
|
||||||
|
},
|
||||||
|
success: function(data, textStatus, XMLHttpRequest){
|
||||||
|
var l_arr_Tags = JSON.parse(data);
|
||||||
|
MCI_Footnotes_wrapText("content", l_arr_Tags['start'], l_arr_Tags['end']);
|
||||||
|
},
|
||||||
|
error: function(MLHttpRequest, textStatus, errorThrown){
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
Reference in a new issue