Compare commits

..

No commits in common. "media-uploader" and "master" have entirely different histories.

2 changed files with 5 additions and 30 deletions

View File

@ -192,13 +192,12 @@ class ComicPressAddonCore extends ComicPressAddon {
* Set up the admin interface and meta boxes. * Set up the admin interface and meta boxes.
*/ */
function setup_admin_interface() { function setup_admin_interface() {
global $plugin_page, $pagenow, $post; global $plugin_page;
add_theme_page(__("ComicPress Core", 'comicpress'), __('ComicPress Core', 'comicpress'), 'edit_themes', 'comicpress/render_admin', array(&$this, 'render_admin')); add_theme_page(__("ComicPress Core", 'comicpress'), __('ComicPress Core', 'comicpress'), 'edit_themes', 'comicpress/render_admin', array(&$this, 'render_admin'));
add_theme_page(__("Edit Partials", 'comicpress'), __('Edit Partials', 'comicpress'), 'edit_themes', 'comicpress/edit_partials', array(&$this, 'render_edit_partials')); add_theme_page(__("Edit Partials", 'comicpress'), __('Edit Partials', 'comicpress'), 'edit_themes', 'comicpress/edit_partials', array(&$this, 'render_edit_partials'));
if (strpos($page, "edit") === 0) { if (isset($_REQUEST['post'])) {
var_dump($post);
add_meta_box("comic-image-ordering", __("Comic Image Ordering", 'comicpress'), array(&$this, 'render_comic_image_ordering'), "post", "normal", "low"); add_meta_box("comic-image-ordering", __("Comic Image Ordering", 'comicpress'), array(&$this, 'render_comic_image_ordering'), "post", "normal", "low");
} }
@ -206,11 +205,7 @@ class ComicPressAddonCore extends ComicPressAddon {
wp_enqueue_style('cp-admin', get_stylesheet_directory_uri() . '/css/cp-admin.css'); wp_enqueue_style('cp-admin', get_stylesheet_directory_uri() . '/css/cp-admin.css');
wp_enqueue_script('cp-admin', get_stylesheet_directory_uri() . '/js/Storyline.js', array('jquery', 'jquery-ui-sortable')); wp_enqueue_script('cp-admin', get_stylesheet_directory_uri() . '/js/Storyline.js', array('jquery', 'jquery-ui-sortable'));
} }
}
if (strpos($pagenow, "media-upload") === 0) {
wp_enqueue_script('cp-media', get_stylesheet_directory_uri() . '/js/MediaUpload.js', array('jquery'));
}
}
/** /**
* Show comic media. * Show comic media.
@ -263,7 +258,6 @@ class ComicPressAddonCore extends ComicPressAddon {
global $pagenow; global $pagenow;
$current_type = get_post_meta($post->ID, 'comic_image_type', true); $current_type = get_post_meta($post->ID, 'comic_image_type', true);
if (empty($current_type)) { $current_type = reset(array_keys($this->comic_image_types)); }
$field_html_lines = array(); $field_html_lines = array();
$field_html_lines[] = '<input type="hidden" name="cp[_nonce]" value="' . wp_create_nonce('comicpress') . '" />'; $field_html_lines[] = '<input type="hidden" name="cp[_nonce]" value="' . wp_create_nonce('comicpress') . '" />';

View File

@ -1,19 +0,0 @@
jQuery(function() {
jQuery('.media-item').each(function() {
var item = this;
jQuery('.savesend', item).each(function() {
jQuery(this).prepend(jQuery('<input type="submit" name="save" value="Save changes" />').addClass('button'));
});
var show_insert = function(t) {
jQuery('input[name*=send]', item)[(t.value == 'none') ? 'show' : 'hide']();
};
jQuery('input[name*=comic_image_type]', item).bind('click', function() { show_insert(this); });
var type = jQuery('input[name*=comic_image_type][checked]', item).get(0);
if (type) {
jQuery('.filename.new', item).append(jQuery('<strong />').text(' (' + jQuery.trim(jQuery(type).parent().text()) + ')'));
show_insert(type);
}
});
});