Change comment style in bibtemplate / inline JS fix_comment_style_for_msie
authorJeff Godin <jgodin@tadl.org>
Thu, 3 May 2012 17:16:40 +0000 (13:16 -0400)
committerJeff Godin <jgodin@tadl.org>
Thu, 3 May 2012 17:16:40 +0000 (13:16 -0400)
Inline / BibTemplate Javascript with // style comments can
cause problems for us in MSIE. This commit removes some
commented-out code and changes some comments from // comments
to /* comments */

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/opac/skin/tadlv2/xml/result/result_table.xml
Open-ILS/web/opac/skin/tadlv3/xml/rdetail/rdetail_summary.xml
Open-ILS/web/opac/skin/tadlv3/xml/result/result_table.xml
Open-ILS/web/opac/skin/tadlv4/xml/rdetail/rdetail_summary.xml
Open-ILS/web/opac/skin/tadlv4/xml/result/result_table.xml
Open-ILS/web/opac/skin/tadlv5/xml/rdetail/rdetail_summary.xml
Open-ILS/web/opac/skin/tadlv5/xml/result/result_table.xml

index a1e05e9..185cc34 100644 (file)
                                                 var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                                 var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                                 if (urilabel.substring(0,7) == "http://") {
-                                                    // Provide a default label if label appears to be a URL
+                                                    /* Provide a default label if label appears to be a URL */
                                                     urilabel = "Connect to this resource online";
                                                 }
                                                 var link_text = dojo.doc.createTextNode(urilabel);
