Permalink
Browse files

new screenshots

  • Loading branch information...
1 parent a5a9b73 commit 17bb6127b37d499cc2504f3d49c1f2521decbb86 @piffpaffpuff committed May 8, 2012
@@ -44,10 +44,11 @@ public function load_hooks() {
add_action( 'admin_init', array( $this, 'load_help' ), 20 );
add_action( 'admin_print_styles', array( $this, 'add_styles' ) );
add_action( 'admin_print_scripts', array( $this, 'add_scripts' ) );
- add_action( 'admin_print_scripts-media-upload-popup', array( $this, 'add_media_scripts' ) );
+ add_action( 'admin_print_scripts-media-upload-popup', array( $this, 'add_media_scripts_and_styles' ) );
+ add_filter( 'media_upload_tabs', array( $this, 'remove_media_tabs' ) );
add_action( 'wp_ajax_load_thumbnail', array( $this, 'load_thumbnail_ajax' ) );
add_filter( 'attachment_fields_to_edit', array( $this, 'edit_media_options' ), 20, 2 );
- }
+ }
/**
* Add the styles
@@ -73,7 +74,7 @@ public function add_scripts() {
/**
* Add the media uploader scripts
*/
- public function add_media_scripts() {
+ public function add_media_scripts_and_styles() {
wp_enqueue_style( 'woocommerce-delivery-notes-styles', WooCommerce_Delivery_Notes::$plugin_url . 'css/style.css' );
wp_enqueue_script( 'woocommerce-delivery-notes-media-scripts', WooCommerce_Delivery_Notes::$plugin_url . 'js/script-media-uploader.js', array( 'jquery' ) );
}
@@ -104,6 +105,16 @@ public function is_woocommerce_sequential_order_numbers_activated() {
}
}
+ /**
+ * Remove the media uploader tabs
+ */
+ public function remove_media_tabs( $tabs ) {
+ if( isset( $_GET['post_id'] ) && $_GET['post_id'] == 0 ) {
+ unset( $tabs['type_url'] );
+ }
+ return $tabs;
+ }
+
/**
* Modfy the media uploader input fields
*/
View
@@ -20,7 +20,8 @@ ul.woocommerce-delivery-notes-actions li {
#company-logo-placeholder img {
cursor: pointer;
}
-.savesend input.button {
+#media-upload .savesend input.button,
+#media-upload #go_button {
display: none;
}
.savesend input.button.use-image-button {
View
@@ -2,7 +2,7 @@ jQuery(document).ready(function($) {
// button to open the media uploader
$('#company-logo-add-button, #company-logo-placeholder img').on('click', function(event) {
- tb_show('', 'media-upload.php?post_id=0$amp;type=image&TB_iframe=true');
+ tb_show('', 'media-upload.php?post_id=0&type=image&TB_iframe=true');
event.preventDefault();
});
View
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 17bb612

Please sign in to comment.