| 1 |
// $Id$
|
| 2 |
|
| 3 |
// Add the show more link on the store admin display.
|
| 4 |
$(document).ready(
|
| 5 |
function() {
|
| 6 |
$('.uc-store-admin-panel').each(
|
| 7 |
function() {
|
| 8 |
var panel_id = this.id.substring(6);
|
| 9 |
$('#show-links-' + panel_id).click(
|
| 10 |
function() {
|
| 11 |
var panel_id = this.id.substring(11);
|
| 12 |
$('#panel-' + panel_id + ' .panel-links').toggle();
|
| 13 |
if ($('#panel-' + panel_id + ' .panel-show-link').html() == '<a>' + text_show + '</a>') {
|
| 14 |
$('#panel-' + panel_id + ' .panel-show-link').html('<a>' + text_hide + '</a>');
|
| 15 |
}
|
| 16 |
else {
|
| 17 |
$('#panel-' + panel_id + ' .panel-show-link').html('<a>' + text_show + '</a>');
|
| 18 |
}
|
| 19 |
}
|
| 20 |
);
|
| 21 |
}
|
| 22 |
)
|
| 23 |
}
|
| 24 |
);
|
| 25 |
|
| 26 |
// Add the double click to the customer table.
|
| 27 |
$(document).ready(
|
| 28 |
function() {
|
| 29 |
$('.uc-customer-table tr.odd, .uc-customer-table tr.even').each(
|
| 30 |
function() {
|
| 31 |
$(this).dblclick(
|
| 32 |
function() {
|
| 33 |
window.location = Drupal.settings.basePath + 'admin/store/customers/orders/' + this.id.substring(9);
|
| 34 |
}
|
| 35 |
);
|
| 36 |
}
|
| 37 |
);
|
| 38 |
}
|
| 39 |
);
|
| 40 |
|
| 41 |
// Add the double click to the customer orders table.
|
| 42 |
$(document).ready(
|
| 43 |
function() {
|
| 44 |
$('.uc-cust-orders-table tr.odd, .uc-cust-orders-table tr.even').each(
|
| 45 |
function() {
|
| 46 |
$(this).dblclick(
|
| 47 |
function() {
|
| 48 |
window.location = Drupal.settings.basePath + 'admin/store/orders/' + this.id.substring(6);
|
| 49 |
}
|
| 50 |
);
|
| 51 |
}
|
| 52 |
);
|
| 53 |
}
|
| 54 |
);
|
| 55 |
|
| 56 |
// Add the onclick to overview section table rows.
|
| 57 |
$(document).ready(
|
| 58 |
function() {
|
| 59 |
$('tr.section').each(
|
| 60 |
function() {
|
| 61 |
$(this).click(
|
| 62 |
function() {
|
| 63 |
window.location = Drupal.settings.basePath + this.id;
|
| 64 |
}
|
| 65 |
);
|
| 66 |
}
|
| 67 |
);
|
| 68 |
}
|
| 69 |
);
|