index fca753d..1c87a9f 100644 (file)
                         var count_copies_avail = 0;
 
                         dojo.query('volume', item).forEach(function(vol) {
-                            //if (item_cnt >= max_items) {
-                            //    return output.innerHTML;
-                            //}
                             if (vol.getAttribute('deleted') == 't') {
                                 return;
                             }
                                     var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                     var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                     if (urilabel.substring(0,7) == "http://") {
-                                        // Provide a default label if label appears to be a URL
+                                        /* Provide a default label if label appears to be a URL */
                                         urilabel = "Connect to this resource online";
                                     }
                                     var link_text = dojo.doc.createTextNode(urilabel);
                                 var cp_status;
                                 var cp_location;
                                 var cp_circ_lib;
-                                //if (item_cnt >= max_items) {
-                                //    return;
-                                //}
+
                                 if (cp.getAttribute('deleted') == 't') {
                                     return;
                                 }
                                 if (loc_visible != 't') {
                                     return;
                                 }
-                                // at this point we have vol, cp_circ_lib, cp_location, cp_status
+                                /* at this point we have vol, cp_circ_lib, cp_location, cp_status */
                                 var status_id = cp_status.getAttribute('ident');
                                 if (!(status_id in {0:1, 7:1, 109:1})) {
                                     count_copies_unavail++;
                                 copySummaryObj[libkey][lockey][cnkey]['count']++;
 
                                 item_cnt++;
-                                //if (item_cnt >= max_items) {
-                                //    dojo.create('br', null, cp_entry);
-                                //    cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
-                                //}
-                                //output.appendChild(cp_entry);
                             });
                         });
                     var numLibs = 0;
                     if (numLibs == 1) {
                         var lines_output = 0;
                         var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
-                        // output the grouped-by-location summary
+                        /* output the grouped-by-location summary */
                         for (var sumlib in copySummaryObj) {
-                            //output the "at lib"
+                            /* output the "at lib" */
                             var atlib = dojo.create('div', null, sumdiv);
                             atlib.appendChild(dojo.doc.createTextNode('At ' + sumlib));
                             for (var sumloc in copySummaryObj[sumlib]) {
                                 for (var sumcn in copySummaryObj[sumlib][sumloc]) {
-                                    // available copies in each location, by cn label
+                                    /* available copies in each location, by cn label */
                                     if (max_lines && lines_output >= max_lines) {
                                         var morediv = dojo.create('div', { "style": "font-weight: bold;" }, sumdiv);
                                         morediv.appendChild(dojo.doc.createTextNode("additional copies available - click title for details"));
                         }
                         output.appendChild(sumdiv);
                     } else {
-                        // output the grouped-by-library summary
+                        /* output the grouped-by-library summary */
                         for (var libname in copySummaryObj) {
                             var copycount = 0;
                             for (var loc in copySummaryObj[libname]) {
                             output.appendChild(libdiv);
                         }
                     }
-                    // display the count of unavailable items, if any
+                    /* display the count of unavailable items, if any */
                     if (count_copies_unavail > 0) {
                         other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
                         item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
index dd24d90..dc16f5e 100644 (file)
                                     var count_copies_avail = 0;
 
                                     dojo.query('volume', item).forEach(function(vol) {
-                                        //if (item_cnt >= max_items) {
-                                        //    return output.innerHTML;
-                                        //}
                                         if (vol.getAttribute('deleted') == 't') {
                                             return;
                                         }
                                                 var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                                 var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                                 if (urilabel.substring(0,7) == "http://") {
-                                                    // Provide a default label if label appears to be a URL
+                                                    /* Provide a default label if label appears to be a URL */
                                                     urilabel = "Connect to this resource online";
                                                 }
                                                 var link_text = dojo.doc.createTextNode(urilabel);
                                             var cp_status;
                                             var cp_location;
                                             var cp_circ_lib;
-                                            //if (item_cnt >= max_items) {
-                                            //    return;
-                                            //}
+
                                             if (cp.getAttribute('deleted') == 't') {
                                                 return;
                                             }
                                             if (loc_visible != 't') {
                                                 return;
                                             }
-                                            // at this point we have vol, cp_circ_lib, cp_location, cp_status
+                                            /* at this point we have vol, cp_circ_lib, cp_location, cp_status */
                                             var status_id = cp_status.getAttribute('ident');
                                             if (!(status_id in {0:1, 7:1, 109:1})) {
                                                 count_copies_unavail++;
                                             copySummaryObj[libkey][lockey][cnkey]['count']++;
 
                                             item_cnt++;
-                                            //if (item_cnt >= max_items) {
-                                            //    dojo.create('br', null, cp_entry);
-                                            //    cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
-                                            //}
-                                            //output.appendChild(cp_entry);
                                         });
                                     });
                                 var numLibs = 0;
                                 if (numLibs == 1) {
                                     var lines_output = 0;
                                     var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
-                                    // output the grouped-by-location summary
+                                    /* output the grouped-by-location summary */
                                     for (var sumlib in copySummaryObj) {
-                                        //output the "at lib"
+                                        /* output the "at lib" */
                                         var atlib = dojo.create('div', null, sumdiv);
                                         atlib.appendChild(dojo.doc.createTextNode('At ' + sumlib));
                                         for (var sumloc in copySummaryObj[sumlib]) {
                                             for (var sumcn in copySummaryObj[sumlib][sumloc]) {
-                                                // available copies in each location, by cn label
+                                                /* available copies in each location, by cn label */
                                                 if (max_lines && lines_output >= max_lines) {
                                                     var morediv = dojo.create('div', { "style": "font-weight: bold;" }, sumdiv);
                                                     morediv.appendChild(dojo.doc.createTextNode("additional copies available - click title for details"));
                                     }
                                     output.appendChild(sumdiv);
                                 } else {
-                                    // output the grouped-by-library summary
+                                    /* output the grouped-by-library summary */
                                     for (var libname in copySummaryObj) {
                                         var copycount = 0;
                                         for (var loc in copySummaryObj[libname]) {
                                         output.appendChild(libdiv);
                                     }
                                 }
-                                // display the count of unavailable items, if any
+                                /* display the count of unavailable items, if any */
                                 if (count_copies_unavail > 0) {
                                     other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
                                     item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
index 7ccb149..d1859d7 100644 (file)
                         var count_copies_avail = 0;
 
                         dojo.query('volume', item).forEach(function(vol) {
-                            //if (item_cnt >= max_items) {
-                            //    return output.innerHTML;
-                            //}
                             if (vol.getAttribute('deleted') == 't') {
                                 return;
                             }
                                     var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                     var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                     if (urilabel.substring(0,7) == "http://") {
-                                        // Provide a default label if label appears to be a URL
+                                        /* Provide a default label if label appears to be a URL */
                                         urilabel = "Connect to this resource online";
                                     }
                                     var link_text = dojo.doc.createTextNode(urilabel);
                                 var cp_status;
                                 var cp_location;
                                 var cp_circ_lib;
-                                //if (item_cnt >= max_items) {
-                                //    return;
-                                //}
+
                                 if (cp.getAttribute('deleted') == 't') {
                                     return;
                                 }
                                 if (loc_visible != 't') {
                                     return;
                                 }
-                                // at this point we have vol, cp_circ_lib, cp_location, cp_status
+                                /* at this point we have vol, cp_circ_lib, cp_location, cp_status */
                                 var status_id = cp_status.getAttribute('ident');
                                 if (!(status_id in {0:1, 7:1, 109:1})) {
                                     count_copies_unavail++;
                                 }
 
                                 item_cnt++;
-                                //if (item_cnt >= max_items) {
-                                //    dojo.create('br', null, cp_entry);
-                                //    cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
-                                //}
-                                //output.appendChild(cp_entry);
                             });
                         });
                     var numLibs = 0;
                     if (numLibs == 1) {
                         var lines_output = 0;
                         var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
-                        // output the grouped-by-location summary
+                        /* output the grouped-by-location summary */
                         for (var sumlib in copySummaryObj) {
                             var reached_max_lines = false;
-                            //output the "at lib"
+                            /* output the "at lib" */
                             var atlib = dojo.create('div', null, sumdiv);
                             atlib.appendChild(dojo.doc.createTextNode('At ' + sumlib));
                             for (var sumloc in copySummaryObj[sumlib]) {
                                 if (reached_max_lines) { break; }
                                 for (var sumcn in copySummaryObj[sumlib][sumloc]) {
-                                    // available copies in each location, by cn label
+                                    /* available copies in each location, by cn label */
                                     if (max_lines && lines_output >= max_lines) {
                                         reached_max_lines = true;
                                         var morediv = dojo.create('div', { "style": "font-weight: bold;" }, sumdiv);
                         }
                         output.appendChild(sumdiv);
                     } else if (numLibs > 1) {
-                        // output the grouped-by-library summary
+                        /* output the grouped-by-library summary */
                         for (var libname in copySummaryObj) {
                             var copycount = 0;
                             var copycount_reshelving = 0;
                             output.appendChild(libdiv);
                         }
                     }
-                    // display the count of unavailable items, if any
+                    /* display the count of unavailable items, if any */
                     if (count_copies_unavail > 0) {
                         other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
                         item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
index 3077697..dbc7061 100644 (file)
                                     var count_copies_avail = 0;
 
                                     dojo.query('volume', item).forEach(function(vol) {
-                                        //if (item_cnt >= max_items) {
-                                        //    return output.innerHTML;
-                                        //}
                                         if (vol.getAttribute('deleted') == 't') {
                                             return;
                                         }
                                                 var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                                 var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                                 if (urilabel.substring(0,7) == "http://") {
-                                                    // Provide a default label if label appears to be a URL
+                                                    /* Provide a default label if label appears to be a URL */
                                                     urilabel = "Connect to this resource online";
                                                 }
                                                 var link_text = dojo.doc.createTextNode(urilabel);
                                             var cp_status;
                                             var cp_location;
                                             var cp_circ_lib;
-                                            //if (item_cnt >= max_items) {
-                                            //    return;
-                                            //}
+
                                             if (cp.getAttribute('deleted') == 't') {
                                                 return;
                                             }
                                             if (loc_visible != 't') {
                                                 return;
                                             }
-                                            // at this point we have vol, cp_circ_lib, cp_location, cp_status
+                                            /* at this point we have vol, cp_circ_lib, cp_location, cp_status */
                                             var status_id = cp_status.getAttribute('ident');
                                             if (!(status_id in {0:1, 7:1, 109:1})) {
                                                 count_copies_unavail++;
                                                 copySummaryObj[libkey][lockey][cnkey]['count']++;
                                             }
                                             item_cnt++;
-                                            //if (item_cnt >= max_items) {
-                                            //    dojo.create('br', null, cp_entry);
-                                            //    cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
-                                            //}
-                                            //output.appendChild(cp_entry);
                                         });
                                     });
                                 var numLibs = 0;
                                 if (numLibs == 1) {
                                     var lines_output = 0;
                                     var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
-                                    // output the grouped-by-location summary
+                                    /* output the grouped-by-location summary */
                                     for (var sumlib in copySummaryObj) {
                                         var reached_max_lines = false;
-                                        //output the "at lib"
+                                        /* output the "at lib" */
                                         var atlib = dojo.create('div', null, sumdiv);
                                         atlib.appendChild(dojo.doc.createTextNode('At ' + sumlib));
                                         for (var sumloc in copySummaryObj[sumlib]) {
                                             if (reached_max_lines) { break; }
                                             for (var sumcn in copySummaryObj[sumlib][sumloc]) {
-                                                // available copies in each location, by cn label
+                                                /* available copies in each location, by cn label */
                                                 if (max_lines && lines_output >= max_lines) {
                                                     reached_max_lines = true;
                                                     var morediv = dojo.create('div', { "style": "font-weight: bold;" }, sumdiv);
                                     }
                                     output.appendChild(sumdiv);
                                 } else if (numLibs > 1) {
-                                    // output the grouped-by-library summary
+                                    /* output the grouped-by-library summary */
                                     for (var libname in copySummaryObj) {
                                         var copycount = 0;
                                         var copycount_reshelving = 0;
                                         output.appendChild(libdiv);
                                     }
                                 }
-                                // display the count of unavailable items, if any
+                                /* display the count of unavailable items, if any */
                                 if (count_copies_unavail > 0) {
                                     other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
                                     item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
index 7ccb149..d1859d7 100644 (file)
                         var count_copies_avail = 0;
 
                         dojo.query('volume', item).forEach(function(vol) {
-                            //if (item_cnt >= max_items) {
-                            //    return output.innerHTML;
-                            //}
                             if (vol.getAttribute('deleted') == 't') {
                                 return;
                             }
                                     var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                     var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                     if (urilabel.substring(0,7) == "http://") {
-                                        // Provide a default label if label appears to be a URL
+                                        /* Provide a default label if label appears to be a URL */
                                         urilabel = "Connect to this resource online";
                                     }
                                     var link_text = dojo.doc.createTextNode(urilabel);
                                 var cp_status;
                                 var cp_location;
                                 var cp_circ_lib;
-                                //if (item_cnt >= max_items) {
-                                //    return;
-                                //}
+
                                 if (cp.getAttribute('deleted') == 't') {
                                     return;
                                 }
                                 if (loc_visible != 't') {
                                     return;
                                 }
-                                // at this point we have vol, cp_circ_lib, cp_location, cp_status
+                                /* at this point we have vol, cp_circ_lib, cp_location, cp_status */
                                 var status_id = cp_status.getAttribute('ident');
                                 if (!(status_id in {0:1, 7:1, 109:1})) {
                                     count_copies_unavail++;
                                 }
 
                                 item_cnt++;
-                                //if (item_cnt >= max_items) {
-                                //    dojo.create('br', null, cp_entry);
-                                //    cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
-                                //}
-                                //output.appendChild(cp_entry);
                             });
                         });
                     var numLibs = 0;
                     if (numLibs == 1) {
                         var lines_output = 0;
                         var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
-                        // output the grouped-by-location summary
+                        /* output the grouped-by-location summary */
                         for (var sumlib in copySummaryObj) {
                             var reached_max_lines = false;
-                            //output the "at lib"
+                            /* output the "at lib" */
                             var atlib = dojo.create('div', null, sumdiv);
                             atlib.appendChild(dojo.doc.createTextNode('At ' + sumlib));
                             for (var sumloc in copySummaryObj[sumlib]) {
                                 if (reached_max_lines) { break; }
                                 for (var sumcn in copySummaryObj[sumlib][sumloc]) {
-                                    // available copies in each location, by cn label
+                                    /* available copies in each location, by cn label */
                                     if (max_lines && lines_output >= max_lines) {
                                         reached_max_lines = true;
                                         var morediv = dojo.create('div', { "style": "font-weight: bold;" }, sumdiv);
                         }
                         output.appendChild(sumdiv);
                     } else if (numLibs > 1) {
-                        // output the grouped-by-library summary
+                        /* output the grouped-by-library summary */
                         for (var libname in copySummaryObj) {
                             var copycount = 0;
                             var copycount_reshelving = 0;
                             output.appendChild(libdiv);
                         }
                     }
-                    // display the count of unavailable items, if any
+                    /* display the count of unavailable items, if any */
                     if (count_copies_unavail > 0) {
                         other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
                         item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';
index 3077697..dbc7061 100644 (file)
                                     var count_copies_avail = 0;
 
                                     dojo.query('volume', item).forEach(function(vol) {
-                                        //if (item_cnt >= max_items) {
-                                        //    return output.innerHTML;
-                                        //}
                                         if (vol.getAttribute('deleted') == 't') {
                                             return;
                                         }
                                                 var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
                                                 var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
                                                 if (urilabel.substring(0,7) == "http://") {
-                                                    // Provide a default label if label appears to be a URL
+                                                    /* Provide a default label if label appears to be a URL */
                                                     urilabel = "Connect to this resource online";
                                                 }
                                                 var link_text = dojo.doc.createTextNode(urilabel);
                                             var cp_status;
                                             var cp_location;
                                             var cp_circ_lib;
-                                            //if (item_cnt >= max_items) {
-                                            //    return;
-                                            //}
+
                                             if (cp.getAttribute('deleted') == 't') {
                                                 return;
                                             }
                                             if (loc_visible != 't') {
                                                 return;
                                             }
-                                            // at this point we have vol, cp_circ_lib, cp_location, cp_status
+                                            /* at this point we have vol, cp_circ_lib, cp_location, cp_status */
                                             var status_id = cp_status.getAttribute('ident');
                                             if (!(status_id in {0:1, 7:1, 109:1})) {
                                                 count_copies_unavail++;
                                                 copySummaryObj[libkey][lockey][cnkey]['count']++;
                                             }
                                             item_cnt++;
-                                            //if (item_cnt >= max_items) {
-                                            //    dojo.create('br', null, cp_entry);
-                                            //    cp_entry.appendChild(dojo.doc.createTextNode(opac_strings.MORE_COPIES_FULL_RECORD));
-                                            //}
-                                            //output.appendChild(cp_entry);
                                         });
                                     });
                                 var numLibs = 0;
                                 if (numLibs == 1) {
                                     var lines_output = 0;
                                     var sumdiv = dojo.create('div', { "style": "font-weight: bold;" });
-                                    // output the grouped-by-location summary
+                                    /* output the grouped-by-location summary */
                                     for (var sumlib in copySummaryObj) {
                                         var reached_max_lines = false;
-                                        //output the "at lib"
+                                        /* output the "at lib" */
                                         var atlib = dojo.create('div', null, sumdiv);
                                         atlib.appendChild(dojo.doc.createTextNode('At ' + sumlib));
                                         for (var sumloc in copySummaryObj[sumlib]) {
                                             if (reached_max_lines) { break; }
                                             for (var sumcn in copySummaryObj[sumlib][sumloc]) {
-                                                // available copies in each location, by cn label
+                                                /* available copies in each location, by cn label */
                                                 if (max_lines && lines_output >= max_lines) {
                                                     reached_max_lines = true;
                                                     var morediv = dojo.create('div', { "style": "font-weight: bold;" }, sumdiv);
                                     }
                                     output.appendChild(sumdiv);
                                 } else if (numLibs > 1) {
-                                    // output the grouped-by-library summary
+                                    /* output the grouped-by-library summary */
                                     for (var libname in copySummaryObj) {
                                         var copycount = 0;
                                         var copycount_reshelving = 0;
                                         output.appendChild(libdiv);
                                     }
                                 }
-                                // display the count of unavailable items, if any
+                                /* display the count of unavailable items, if any */
                                 if (count_copies_unavail > 0) {
                                     other_or_null = (count_copies_avail > 0) ? 'other ' : ' ';
                                     item_or_items = (count_copies_unavail > 1) ? 'items' : 'item';