Bugzilla – Attachment 5633 Details for
Bug 6932
Javascript errors in irregular pattern check update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix js under ie
0001-Simplify-and-fix-the-javascript-under-ie-by-using-jq.patch (text/plain), 2.75 KB, created by
Maxime Pelletier
on 2011-09-28 19:42:03 UTC
(
hide
)
Description:
Fix js under ie
Filename:
MIME Type:
Creator:
Maxime Pelletier
Created:
2011-09-28 19:42:03 UTC
Size:
2.75 KB
patch
obsolete
>From 4f1b6258c2f4bf6ec5a09235cfae9bb61933e17d Mon Sep 17 00:00:00 2001 >From: Maxime Pelletier <maxime.pelletier@libeo.com> >Date: Wed, 28 Sep 2011 15:36:44 -0400 >Subject: [PATCH] Simplify and fix the javascript under ie by using jquery. > Also fixes the code to work like the comment says it should. > >--- > .../prog/en/modules/serials/subscription-add.tt | 40 ++++++++----------- > 1 files changed, 17 insertions(+), 23 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index f21e72d..cc5cf39 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -101,29 +101,23 @@ function IrregularPattern() { > } > > IrregularPattern.prototype.update = function() { >- this.skipped= new Array; >- var cnt = 0; >- // daily periodicity, we interpret irregular array as which days of week to skip. >- // else if weekly periodicity, week numbers (starting from 01 Jan) to skip. >- // else irregular array is list of issues to skip >- var summary_str = ''; >- this.numskipped = 0; >- if(document.f.irregularity_select) { >- //$("#irregularity_select option:selected").each(...); //jquery can combine both conditionals and the for loop >- for( var i in document.f.irregularity_select.options ) { >- if( document.f.irregularity_select.options[i].selected ) { >- this.skipped[cnt] = document.f.irregularity_select.options[i].value ; >- summary_str += document.f.irregularity_select.options[i].text + "\n" ; >- cnt++; >- this.numskipped++; >- } >- } >- var summary = document.getElementById("irregularity_summary"); >- if(summary) { >- summary.value = summary_str; >- summary.rows= ( cnt > 6 ) ? cnt : 6 ; // textarea will bre resized, but not more than 6 lines will show. >- } >- } >+ this.skipped= new Array; >+ var cnt = 0; >+ // daily periodicity, we interpret irregular array as which days of week to skip. >+ // else if weekly periodicity, week numbers (starting from 01 Jan) to skip. >+ // else irregular array is list of issues to skip >+ var summary_str = ''; >+ this.numskipped = 0; >+ $("#irregularity_select option:selected").each(function(index) { >+ summary_str += $(this).text() + "\n" ; >+ this.numskipped++; >+ cnt++; >+ }); >+ var summary = $("#irregularity_summary"); >+ if(summary) { >+ summary.val(summary_str); >+ summary.attr("rows", ( cnt <= 6 ) ? cnt : 6) ; // textarea will be resized, but not more than 6 lines will show. >+ } > } > > IrregularPattern.prototype.irregular = function(index) { >-- >1.5.6.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6932
: 5633