From 9e3f337cbf4a3f1a430a0ae0aa638eeadf1efce8 Mon Sep 17 00:00:00 2001 From: Marco De Donno Date: Wed, 20 Jul 2016 16:50:45 +0200 Subject: [PATCH] Remove the links to download the images and add the informtions about the images --- js/backend.admin.js | 72 ++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/js/backend.admin.js b/js/backend.admin.js index 6a2ee72..b1f4e0e 100644 --- a/js/backend.admin.js +++ b/js/backend.admin.js @@ -631,9 +631,14 @@ Pianos4Backend.AdminExercise = function( selector, params ) .addClass( 'pianos4_image_preview' ) .append( - $( '' ) - .attr( 'src', '?action=get_image&thumb&id=' + ex.mark ) - .attr( 'alt', 'Mark image' ) + $( '' ) + .attr( 'href', '?action=get_image&id=' + ex.mark ) + .attr( 'target', '_blank' ) + .append( + $( '' ) + .attr( 'src', '?action=get_image&thumb&id=' + ex.mark ) + .attr( 'alt', 'Mark image' ) + ) ) ) .append( @@ -641,40 +646,59 @@ Pianos4Backend.AdminExercise = function( selector, params ) .addClass( 'pianos4_image_preview' ) .append( - $( '' ) - .attr( 'src', '?action=get_image&thumb&id=' + ex.print ) - .attr( 'alt', 'Print image' ) + $( '' ) + .attr( 'href', '?action=get_image&id=' + ex.print ) + .attr( 'target', '_blank' ) + .append( + $( '' ) + .attr( 'src', '?action=get_image&thumb&id=' + ex.print ) + .attr( 'alt', 'Print image' ) + ) ) ) .append( - $( '
' ) - .css( 'font-size', '0.8em' ) - .css( 'margin-bottom', '1em' ) - - .append( - $( '' ) - .attr( 'href', '?action=get_image&id=' + ex.mark ) - .attr( 'target', '_blank' ) - .text( 'Download mark image' ) - ) - + $( '' ) + .css( 'margin-left', '30px' ) + .css( 'position', 'absolute' ) .append( $( '' ) - .css( 'display', 'inline-block' ) - .css( 'width', '30px' ) + .text( 'Images details' ) ) - .append( - $( '' ) - .attr( 'href', '?action=get_image&id=' + ex.print ) - .attr( 'target', '_blank' ) - .text( 'Download print image' ) + $( '