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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messages.inc (-4 / +6 lines)
Lines 1-4 Link Here
1
[% INCLUDE 'blocking_errors.inc' %]
1
<div id="messages">
2
[% IF dev_install && debug_programming_error %]
2
    [% INCLUDE 'blocking_errors.inc' %]
3
    <div class="dialog alert">Programming error: [% debug_programming_error %]</div>
3
    [% IF dev_install && debug_programming_error %]
4
[% END %]
4
        <div class="dialog alert">Programming error: [% debug_programming_error %]</div>
5
    [% END %]
6
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt (-8 / +9 lines)
Lines 53-59 Link Here
53
53
54
                <h1>Quote uploader</h1>
54
                <h1>Quote uploader</h1>
55
55
56
                <div id="messages" style="display: none;">
56
                [%# FIXME Remove the following div and use #message instead %]
57
                <div id="messages_2" style="display: none;">
57
                    <div class="import_success dialog message" style="display: none;"></div>
58
                    <div class="import_success dialog message" style="display: none;"></div>
58
                    <div class="import_error dialog alert" style="display: none;"></div>
59
                    <div class="import_error dialog alert" style="display: none;"></div>
59
                </div>
60
                </div>
Lines 242-248 Link Here
242
                if ( arrData[ arrData.length - 1 ] ) {
243
                if ( arrData[ arrData.length - 1 ] ) {
243
                    arrData[ arrData.length - 1 ].push( strMatchedValue );
244
                    arrData[ arrData.length - 1 ].push( strMatchedValue );
244
                } else {
245
                } else {
245
                    $("#messages .import_error").text(_("Something went wrong, check your CSV file."));
246
                    $("#messages_2 .import_error").text(_("Something went wrong, check your CSV file."));
246
                }
247
                }
247
            }
248
            }
248
249
Lines 389-412 Link Here
389
                    data     : JSON.stringify(data),
390
                    data     : JSON.stringify(data),
390
                    dataType : "application/json",
391
                    dataType : "application/json",
391
                    success  : function(data) {
392
                    success  : function(data) {
392
                        $("#messages").addClass("message").show();
393
                        $("#messages_2").addClass("message").show();
393
                        var import_success = $("#messages .import_success");
394
                        var import_success = $("#messages_2 .import_success");
394
                        import_success.show();
395
                        import_success.show();
395
                        import_success.data("nb")
396
                        import_success.data("nb")
396
                        nb_success = import_success.data("nb") || 0;
397
                        nb_success = import_success.data("nb") || 0;
397
                        nb_success++;
398
                        nb_success++;
398
                        $("#messages .import_success").text(MSG_IMPORT_SUCCESS.format(nb_success));
399
                        $("#messages_2 .import_success").text(MSG_IMPORT_SUCCESS.format(nb_success));
399
                        import_success.data("nb", nb_success);
400
                        import_success.data("nb", nb_success);
400
                    },
401
                    },
401
                    error    : function(xhr) {
402
                    error    : function(xhr) {
402
                        if (xhr.status==201) { this.success(null, "Created", xhr); return; }
403
                        if (xhr.status==201) { this.success(null, "Created", xhr); return; }
403
                        $("#messages").addClass("alert").show();
404
                        $("#messages_2").addClass("alert").show();
404
                        var import_error = $("#messages .import_error");
405
                        var import_error = $("#messages_2 .import_error");
405
                        import_error.show();
406
                        import_error.show();
406
                        import_error.data("nb")
407
                        import_error.data("nb")
407
                        nb_error = import_error.data("nb") || 0;
408
                        nb_error = import_error.data("nb") || 0;
408
                        nb_error++;
409
                        nb_error++;
409
                        $("#messages .import_error").text(MSG_IMPORT_ERROR.format(nb_error));
410
                        $("#messages_2 .import_error").text(MSG_IMPORT_ERROR.format(nb_error));
410
                        import_error.data("nb", nb_error);
411
                        import_error.data("nb", nb_error);
411
                    },
412
                    },
412
                });
413
                });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload-images.tt (-2 / +3 lines)
Lines 54-60 Link Here
54
            background-color: #fff;
54
            background-color: #fff;
55
        }
55
        }
56
56
57
        #messages {
57
        #messages_2 {
58
            font-weight: normal;
58
            font-weight: normal;
59
        }
59
        }
60
        .cover_preview {
60
        .cover_preview {
Lines 192-198 Link Here
192
192
193
                                <div id="filedrag">
193
                                <div id="filedrag">
194
                                    <a id="click_to_select" href="#">Drop files here or click to select a file</a>
194
                                    <a id="click_to_select" href="#">Drop files here or click to select a file</a>
195
                                    <div id="messages"></div>
195
                                    [%# FIXME Remove the following div and use #message instead %]
196
                                    <div id="messages_2"></div>
196
                                </div>
197
                                </div>
197
198
198
                                <div id="uploadpanel">
199
                                <div id="uploadpanel">
(-)a/koha-tmpl/intranet-tmpl/prog/js/upload-images.js (-4 / +3 lines)
Lines 23-29 $(document).ready(function(){ Link Here
23
23
24
    $("#filedrag").on("click", ".cancel_image", function(){
24
    $("#filedrag").on("click", ".cancel_image", function(){
25
        $("#click_to_select").show();
25
        $("#click_to_select").show();
26
        $("#messages").html("");
26
        $("#messages_2").html("");
27
        $("#fileToUpload").prop( "disabled", false );
27
        $("#fileToUpload").prop( "disabled", false );
28
        $("#process_images, #fileuploadstatus").hide();
28
        $("#process_images, #fileuploadstatus").hide();
29
        return false;
29
        return false;
Lines 78-84 $(document).ready(function(){ Link Here
78
78
79
function prepUpLoad( event ){
79
function prepUpLoad( event ){
80
    $("#click_to_select,#upload_results").hide();
80
    $("#click_to_select,#upload_results").hide();
81
    $("#messages").html("");
81
    $("#messages_2").html("");
82
    var file;
82
    var file;
83
    if( event ){
83
    if( event ){
84
        file = event.originalEvent.dataTransfer.files[0];
84
        file = event.originalEvent.dataTransfer.files[0];
Lines 185-191 function ParseFile(file) { Link Here
185
185
186
// output information
186
// output information
187
function Output(msg) {
187
function Output(msg) {
188
    var m = document.getElementById("messages");
188
    var m = document.getElementById("messages_2");
189
    m.innerHTML = msg + m.innerHTML;
189
    m.innerHTML = msg + m.innerHTML;
190
}
190
}
191
191
192
- 

Return to bug 36084