View | Details | Raw Unified | Return to bug 22248
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/mana.js (-12 / +11 lines)
Lines 3-22 Link Here
3
function mana_increment(mana_id, resource, fieldvalue, stepvalue ) {
3
function mana_increment(mana_id, resource, fieldvalue, stepvalue ) {
4
    $("#mana_comment_progress").show();
4
    $("#mana_comment_progress").show();
5
    if( !stepvalue ){ stepvalue = 1; }
5
    if( !stepvalue ){ stepvalue = 1; }
6
    $.ajax({
6
        $.ajax({
7
        type: "POST",
7
            type: "POST",
8
        url: "/cgi-bin/koha/svc/mana/increment",
8
            url: "/cgi-bin/koha/svc/mana/increment",
9
        data: {id: mana_id, resource: resource, field: fieldvalue, step: stepvalue},
9
            data: {id: mana_id, resource: resource, field: fieldvalue, step: stepvalue},
10
        datatype: "json",
10
            dataType: "json",
11
    })
12
        .done(function() {
13
            $(".mana_comment_status").hide();
14
            $("#mana_comment_success").show();
15
        })
11
        })
16
        .fail(function( error ) {
12
        .done(function( data ) {
17
            $(".mana_comment_status").hide();
13
            $(".mana_comment_status").hide();
18
            $("#mana_comment_errortext").html( error.status + " " + error.statusText );
14
            if ( data.code == "200" ) {
19
            $("#mana_comment_failed").show();
15
                $("#mana_comment_success").show();
16
            } else {
17
                $("#mana_comment_failed").show();
18
            }
20
        })
19
        })
21
        .always(function() {
20
        .always(function() {
22
            mana_comment_close();
21
            mana_comment_close();
(-)a/svc/mana/increment (-2 / +1 lines)
Lines 45-48 my $result = Koha::SharedContent::increment_entity_value( Link Here
45
    scalar $input->param('step')
45
    scalar $input->param('step')
46
);
46
);
47
47
48
return $result;
48
print(to_json($result));
49
- 

Return to bug 22248