From: Jeff Godin Date: Thu, 3 May 2012 17:16:40 +0000 (-0400) Subject: Change comment style in bibtemplate / inline JS X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3125b359ef27a4b8d2b29f8650c763d5f72b7a58;p=evergreen%2Ftadl.git Change comment style in bibtemplate / inline JS 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 --- diff --git a/Open-ILS/web/opac/skin/tadlv2/xml/result/result_table.xml b/Open-ILS/web/opac/skin/tadlv2/xml/result/result_table.xml index a1e05e9841..185cc34b54 100644 --- a/Open-ILS/web/opac/skin/tadlv2/xml/result/result_table.xml +++ b/Open-ILS/web/opac/skin/tadlv2/xml/result/result_table.xml @@ -162,7 +162,7 @@ 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); diff --git a/Open-ILS/web/opac/skin/tadlv3/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/tadlv3/xml/rdetail/rdetail_summary.xml index fca753d0b4..1c87a9f8ce 100644 --- a/Open-ILS/web/opac/skin/tadlv3/xml/rdetail/rdetail_summary.xml +++ b/Open-ILS/web/opac/skin/tadlv3/xml/rdetail/rdetail_summary.xml @@ -139,9 +139,6 @@ 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; } @@ -155,7 +152,7 @@ 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); @@ -167,9 +164,7 @@ var cp_status; var cp_location; var cp_circ_lib; - //if (item_cnt >= max_items) { - // return; - //} + if (cp.getAttribute('deleted') == 't') { return; } @@ -205,7 +200,7 @@ 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++; @@ -230,11 +225,6 @@ 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; @@ -245,14 +235,14 @@ 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")); @@ -268,7 +258,7 @@ } 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]) { @@ -284,7 +274,7 @@ 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'; diff --git a/Open-ILS/web/opac/skin/tadlv3/xml/result/result_table.xml b/Open-ILS/web/opac/skin/tadlv3/xml/result/result_table.xml index dd24d90ef5..dc16f5e5fb 100644 --- a/Open-ILS/web/opac/skin/tadlv3/xml/result/result_table.xml +++ b/Open-ILS/web/opac/skin/tadlv3/xml/result/result_table.xml @@ -150,9 +150,6 @@ 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; } @@ -166,7 +163,7 @@ 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); @@ -178,9 +175,7 @@ var cp_status; var cp_location; var cp_circ_lib; - //if (item_cnt >= max_items) { - // return; - //} + if (cp.getAttribute('deleted') == 't') { return; } @@ -216,7 +211,7 @@ 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++; @@ -241,11 +236,6 @@ 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; @@ -256,14 +246,14 @@ 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")); @@ -279,7 +269,7 @@ } 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]) { @@ -295,7 +285,7 @@ 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'; diff --git a/Open-ILS/web/opac/skin/tadlv4/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/tadlv4/xml/rdetail/rdetail_summary.xml index 7ccb149be0..d1859d7df3 100644 --- a/Open-ILS/web/opac/skin/tadlv4/xml/rdetail/rdetail_summary.xml +++ b/Open-ILS/web/opac/skin/tadlv4/xml/rdetail/rdetail_summary.xml @@ -155,9 +155,6 @@ 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; } @@ -171,7 +168,7 @@ 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); @@ -183,9 +180,7 @@ var cp_status; var cp_location; var cp_circ_lib; - //if (item_cnt >= max_items) { - // return; - //} + if (cp.getAttribute('deleted') == 't') { return; } @@ -221,7 +216,7 @@ 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++; @@ -251,11 +246,6 @@ } 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; @@ -265,16 +255,16 @@ 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); @@ -296,7 +286,7 @@ } 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; @@ -318,7 +308,7 @@ 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'; diff --git a/Open-ILS/web/opac/skin/tadlv4/xml/result/result_table.xml b/Open-ILS/web/opac/skin/tadlv4/xml/result/result_table.xml index 30776971ad..dbc706132d 100644 --- a/Open-ILS/web/opac/skin/tadlv4/xml/result/result_table.xml +++ b/Open-ILS/web/opac/skin/tadlv4/xml/result/result_table.xml @@ -150,9 +150,6 @@ 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; } @@ -166,7 +163,7 @@ 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); @@ -178,9 +175,7 @@ var cp_status; var cp_location; var cp_circ_lib; - //if (item_cnt >= max_items) { - // return; - //} + if (cp.getAttribute('deleted') == 't') { return; } @@ -216,7 +211,7 @@ 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++; @@ -245,11 +240,6 @@ 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; @@ -259,16 +249,16 @@ 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); @@ -290,7 +280,7 @@ } 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; @@ -312,7 +302,7 @@ 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'; diff --git a/Open-ILS/web/opac/skin/tadlv5/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/tadlv5/xml/rdetail/rdetail_summary.xml index 7ccb149be0..d1859d7df3 100644 --- a/Open-ILS/web/opac/skin/tadlv5/xml/rdetail/rdetail_summary.xml +++ b/Open-ILS/web/opac/skin/tadlv5/xml/rdetail/rdetail_summary.xml @@ -155,9 +155,6 @@ 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; } @@ -171,7 +168,7 @@ 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); @@ -183,9 +180,7 @@ var cp_status; var cp_location; var cp_circ_lib; - //if (item_cnt >= max_items) { - // return; - //} + if (cp.getAttribute('deleted') == 't') { return; } @@ -221,7 +216,7 @@ 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++; @@ -251,11 +246,6 @@ } 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; @@ -265,16 +255,16 @@ 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); @@ -296,7 +286,7 @@ } 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; @@ -318,7 +308,7 @@ 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'; diff --git a/Open-ILS/web/opac/skin/tadlv5/xml/result/result_table.xml b/Open-ILS/web/opac/skin/tadlv5/xml/result/result_table.xml index 30776971ad..dbc706132d 100644 --- a/Open-ILS/web/opac/skin/tadlv5/xml/result/result_table.xml +++ b/Open-ILS/web/opac/skin/tadlv5/xml/result/result_table.xml @@ -150,9 +150,6 @@ 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; } @@ -166,7 +163,7 @@ 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); @@ -178,9 +175,7 @@ var cp_status; var cp_location; var cp_circ_lib; - //if (item_cnt >= max_items) { - // return; - //} + if (cp.getAttribute('deleted') == 't') { return; } @@ -216,7 +211,7 @@ 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++; @@ -245,11 +240,6 @@ 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; @@ -259,16 +249,16 @@ 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); @@ -290,7 +280,7 @@ } 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; @@ -312,7 +302,7 @@ 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';