Merge pull request #6853 from axisthemes/attribute-hightlight

Attribute hightlight
This commit is contained in:
Claudio Sanches 2014-11-27 15:10:00 -02:00
commit 4f4ad23dfa
1 changed files with 85 additions and 83 deletions

View File

@ -7,11 +7,11 @@
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin
* @version 2.1.0
* @version 2.3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
/**
@ -233,7 +233,7 @@ class WC_Admin_Attributes {
<div class="wrap woocommerce">
<div class="icon32 icon32-attributes" id="icon-woocommerce"><br/></div>
<h2><?php _e( 'Edit Attribute', 'woocommerce' ) ?></h2>
<form action="admin.php?page=product_attributes&amp;edit=<?php echo absint( $edit ); ?>" method="post">
<form action="edit.php?post_type=product&amp;page=product_attributes&amp;edit=<?php echo absint( $edit ); ?>" method="post">
<table class="form-table">
<tbody>
<tr class="form-field form-required">
@ -323,7 +323,7 @@ class WC_Admin_Attributes {
<td><a href="edit-tags.php?taxonomy=<?php echo esc_html(wc_attribute_taxonomy_name($tax->attribute_name)); ?>&amp;post_type=product"><?php echo esc_html( $tax->attribute_label ); ?></a>
<div class="row-actions"><span class="edit"><a href="<?php echo esc_url( add_query_arg('edit', $tax->attribute_id, 'admin.php?page=product_attributes') ); ?>"><?php _e( 'Edit', 'woocommerce' ); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo esc_url( wp_nonce_url( add_query_arg('delete', $tax->attribute_id, 'admin.php?page=product_attributes'), 'woocommerce-delete-attribute_' . $tax->attribute_id ) ); ?>"><?php _e( 'Delete', 'woocommerce' ); ?></a></span></div>
<div class="row-actions"><span class="edit"><a href="<?php echo esc_url( add_query_arg('edit', $tax->attribute_id, 'edit.php?post_type=product&amp;page=product_attributes') ); ?>"><?php _e( 'Edit', 'woocommerce' ); ?></a> | </span><span class="delete"><a class="delete" href="<?php echo esc_url( wp_nonce_url( add_query_arg('delete', $tax->attribute_id, 'edit.php?post_type=product&amp;page=product_attributes'), 'woocommerce-delete-attribute_' . $tax->attribute_id ) ); ?>"><?php _e( 'Delete', 'woocommerce' ); ?></a></span></div>
</td>
<td><?php echo esc_html( $tax->attribute_name ); ?></td>
<td><?php echo esc_html( ucfirst( $tax->attribute_type ) ); ?></td>
@ -384,7 +384,7 @@ class WC_Admin_Attributes {
<div class="form-wrap">
<h3><?php _e( 'Add New Attribute', 'woocommerce' ) ?></h3>
<p><?php _e( 'Attributes let you define extra product data, such as size or colour. You can use these attributes in the shop sidebar using the "layered nav" widgets. Please note: you cannot rename an attribute later on.', 'woocommerce' ) ?></p>
<form action="admin.php?page=product_attributes" method="post">
<form action="edit.php?post_type=product&amp;page=product_attributes" method="post">
<div class="form-field">
<label for="attribute_label"><?php _e( 'Name', 'woocommerce' ); ?></label>
<input name="attribute_label" id="attribute_label" type="text" value="" />
@ -427,9 +427,11 @@ class WC_Admin_Attributes {
<script type="text/javascript">
/* <![CDATA[ */
jQuery('a.delete').click(function(){
var answer = confirm ("<?php _e( 'Are you sure you want to delete this attribute?', 'woocommerce' ); ?>");
if (answer) return true;
jQuery( 'a.delete' ).click( function() {
var answer = confirm( "<?php _e( 'Are you sure you want to delete this attribute?', 'woocommerce' ); ?>" );
if ( answer ) {
return true;
}
return false;
});