// copyright 2024 Cloudware Ltd $.ajaxSetup ({cache: false}); var lang=''; var changing_lang; var has_changed_custom_options=false; var MAX_SUB_HEADINGS=7; var extra_col=false; var depth=0; var max_depth=0; var show_edit_headings_warning3=true; var show_edit_headings_warning4=true; var too_much_info_alert_given=true; var pin_focus=false; var org_items=[ {'type':'line',p:1,caption:'Name','caption_g':'Ainm', 'col':1}, {'type':'line',p:2,caption:'Class','caption_g':'Rang', 'col':1}, {'type':'legend1',p:3,caption:'legend1', 'col':1}, {'type':'box',p:4,caption:'Your child as a learner','caption_g':'Do pháiste mar fhoghlaimeoir','style':'over', 'keep_together':1, customise_sub:'out_sub_headings', 'col':1, narrative:true, 'lines':['Interested in learning', 'Listens attentively', 'Works well independently', 'Works well with other children', 'Keeps trying even when tasks are difficult', 'Homework is completed to his/her ability', 'Presents work carefully'], 'lines_g':['Spéis san fhoghlaim', 'Éisteann go cúramach', 'Oibríonn go maith ina (h)aonar', 'Oibríonn go maith le páistí eile', 'Coinníonn leis an tasc fiú nuair a bhíonn sé deacair', 'Tá obair bhaile déanta chomh maith is atá sé nó sí in ann é a dhéanamh', 'Cuireann obair i láthair go cúramach'] }, {'type':'box',p:5,caption:'Your child’s social and personal development','keep_together':1, 'caption_g':'Forás sóisialta agus pearsanta do pháiste','style':'over', 'col':1, customise_sub:'out_sub_headings2', narrative: true, 'lines': ['Appears happy at school', 'Behaves well in class', 'Mixes well with other children', 'Sensitive to others’ feelings', 'Behaves well in the playground', 'Manages and expresses own feelings well',''], 'lines_g':[ 'Tá an cuma air/uirthi go bhfuil sé/sí sásta ag an scoil', 'Dea-iompar sa rang', 'Dea-chaidreamh le páistí eile', 'Íogair do mhothúcháin páistí eile', 'Dea-iompar sa chlós', 'Dea-bhainistiú agus dea-léiriú a m(h)othúchán féin' ] }, {'type':'header',p:6,caption:'Your child’s learning during the year', caption_g:'Mar a d’fhoghlaim do pháiste i gcaitheamh na bliana', 'col':1,alt_col:2,'keep_together':2}, {'type':'legend2',p:7,caption:'legend2', 'col':1,alt_col:2,'keep_together':2, 'items':['Experiencing significant difficulty', 'Experiencing some difficulty', 'Managing comfortably', 'Capable and competent', 'Highly capable and competent'], items_g:[ 'Deacrachtaí móra aici/aige', 'Roinnt deacrachtaí', 'Ag éirí go maith léi/leis', 'Cumasach agus inniúil', 'An-chumasach agus an-inniúil'] }, {'type':'box',p:8,caption:'English',caption_g:'Gaeilge',caption_both:'Gaeilge _ Irish','style':'in', 'col':1,alt_col:2,'keep_together':2, 'lines':[ 'Listening comprehension', 'Oral expression', 'Reading', 'Writing'], lines_g:['Tuiscint ó chluas', 'Cur in iúl ó bhéal', 'Léitheoireacht', 'Scríbhneoireacht'], lines_both:['Tuiscint ó chluas _ Listening comprehension', 'Cur in iúl ó bhéal _ Oral expression', 'Léitheoireacht _ Reading', 'Scríbhneoireacht _ Writing'], 'narrative':true }, {'type':'box',p:9,caption:'Gaeilge',caption_g:'Béarla',caption_both:'Béarla _ English','style':'in', 'col':2, 'lines':[ 'Listening comprehension', 'Oral expression', 'Reading', 'Writing'], lines_g:['Tuiscint ó chluas', 'Cur in iúl ó bhéal', 'Léitheoireacht', 'Scríbhneoireacht'], lines_both:['Tuiscint ó chluas _ Listening comprehension', 'Cur in iúl ó bhéal _ Oral expression', 'Léitheoireacht _ Reading', 'Scríbhneoireacht _ Writing'], 'narrative':true }, {'type':'box',p:10,caption:'Mathematics','style':'in', 'col':2, caption_g:'Matamaitic', 'lines':[ 'Understanding and recalling', 'Using procedures', 'Reasoning and problem solving', 'Explaining and communicating'], lines_g:['Tuiscint agus athchuimhne', 'Úsáid modhanna oibre', 'Réasúnaíocht agus fadhbréiteach', 'Míniú agus cur in iúl'], 'narrative':true }, {'type':'box',p:11,caption:'Social, Environmental and Scientific Education','style':'in', 'col':2, caption_g:'Oideachas Sóisialta, Imshaoil agus Eolaíochta', alt_col2:3, 'lines':[ 'History', 'Geography', 'Science'], lines_g:['Stair', 'Tíreolaíocht', 'Eolaíocht'] }, {'type':'box',p:12,caption:'Arts Education','style':'in', 'col':2, caption_g:'Oideachas Ealaíon', 'lines':['Music', 'Drama', 'Visual Arts' ], lines_g:['Ceol', 'Drámaíocht', 'Na hAmharcealaíona'] }, {'type':'box',p:13,caption:'','style':'in', 'col':2, alt_col:3, 'lines':[ 'Physical Education', 'Social, Personal & Health Education', 'Religious/Ethical Education'], lines_g:['Corpoideachas', 'Oideachas Sóisialta, Pearsanta & Sláinte', 'Oideachas Reiligiúin/Eitice'] }, {type:'open_box',p:23,caption:'Learning and Using English',caption_g:'Foghlaim agus Úsáid an Bhéarla', 'col':1, alt_col:2, no_top:true, keep_together:2}, {type:'open_box',p:24,caption:'Learning and Using Gaeilge',caption_g:'Foghlaim agus Úsáid na Gaeilge', 'col':2}, {type:'open_box',p:25,caption:'Learning and Working with Mathematics',caption_g:'Foghlaim agus Úsáid na Matamaitice', 'col':2}, {type:'open_box',p:26,caption:'Learning about Myself and Others',caption_g:'Foghlaim fúm féin agus faoi dhaoine eile ',sub_caption:'(Social, Personal & Health Education/Religious/Ethical Education)',sub_caption_g:'(Oideachas Sóisialta, Pearsanta & Sláinte/Oideachas Reiligiúin/Eitice)', 'col':2}, {type:'open_box',p:27,caption:'Learning about Myself and the Wider World ',caption_g:'Foghlaim fúm féin agus faoin saol mór',sub_caption:'(History/Geography/Science)',sub_caption_g:'(Stair/Tíreolaíocht/Eolaíocht)', 'col':2}, {type:'open_box',p:28,caption:'Creative Development ',caption_g:'Forbairt Chruthaitheach',sub_caption:'(Visual Arts/Music/Drama)',sub_caption_g:'(Na hAmharcealaíona/Ceol/Drámaíocht)', 'col':2}, {type:'open_box',p:29,caption:'Physical Education ',caption_g:'Corpoideachas', 'col':2}, {type:'open_box',p:29.4,'hide':true,'col':2}, {type:'open_box',p:29.5,'hide':true,'col':2}, {'type':'box',p:30,caption:'How you can further support your child’s learning','style':'over', 'col':3, caption_g:'Conas cur leis an tacaíocht a thugann tú do do pháiste ina c(h)uid foghlama', hycf:true, 'narrative':true }, {'type':'box',p:14,caption:'Standardised test results (if applicable)','style':'over', 'col':3, 'white':true, caption_g:'Torthaí trialacha caighdeánaithe (más cuí)', customise:'std_results', warning:'Please remember that schools are required to report the standardised test results for children in 2nd, 4th and 6th classes.\n\nRefer to DES circular 0056/2011.', has_inside_text:true, inside_text_sten:'8-10 Well above average, 7 High average, 5-6 Average, 4 Low average, 1-3 Well below average', inside_text_std:'130+ Very high, 120 - 129 High, 110 - 119 High average, 90 - 109 Average, 80 - 89 Low average, 70 - 79 Low, Below 70 Very low', inside_text_std_g:'130+ An-ard, 120 - 129 Ard, 110 - 119 Meánach ard, 90 - 109 Meánach, 80 - 89 Meánach íseal, 70 - 79 Íseal Faoi bhun, 70 An-íseal ', inside_text_sten_g:'8-10 I bhfad os cionn an mheáin, 7 Meánach ard, 5-6 Meánach, 4 Meánach íseal, 1-3 I bhfad faoin meán', inside_text_criteria: 'Criterion reached: Within or above average, Approaching criterion: In the low average range, Criterion not reached: Below the low average range', inside_text_criteria_g: 'Baineadh an critéar amach: Laistigh den mheán nó os a chionn, Ag druidim leis an gcritéar: Sa raon meánach- íseal, Níor baineadh an critéar amach: Faoin raon meánach - íseal', narrative:true }, {'type':'box',p:15,caption:'Other school or class tests','style':'over', 'col':3, customise:'other_tests', 'white':true, caption_g:'Scrúduithe ranga nó scoile eile', 'narrative':true, hide:true }, {'type':'box',p:16,caption:'Learning support/resource teaching','style':'over', 'col':3, customise:'learning_support', 'white':true, caption_g:'Múinteóireacht tacaíochta foghlama / Múinteóireacht acmhainní', 'narrative':true, hide:true }, {'type':'box',p:17,caption:'My learning in school','style':'over', 'col':3, customise:'learning_support', 'white':true, inside_grid:'my_learning', caption_g:'Mo chuid foghlama ar scoil', 'narrative': true, hide:true }, /*{'type':'box',p:18,caption:'Parental comment','style':'over', 'col':3, 'white':true, customise:'parental_comment', caption_g:'Parental comment', 'narrative':true, hide:true },*/ {'type':'box',p:19,caption:'Comments','style':'over', 'col':3, caption_g:'Nótaí Tráchta', white:true, narrative:true, double_it:true, left:'Attendance to date', right:'Punctuality', left_g:'Tinreamh chun dáta', right_g:'Poncúlacht', r_use:'', l_use:'' }, {'type':'line',p:20,caption:'Teacher',caption_g:'Múinteoir', 'col':3,'line_opt':true}, {'type':'line',p:21,caption:'Principal',caption_g:'Príomhoide', 'col':3,'line_opt':true}, {'type':'line',p:22,caption:'Date',caption_g:'Dáta', 'col':3,'line_opt':true} ]; var org_items_ep=[ {'type':'line',p:1,caption:'Name','caption_g':'Ainm', 'col':1,'no_spacer':true}, {'type':'line',p:1.5,caption:'Likes to be known as (if different)','caption_g':'An t-ainm is fearr leis/léi (má tá sé éagsúil)', 'col':1,'no_spacer':true}, {'type':'line',p:2.1,caption:'Date of birth','caption_g':'Dáta breithe', /* caption_2:'Gender','caption_2_g':'Inscne', */ 'col':1,'no_spacer':true}, //{'type':'line',p:2.3,caption:'Home language(s)','caption_g':'Teanga(cha) an bhaile', 'col':1,'no_spacer':true}, {'type':'line',p:2.4,caption:'Parent(s)/guardian(s)','caption_g':'Tuismitheoir(í)/caomhnóir(í)', 'col':1,'no_spacer_preview':true}, //{'type':'line',p:2.4,caption:'Additional in-school supports provided: No ____ Yes ____','caption_g':'', 'col':1,no_line:true,'no_yes':true}, {'type':'text',p:2.8, grey:"If your child has a plan to support learning, an extra tick is placed in the column marked ‘P’ beside any item(s) that relates to this plan. ‘P’ is used in place of the word ‘plan’. Information shared about your child’s learning reflects progress based on this plan.", grey_both:"Má tá plean ag do pháiste chun tacú le foghlaim, cuirtear tic breise sa cholún a bhfuil \'P\' air in aice le haon mhír(eanna) a bhaineann leis an bplean sin. Úsáidtear an litir \'P\' in áit an fhocail \'plean\'. Is i bhfianaise an dul chun cinn atá bunaithe ar an bplean seo a roinntear faisnéis faoi fhoghlaim do pháiste.", grey_g:"Má tá plean ag do pháiste chun tacú le foghlaim, cuirtear tic breise sa cholún a bhfuil \'P\' air in aice le haon mhír(eanna) a bhaineann leis an bplean sin. Úsáidtear an litir \'P\' in áit an fhocail \'plean\'. Is i bhfianaise an dul chun cinn atá bunaithe ar an bplean seo a roinntear faisnéis faoi fhoghlaim do pháiste.", 'ep_col':2,'no_spacer':true,'extra_bottom':true}, {'type':'legend1',p:3,caption:'legend1', 'col':1,'no_spacer':true,'b_only':true}, {'type':'header',p:3,caption:'Your child as a learner','caption_g':'Do pháiste mar fhoghlaimeoir', 'col':1}, {'type':'legend1',p:3,caption:'legend1', 'col':1,'no_spacer':true,'not_b':true}, {'type':'box',p:4,caption:'','caption_g':'','style':'over', customise_sub:'out_sub_headings', 'col':1, 'lines':['Interested in learning', 'Listens attentively', 'Works well on his/her own', 'Works well with other children', 'Keeps trying even when tasks are difficult', 'Homework is completed to his/her ability'], 'lines_g':['Spéis san fhoghlaim', 'Éisteann go cúramach', 'Oibríonn go maith ina (h)aonar', 'Oibríonn go maith le páistí eile', 'Coinníonn leis an tasc fiú nuair a bhíonn sé deacair', 'Déanann sé nó sí a (h)obair baile chomh maith is atá sé/sí in ann'], 'no_spacer':true }, {'type':'header',p:3,caption:'Your child’s social and personal development','caption_g':'Forás sóisialta agus pearsanta do pháiste', 'col':1}, {'type':'legend1',p:3,caption:'legend1', 'col':1,'no_spacer':true,'not_b':true}, {'type':'box',p:5,caption:'', 'caption_g':'','style':'over', 'col':1, customise_sub:'out_sub_headings2', 'next_col':true, skip_first_col:5, 'lines':[ 'Manages and expresses feelings well', 'Is sensitive to others’ feelings', 'Mixes well with other children', 'Behaves well in class', 'Behaves well in the playground', 'Participates well in Religious or Ethical Education' ], 'lines_g':[ 'Go maith ó thaobh mothúcháin a láimhseáil agus a chur in iúl', 'Íogair do mhothúcháin páistí eile', 'Dea-chaidreamh le páistí eile', 'Dea-iompar sa rang', 'Dea-iompar sa chlós', 'Glacann páirt mhaith in Oideachas Reiligiúnach nó Eitice' ] ,'no_spacer':true }, {'type':'header',p:6,caption:'Your child’s learning', caption_g:'Foghlaim do pháiste', ep_col:2}, {'type':'text',p:6.3, caption: 'In general, information shared about a child’s learning reflects expectations based on the primary school curriculum objectives for 6th Class.', caption_g:'Is i bhfianaise na n-ionchas atá bunaithe ar churaclam na bunscoile do Rang a 6 a roinntear faisnéis faoi fhoghlaim páiste go ginearálta.', caption_both:'Is i bhfianaise na n-ionchas atá bunaithe ar churaclam na bunscoile do Rang a 6 a roinntear faisnéis faoi fhoghlaim páiste go ginearálta.', 'ep_col':2}, {'type':'legend2',p:7,caption:'legend2', 'items':[ 'Working towards expectations', 'Meeting expectations', 'Ahead of expectations'], items_g:[ 'Ag obair i dtreo ionchas', 'Ag baint amach ionchas', 'Chun cinn ar ionchas'] }, {'type':'box',p:8,caption:'English',caption_g:'Gaeilge',caption_both:'Gaeilge _ Irish','style':'in', sub_caption_g:'Díolmhaithe: Níl __ Tá __', sub_caption_both:'Díolmhaithe: Níl __ Tá __ _ Exemption: No / Yes', sub_sub_caption_g:'Cuirfear deimhniú díolúine ar aghaidh leis an gcárta tuairisce seo chuig an iarbhunscoil.', sub_sub_caption_both:'Cuirfear deimhniú díolúine ar aghaidh leis an gcárta tuairisce seo chuig an iarbhunscoil. _ Certification of exemption will be forwarded with this report card to the post-primary school.', 'extra_padding':true, fields:'en', 'lines':[ 'Communicates with others in a clear and effective way', 'Understands what is said by others', 'Reading', 'Writing'], lines_g:['Tuiscint ó chluas', 'Cur in iúl ó bhéal', 'Léitheoireacht', 'Scríbhneoireacht'], lines_both:['Tuiscint ó chluas _ Listening comprehension', 'Cur in iúl ó bhéal _ Oral expression', 'Léitheoireacht _ Reading', 'Scríbhneoireacht _ Writing'], 'narrative':false }, {'type':'box',p:9,caption:'Gaeilge',caption_g:'Béarla',caption_both:'Béarla _ English','style':'in', 'col':2, sub_caption:'Exemption: No __ Yes __', sub_sub_caption:'Certification of exemption will be forwarded with this report card to the post-primary school.', fields:'ga', 'extra_padding':true, ep_col:2, 'lines':[ 'Communicates with others in a clear and effective way', 'Understands what is said by others', 'Reading', 'Writing'], lines_g:['Tuiscint ó chluas', 'Cur in iúl ó bhéal', 'Léitheoireacht', 'Scríbhneoireacht'], lines_both:['Tuiscint ó chluas _ Listening comprehension', 'Cur in iúl ó bhéal _ Oral expression', 'Léitheoireacht _ Reading', 'Scríbhneoireacht _ Writing'], 'narrative':false }, {'type':'box',p:10,caption:'Mathematics','style':'in', 'col':2, caption_g:'Matamaitic', 'extra_padding':true, 'next_col':true, 'lines':[ 'Understands and uses mathematical knowledge', 'Understands and uses mathematical skills', 'Uses knowledge and skills to solve problems'], lines_g:['Tuigeann sé nó sí fíricí agus nósanna imeachta', 'Réitíonn sé nó sí fadhbanna', 'Míníonn sé nó sí nósanna imeachta agus freagraíonn sé nó sí go soiléir'], 'narrative':false }, {'type':'box',p:11,caption:'Social, Environmental and Scientific Education','style':'in', 'col':2, caption_g:'Oideachas Sóisialta, Imshaoil agus Eolaíochta', alt_col2:3, boldlines:true, 'lines':[ 'Science', 'History', 'Geography'], lines_g:['Eolaíocht','Stair', 'Tíreolaíocht' ] }, {'type':'box',p:12,caption:'Arts Education','style':'in', 'col':2, caption_g:'Oideachas Ealaíon', boldlines:true, 'lines':['Music', 'Drama', 'Visual Arts' ], lines_g:['Ceol', 'Drámaíocht', 'Na hAmharcealaíona'] }, {'type':'box',p:13,caption:' ','style':'in', 'col':2, alt_col:3, //'skip_first_col':true, //'funny_third':'Opted out ___', 'funny_third':' ', boldlines:true, 'lines':[ 'Physical Education', 'Social, Personal and Health Education'], lines_g:['Corpoideachas', 'Oideachas Sóisialta, Pearsanta & Sláinte'] }, {'type':'box',p:16,caption:'Standardised test scores','style':'over', 'col':3, //'white':true, ep_col:3, caption_g:'Torthaí trialacha caighdeánaithe', customise:'std_results', has_inside_text:true, inside_grid:'test_results', inside_grid_lines:[[{'caption':'','caption_g':'',caption_both:'',rowspan:2,width:15,center:true},{'caption':'STen Score','caption_g':'Toradh',caption_both:'Toradh _ STen Score',colspan:3,width:57,center:true},{filler:true},{filler:true}], [{ filler: true }, { 'caption': '2nd class*', 'caption_g': 'Rang 2*', 'caption_both':'Rang 2* _ 2nd class', center: true }, { 'caption': '4th class', 'caption_g': 'Rang 4',center:true},{'caption':'6th class','caption_g':'Rang 6',center:true}], [{nowrap:true,'caption':'Maths','caption_g':'Matamaitic','caption_both':'Matamaitic
Maths'},{'caption':'','caption_g':''},{'caption':'','caption_g':''},{'caption':'','caption_g':''}], [{nowrap:true,'caption':'English reading','caption_g':'Léitheoireacht i mBéarla','caption_both':'Léitheoireacht i mBéarla
English reading'},{'caption':'','caption_g':''},{'caption':'','caption_g':''},{'caption':'','caption_g':''}], [{nowrap:true,'caption':'Irish reading**','caption_g':'Léitheoireacht i nGaeilge','caption_both':'Léitheoireacht i nGaeilge
Irish reading'},{'caption':'','caption_g':''},{'caption':'','caption_g':''},{'caption':'','caption_g':''}] ], inside_text_sten:'STen scores: 1-3 Well below average, 4 Low average, 5-6 Average, 7\u00A0High average, 8-10 Well above average
*Not administered in 2020 due to COVID-19
**Irish reading test for Irish-medium primary schools only', inside_text_sten_g:'Scóir STen: 1-3 I bhfad faoin meán, 4 Meánach íseal, 5-6 Meánach, 7\u00A0Meánach ard, 8-10 I bhfad os cionn an mheáin
*Níor riaradh é in 2020 mar gheall ar COVID-19', inside_text_sten_both:'Scóir STen: 1-3 I bhfad faoin meán, 4 Meánach íseal, 5-6 Meánach, 7\u00A0Meánach ard, 8-10 I bhfad os cionn an mheáin
STen scores: 1-3 Well below average, 4 Low average, 5-6 Average, 7\u00A0High average, 8-10 Well above average
*Níor riaradh é in 2020 mar gheall ar COVID-19 / Not administered in 2020 due to COVID-19', narrative:false }, {'type':'box',p:17,caption:'Attendance','style':'over', 'col':3, caption_g:'Nótaí Tráchta', //white:true, inside_grid:'attendance', left:['Attendance','',''], right:['Punctuality','Arriving on time','Very good','Needs improvement'], left_g:['Tinreamh','',''], right_g:['Poncúlacht','Ag teacht isteach in am','An-mhaith','Feabhas ag teastáil'], r_use:'', l_use:'' }, {'type':'line',p:17.5,'next_col':true,caption:'Report card completed on',caption_g:'Cárta tuairisce comhlánaithe ar', 'col':3,'line_opt':true}, {'type':'box',p:18,caption:'How you can further support your child’s learning','style':'over', 'col':3, caption_g:'Conas cur leis an tacaíocht a thugann tú do do pháiste ina c(h)uid foghlama', hycf:true, set_height:150, 'narrative':true }, {'type':'box',p:19,caption:'Additional information to support your child’s transition to post-primary school','style':'over', 'col':3, caption_g:'Eolas breise chun tacú le haistriú do pháiste chuig an iar-bhunscoil', //white:true, narrative:true }, // {'type':'text',p:19.5,caption:'This report card and the attached ‘Student voice’ form which your child filled-in will be shared with the post-primary school in which your child’s enrolment was confirmed.', // caption_g:'', 'col':3}, {'type':'tick',p:19.6,caption:'Please tick if a NEPS Student Transfer Form was forwarded to the post-primary school','caption_g':'Cuir tic má tá Foirm Aistrithe Mac Léinn NEPS curtha ar aghaidh chuig an iar-bhunscoil', 'col':3,'no_spacer':true}, {'type':'line',p:20,caption:'Teacher',caption_g:'Múinteoir', 'col':3,'line_opt':true}, {'type':'line',p:21,caption:'Principal',caption_g:'Príomhoide', 'col':3,'line_opt':true}, {'type':'line',p:22,caption:'Date',caption_g:'Dáta', 'col':3,'line_opt':true} ]; var items; var headers_over={'captions':['Rarely', 'Sometimes', 'Most of the time', 'Always'], 'captions_g':[ 'Go hannamh', 'Uaireanta', 'De ghnáth', 'I gcónaí']}; var headers_over_ep={'captions':['Rarely', 'Sometimes', 'Most of the time', 'Always'], 'captions_g':[ 'Go hannamh', 'Uaireanta', 'De ghnáth', 'I gcónaí']}; function get_headers_over(){ if(is_ep()){ return headers_over_ep; }else{ return headers_over; } } today=new Date() YEAR=today.getFullYear(); if(today.getMonth()>8)YEAR++; var cover_items={ report_title:'Annual Report Card', report_title_g:'Cárta Tuairisce Bliantúil', report_title_ep:'6th Class Report Card', report_title_ep_g:'Cárta Tuairisce Rang a 6', school_name:'Anytown\nPrimary School', report_title:'Annual Report Card', rc_date:'September '+(YEAR-1)+' - June '+(YEAR), rc_date_g:'Meán Fómhair '+(YEAR-1)+' - Meitheamh '+(YEAR), title_g:'Cárta Tuairisce Bliantúil', school_name_g:'Bunscoil\nBhaile Éigin', school_name_both:'Bunscoil\nBhaile Éigin', school_motto:'Ní neart go cur le chéile', school_motto_g:'Ní neart go cur le chéile', school_motto_ep:'Mol an óige agus tiocfaidh siad', school_motto_ep_g:'Mol an óige agus tiocfaidh siad', school_name_back:'Anytown Primary School', school_address:'Oak Road\nBalgriffin', school_phone:'01-1234567', school_email:'info@example.com', school_www:'www.example.com', school_name_back_g:'Bunscoil Bhaile Éigin', school_address_g:'Ascaill Darach\nBaile Grifín', school_phone_g:'01-1234567', school_email_g:'eolas@sampla.ie', school_www_g:'www.sampla.ie', school_name_back_both:'Bunscoil Bhaile Éigin', school_address_both:'Ascaill Darach\nBaile Grifín', school_phone_both:'01-1234567', school_email_both:'eolas@sampla.ie', school_www_both:'www.sampla.ie', include_child_name_caption:'Name', include_child_name_caption_g:'Ainm', opt_meeting_caption:'You may like to contact the class teacher to clarify an item in your child’s report card before the closure of the school for the summer holidays.', opt_meeting_caption_g:'B’fhéidir gur mhaith leat teagmháil a dhéanamh leis an múinteoir ranga chun soiléiriú a fháil maidir le mír ar chárta tuairisce do pháiste sula ndúnann an scoil le haghaidh laethanta saoire an tsamhraidh.', transition_statement:'Moving to post-primary school
To support your child’s move to post-primary school, we will send a copy of this report card to his/her new school. We will do so after the post-primary principal has confirmed your child’s enrolment for the new school year.', transition_statement_g: 'Ag aistriú go dtí an iarbhunscoil
Seolfaimid cóip den chárta tuairisce seo chuig scoil nua do pháiste chun tacú lena (h)aistriú chuig an iarbhunscoil. Déanfaimid amhlaidh tar éis do phríomhoide na hiarbhunscoile a dhearbhú go bhfuil do pháiste rollaithe don scoilbhliain nua.', front_extra: '', front_extra_g: '' }; var fixed_cover_items=['report_title','rc_date']; var cover_items_list = ['report_title', 'report_title_ep', 'rc_date', 'include_child_name_caption', 'school_name', 'school_motto', 'school_motto_ep', 'school_name_back', 'school_address', 'school_phone', 'school_email', 'school_www', 'opt_meeting_caption', 'transition_statement', 'front_extra']; var headers_in_count=5; function is_ie(){ return (window.navigator.userAgent.indexOf('MSIE')>-1); } function get_ie_version(){ var ie_index=window.navigator.userAgent.indexOf('MSIE'); if (ie_index>-1) return parseInt(window.navigator.userAgent.slice(ie_index+5),10); } function is_ie8(){ return is_ie() && get_ie_version()<=8; } function is_firefox(){ return window.navigator.userAgent.indexOf('Firefox')>0; } function is_webkit(){ return (window.navigator.userAgent.indexOf('WebKit')>-1); } function get_current_zoom_level(){ var zoom_level=$('#zoom').val(); return parseFloat(zoom_level); } function br(str){ return str.replace(/\n/g,'
'); } function gl(item,name,props){ if(!props)props={}; var has_index=props.hasOwnProperty('index'); var index=props['index']; var passed_lang=props.hasOwnProperty('lang')?props['lang']:lang; if(typeof passed_lang=="undefined") passed_lang=lang; if ((passed_lang=='_both')&&((item.hasOwnProperty(name+'_g'))&&(!item.hasOwnProperty(name+'_both'))||(has_index&&item.hasOwnProperty(name+'_both')&&!item[name+'_both'][index]))){ if((typeof index!="undefined")&&(index!=null)){ if (index>=item[name+'_g'].length){ return ''; } if(item[name+'_g'][index]!=item[name][index]) return item[name+'_g'][index]+' _ '+item[name][index]; }else{ if(item[name+'_g']!=item[name]) return item[name+'_g']+' _ '+item[name]; } } var i; if (passed_lang && (item.hasOwnProperty(name+passed_lang))) i = item[name+passed_lang]; else i = item[name]; if((typeof index!="undefined")&&(index!=null)) return i[index]; if (!i) return ''; return i; } function d(caption,line){ if (!caption) return ''; caption=br(caption); var i=caption.indexOf(' _ '); if (i>-1){ return caption.slice(0,i)+(line?'
':'')+' '+caption.slice(i+3)+''; } return caption; } function count_chars_one(str,c){ return str.split(c).length; } function legend1_html(pos){ if(is_ep()){ var l1='numbers'; }else{ var l1=$('#l1').val(); } if(!is_ep()&&l1!='symbols'&&l1!='rev_symbols'){ return; } if(!$('#change_l1_subs').is(':checked')) return; if(pos){ var elemid=' id="element_'+pos+'" class="element legend legend1 legend_'+lang+'"'; }else{ var elemid=''; } var html=['']; var headers=get_headers_over()['captions']; var header_count=headers.length; if(l1.slice(0,3)=='rev'){ order=-1; end=-1; start=header_count-1; }else{ order=1; start=0; end=header_count; } for (var x=start;x!=end;x+=order){ var caption=gl(get_headers_over(),'captions',{index:x}).replace(/\n/g,' '); if(is_ep()){ var sym=''+(x+1)+''; }else{ var sym=''; } html.push(''+sym+' '+d(caption)+' '); } html.push('') return html.join(''); } function legend1(item,pos){ if (item['b_only']&&(lang!='_both')) return; if (item['not_b']&&(lang=='_both')) return; item['height']=0; item['html']=''; var html=legend1_html(pos); if(html){ item['height']=2; item['html']=html; } } function no_wrap(s){ if(!s) return ''; var a=s.split(','); for (var x=0;x'; } return a.join(', '); } function resize_handle(item){ if(is_ep()) return ''; return'
Narrative box size: D +
'; } function row_col_span(cell){ var s=''; if(cell.colspan) s=' colspan="'+cell.colspan+'"'; if(cell.rowspan) s+=' rowspan="'+cell.rowspan+'"'; return s; } function box(item,pos){ var height=0; var rows=[]; var over_style=item['style']=='over'; var narrative=item['narrative']; var lines=item['lines']; var inside_grid=item['inside_grid']; if(inside_grid){ var inside_grid_header; if(inside_grid=='my_learning'){ if(!$('#my_learning_grid').is(':checked')) inside_grid=null; inside_grid_header=''; } } rows.push(''); var bold_lines=false; var color=$('#select_colour').val(); if (over_style){ if(is_ep()){ var l1='symbols'; }else{ var l1=$('#l1').val(); if (!$('#change_l1_subs').is(':checked')){ l1=null; } } var extra=''; if (color!='#000000'){ var extra=' style="'+(item['white']?'':'background-color:white;')+'color:'+color; } var colspan=2; if(lines) colspan=6; if(inside_grid=='my_learning') colspan=1; if(inside_grid=='test_results') colspan=5; if(inside_grid=='attendance') colspan=3; if(item['caption']){ rows.push(''); if (inside_grid&&inside_grid_header){ rows.push(inside_grid_header); } rows.push(''); } if (l1){ if (lines){ if (l1=='symbols'||l1=='rev_symbols'){ if (item['include_l1']){ var legend=' style="line-height:1.2em;padding-top:2px;">'+legend1_html(); }else{ var legend=' style="height:20px">'; } rows.push(''); height++; }else{ rows.push(''); height+=2; } if(is_ep()){ var headers=get_headers_over()['captions']; var header_count=5; }else{ var headers=get_headers_over()['captions']; var header_count=headers.length; } var order,start,end; if(l1.slice(0,3)=='rev'){ order=-1; end=-1; start=header_count-1; }else{ order=1; start=0; end=header_count; } var ec=''; for (var x=start;x!=end;x+=order){ if (l1=='symbols'||l1=='rev_symbols'){ if(is_ep()){ var sym=''+((x==0)?'P':x)+''; if(x==0)ec=' pback'; else ec=''; }else{ var sym=''; } rows.push(''); }else{ var caption=gl(get_headers_over(),'captions',{index:x}); var width=count_chars_one(caption,'\n')*10; var iheight=50; if (lang=='_both'){ caption=caption.replace('\n',' ').replace(' / ','\n').replace('_','\n'); if(is_firefox()){ iheight=53; }else{ iheight=56; } }else if (lang=='_g'){ iheight=40; } var width=(count_chars_one(caption,'\n')*10)+1; rows.push(''); } } rows.push(''); } }else{ lines=false; } }else{ if(is_ep()){ var l2='numbers_4_r'; }else{ var l2=$('#l2').val(); } var caption=gl(item,'caption'); bold_lines=!caption; if(bold_lines) height++; if(caption.length>30){ height++; //alert(caption+' '+caption.length); if(caption.length>60) height++; if(caption.length>90) height+=2; } var sub_caption=item['sub_caption'+lang]; if (sub_caption){ sub_caption='
'+d(gl(item,'caption'),true)+'
'+sym+''); if(!is_ie()||get_ie_version()>8){ rows.push(''); var caption_lines=caption.split('\n'); for(var y=0;y'+caption_lines[y]+''); } rows.push(''); } rows.push('
'+ ''+ '
'+d(caption)+''+d(gl(item,'sub_caption'),true)+ '
'+d(gl(item,'sub_sub_caption'),true)+'
'; }else{ sub_caption=d(caption); } rows.push(''+sub_caption+''); if (l2=='narrative'){ item['height']=0; item['html']=''; return; }else{ var max_headings=MAX_SUB_HEADINGS; if (max_headings0){ var l2=l2.split('_'); // stars_5_b var start,end,step; var count=parseInt(l2[1],10); if(l2[2]=='b'){ start=count-1; step=-1; end=-1; }else{ start=0; step=1; end=count; } var header_count=count; if (end<5){ var font_multiplier=3; var font_start=8; }else{ var font_multiplier=2; var font_start=6; } for (var x=start;x!=end;x+=step){ if (l2[0]=='stars'){ rows.push(''); }else if (l2[0]=='numbers'){ if(is_ep()){ rows.push(''+((x==0)?'P':x)+''); }else{ rows.push(''+(x+1)+''); } } } } } rows.push(''); } if (inside_grid){ if(inside_grid=='my_learning'){ for(var x=0;x<5;x++){ if(!$('input:checkbox[name=my_learning_use_heading_'+x+']').is(':checked')) continue; var caption=d($('input[name=my_learning_heading_'+x+']').val()); if(!caption) caption=' '; rows.push(''+caption+''); } narrative=false; } else if (inside_grid=='test_results'){ var inside_grid_lines=item['inside_grid_lines']; for(var x=0;x'); for(var y=0;y'+d(gl(inside_grid_line[y],'caption'))+''); } rows.push(''); }else{ rows.push(''); for(var y=0;y'+d(gl(inside_grid_line[y],'caption'))+''); } rows.push(''); } } rows.push('
'+ d(gl(item,'inside_text'))+ '
'); narrative=false; } } if (lines){ var max_headings=MAX_SUB_HEADINGS; if (max_headings' + d(caption) + ''); for (var y=0;y'); }else{ rows.push(''); } } rows.push(''); } if ((shown_count>3)&&(!over_style&&!narrative)) height+=3; if (shown_count>4){ if (lang=='_both'){ if(over_style) height+=4; height++; } height++; } if (shown_count>6){ if (lang=='_both') height+=4; height++; } } if (narrative){ var inside_text=''; height+=3; if (item['inside_text']){ if (lang=='_both'){ inside_text=item['inside_text'].split('_'); inside_text=inside_text[0]+' _ '+inside_text[1]; height-=2; } else { if (lang == '_g') { inside_text = gl(item, 'inside_text'); } else { inside_text = no_wrap(gl(item, 'inside_text')); } } inside_text=''+d(inside_text); } if(over_style){ height+=2; if (lang=='_both'){ height++; if (!item['white']) height-=3; } } if (lang=='_both') height++; if(item['double_it']){ height++; if (lang=='_both') height+=4; } var style_height=''; var expandable='expandable'; if (item['set_height']){ style_height=' style="height:'+item['set_height']+'px"'; expandable=''; } var colspan=2; if(inside_grid=='attendance'){ colspan=3; }else if (lines){ colspan=6; } rows.push(''+resize_handle(item)+inside_text+''); } else if (item['inside_text_top']){ rows.push('
'+d(gl(item,'inside_text_top'))+'
'+d(gl(item,'inside_text_bottom'))+'
'); } if (item['left']){ if(is_ep()){ height++; right=item['right']; left=item['left']; rows.push(''); rows.push(''+ d(gl(item,'left',{index:0}))+ ''); rows.push(''+d(gl(item,'right',{index:0}))+'
'+d(gl(item,'right',{index:1}))+''); rows.push(''); rows.push(''); rows.push(''+d(gl(item,'left',{index:1}))+'
'+d(gl(item,'left',{index:2}))+''); rows.push(''+d(gl(item,'right',{index:2}))+''); rows.push(''); rows.push(''); rows.push(''); rows.push(''+d(gl(item,'right',{index:3}))+''); rows.push(''); rows.push(''); }else{ height++; right=item['right']; if(!(item['hr']&&item['hl'])){ rows.push(''); if(!item['hl']) rows.push(''+d(gl(item,'left'))+'
'+d(gl(item,'l_use'))+'
'); if((!item['hr'])&&item['right']) rows.push(''+d(gl(item,'right'))+''); rows.push(''); } } } rows.push(''); item['height']=height; item['html']=rows.join(''); } function legend2(item,pos){ var html=['
']; var items=item['items']; if(is_ep()){ var l2='numbers_3_r'; }else{ var l2=$('#l2').val(); } var height=0; if (l2=='narrative'){ }else{ var l2=l2.split('_'); // stars_5_b var start,end,step; var count=parseInt(l2[1],10); if(l2[2]=='b'){ start=count-1; step=-1; end=-1; }else{ start=0; step=1; end=count; } for (var x=start;x!=end;x+=step){ if (l2[0]=='stars'){ html.push(' '+d(gl(item,'items',{index:x}))+' '); }else if (l2[0]=='numbers'){ html.push(''+(x+1)+' '+d(gl(item,'items',{index:x}))+' '); } } height++; if(lang=='_both') height++; } html.push('
') item['height']=height; item['html']=html.join(''); } function open_box(item,pos){ var l2=$('#l2').val(); if (l2!='narrative'){ item['height']=0; item['html']=''; return; } var caption = d(gl(item, 'caption'), true); var sub_caption=d(gl(item,'sub_caption'),true); if (!sub_caption||item['hide_sub']) sub_caption=''; var color=$('#select_colour').val(); item['height']=2; var style_height=''; var expandable='expandable'; if (item['set_height']){ style_height=' style="height:'+item['set_height']+'px"'; expandable=''; } var ao_options = ''; if (item['ao']==true) { ao_options = '
'+d(gl(item,'ao1'))+'
'+d(gl(item,'ao2'))+'
'; } item['html'] = ''; } function header(item,pos){ var color=$('#select_colour').val(); var extra=''; if (color!='#000000'){ var extra='style="background-color:white;color:'+color+'"'; } item['height']=1; item['html']='
'+d(gl(item,'caption'),true)+'
'; } function line(item,pos){ item['height']=0; var caption=item['caption']; if ((caption=='Class')&&($('#rc_class').val())) { item['html']=''; }else{ var show_line=$('#show_lines_overall'); var line=''; if (show_line.is(':checked')){ line=''; } if(item['caption_2']) item['html']='
'+d(gl(item,'caption'))+': ______________ '+''+d(gl(item,'caption_2'))+': '+line+'
'; else item['html']='
'+d(gl(item,'caption'))+': '+line+'
'; } } function tick(item,pos){ item['height']=0; var caption=item['caption']; item['html']='
'+d(gl(item,'caption'),true)+'
'; } function text(item,pos){ var extra_row=''; if(item['grey']){ var grey_heading=''; if(item['grey']){ var grey_heading='
'+d(gl(item,'grey_heading'))+'
'; } extra_row=''+grey_heading+d(gl(item,'grey'))+''; } var wcaption=''; if(item['caption']){ var wcaption=''+d(gl(item,'caption'))+''; } item['html']=''+wcaption+extra_row+'
'; } function resize_narrative(grow,t){ var box=t.closest('.element'); var id=box.attr('id').split('_')[1]; if (grow==0){ delete items[parseInt(id,10)]['set_height']; show_template(); return; } var distance=grow*5; var set_height=items[parseInt(id,10)]['set_height']; if(!set_height) set_height=t.closest('.nar').height(); if(((grow==-1)&&set_height>35)||((grow==1)&&set_height<600)){ items[parseInt(id,10)]['set_height']=set_height+distance; show_template(); } } function make_resizable(){ //$('.expandable').resizable({handles:"s"}); return; $('.expandable').hover( function(){ $('.resize').hide(); $(this).children('.resize').show(); }, function(){ $('.resize').hide(); } ); } var mapping={ 'line':line, 'tick':tick, 'text':text, 'box':box, 'open_box':open_box, 'legend1':legend1, 'legend2':legend2, 'header':header }; function page2(page_count,max_col_height,total_height){ var found=[]; $('#page_2_header').html('
Inside page
'); var current_height=0; var col=1; var cur_keep_together; var keep_together_count=0; var height_eaten=0; var total_cols=(extra_col?5:4); var cont_col_height=max_col_height; var proper_col=1; var too_much_info=false; var first_element=true; for(var x=0;x'); } } if(item['type']=='header'){ var force_col=$('#set_col_'+(x+2)).val(); }else if(item['type']=='legend2'){ var force_col=$('#set_col_'+(x+1)).val(); }else{ var force_col=$('#set_col_'+x).val(); } if (!item_keep_together||(cur_keep_together!=item_keep_together)){ if (current_height+item_height>cont_col_height){ col++; current_height=0; cont_col_height=(total_height-height_eaten)/(total_cols-col); //alert('cont_col_height=(total_height-height_eaten)/(total_cols-col) : '+cont_col_height+' '+total_height+' '+height_eaten+' '+total_cols+' '+col); } cur_keep_together=item_keep_together; } current_height+=item['height']; var current_col=proper_col; if (extra_col){ if(is_ep()){ if (proper_col==4){ page_count=1; current_col=1; }else{ page_count=2; } }else{ if (proper_col==1){ page_count=1; }else{ page_count=2; current_col-=1; } } } /*if (item['col']){ if(item['col']==proper_col){ } proper_col=item['col']; }*/ var spacer=''; if(first_element){ first_element=false; }else{ if(!(item['no_spacer']||item['no_spacer_preview'])) spacer='
'; } item['col']=proper_col; $('#page_'+page_count+'_col'+current_col).append( spacer+ item_html //+'
'+item['height']+' X '+current_height+'
' ); var ou_col=$('#page_'+page_count+'_colouter'+current_col); var ou_height=ou_col.outerHeight(); var phh=$('.page_header').height(); var page_height; if (is_ie8()){ if (page_count==1) page_height=847; else page_height=820; }else{ page_height= $('#page'+page_count).height(); // ie 8 820 } if(is_ep()&&item['ep_col']){ //alert('page_height: '+page_height+'px ou_height: '+ou_height+'px phh: '+phh+'px keep_together: '+keep_together_count); //if(page_count==1)phh*=2; var force_new_col=((lang!='_both')&&(item['ep_col']>current_col)); }else{ var force_new_col=false; } if(is_ep()){ if(item['next_col']){ proper_col++; first_element=true; } }else if ((((ou_height+phh)>page_height))||(force_new_col)){ if(proper_col==4){ too_much_info=true; continue; } for(var delete_delta=0;delete_delta<=keep_together_count;delete_delta++){ $('#element_'+(x-delete_delta)).remove(); $('#spacer_'+(x-delete_delta)).remove(); } proper_col++; if ((proper_col==4)&&(!extra_col)){ extra_col=true; depth++; if (depth>max_depth){ max_depth=depth; } show_template(true); depth--; return; } current_col=proper_col; if (extra_col){ if(is_ep()){ if (proper_col==4){ page_count=1; current_col=1; }else{ page_count=2; } }else{ if (proper_col==1){ page_count=1; }else{ page_count=2; current_col-=1; } } } page_count=2; x-=(1+keep_together_count); first_element=true; continue; } } //read_heights(); //setTimeout(read_heights2,1000); // this is the strech code //if(false) for (var x=1;x<5;x++){ //$('#debug').append('
'+x+' outer: '+$('#colouter'+x).height()+' inner: '+$('#col'+x).height()+'
'); if (x==4){ if (!extra_col) continue; var col_id='#page_1_col1'; var page_num=1; }else{ var col_id='#page_2_col'+x; var page_num=2; } var ex=$(col_id+' .expandable'); if (ex.length==0){ var ex=$(col_id+' .backup_spacer'); var using_backup=true; }else{ var using_backup=false; } if (ex.length==0) continue; var distance=$('#page'+page_num).height()-$(col_id).height()-85; var each=Math.floor(distance/ex.length); //if (each<0) continue; //alert(each); /*if ((x==1)&&(each>90)){ each2=Math.min(each-90,20); var ex2=$(col_id+' .backup_spacer'); ex2.each(function(){ $(this).height($(this).height()+each2); }); each=90; }*/ if (using_backup&&(each>35))each=35; ex.each(function(){ $(this).height($(this).height()+each); }); } if(too_much_info){ if(!too_much_info_alert_given){ alert('Your report card no longer fits into 4 columns. Please reduce the number of items on your report card and/or reduce the size of the narrative comment boxes.'); too_much_info_alert_given=true; } }else{ too_much_info_alert_given=false; } setTimeout(make_resizable,100); } function read_heights(){ $('.element').each(function(){ var t=$(this); var id=t.attr('id').split('_')[1]; items[id]['aheight']=t.height(); }); } function read_heights2(){ $('.element').each(function(){ var t=$(this); var id=t.attr('id').split('_')[1]; items[id]['lheight']=t.height(); }); var d=[]; for (var i=0;iCover page
'); $('#page_1_header3').html('
Front panel
'); col3.append( '

'+d($('#school_name').val(),true)+'

'+ ''+ '

'+d($('#report_title').val(),true)+'

'+ '

'+d($('#rc_class').val(),true)+'

'+ '

'+d($('#rc_date').val(),true)+'

'+ '

' + d($('#front_extra').val(), true) + '

'+ '

'+d($('#include_child_name_caption').val())+':

'); if(is_ep()){ col3.append('

' + d($('#transition_statement').val(),true) + '

'); } $('#page_1_header1').html('
Inside panel
'); $('#page_1_header2').html('
Back panel
'); var img='ncca_black.jpg'; if(is_ep()){ col2.append(''+ '

'+ '

www.ncca.ie/transfer

'+ //''+ '

'+d($('#motto_bottom').val(),true)+' 

'+ '

'+d($('#school_name_back').val(),true)+'
'+ ''+d($('#school_address').val(),true)+'
'+ ''+d($('#school_phone').val(),true)+'
'+ ''+d($('#school_email').val(),true)+'
'+ ''+d($('#school_www').val(),true)+'

'+ '

'+ '

'+get_ws()+'

'+ '
'+d($('#opt_meeting_caption').val())+'
'+ ''); }else{ col1.append( '

'+d($('#school_motto').val(),true)+'

'+ ''+ '

'+d($('#motto_bottom').val(),true)+'

'); col2.append('
'+ '

'+d($('#school_name_back').val(),true)+'
'+ ''+d($('#school_address').val(),true)+'

'+ '

'+d($('#school_phone').val(),true)+'

'+ '

'+d($('#school_email').val(),true)+'

'+ '

'+d($('#school_www').val(),true)+'

'+ '

'+ '

'+get_ws()+'

'+ '

'+d($('#opt_meeting_caption').val())+'

'+ '
'); } $('#parentmeeting_message').html(d($('#opt_meeting_caption').val())); setTimeout(space_page1,0); } function set_motto_font(o){ if (!o.html()) return; var l=o.html().length; var font_size=18 if (l>40) font_size=16; if (l>80) font_size=13; if (l>120) font_size=11; if (extra_col) font_size-=2; o.css('font-size',font_size+'pt'); } function space_page1(){ set_motto_font($('.p1_school_motto')); set_motto_font($('.p1_motto_bottom')); var ex=$('#page_1_col3 p'); var p1h=$('#page1').height(); var col3h=$('#page_1_col3').height(); var distance=720-col3h; if (distance<0){ $('#img_school_logo').css('margin',0); }else{ } var each=Math.floor((distance)/ex.length/1.5); //alert('col3h: '+col3h+' each: '+each); ex.each(function(){ var t=$(this); //$('#debug').append($(this).height()+' -> '+$(this).height()+'+'+each+'
'); t.css('margin-bottom',parseInt((t.css('margin-bottom'),10)+each)+'px'); t.css('margin-top',parseInt((t.css('margin-top'),10)+each)+'px'); }); if(is_ep()){ var ex=$('#page_1_col2 > p'); var col3h=$('#page_1_col2').height(); var distance=720-col3h; if (distance<0){ $('#img_school_logo').css('margin',0); }else{ } var each=Math.floor((distance)/(ex.length*2)); //alert('col2h: '+col3h+' each: '+each+' len: '+ex.length); ex.each(function(){ var t=$(this); //$('#debug').append($(this).height()+' -> '+$(this).height()+'+'+each+'
'); t.css('padding-bottom',each+'px'); t.css('padding-top',each+'px'); }); $('#page_1_colouter2').css('vertical-align','middle'); }else{ $('#page_1_colouter2').css('vertical-align','bottom'); } } var uploader_back; var uploader; function create_uploaders(){ if(!uploader){ uploader = new plupload.Uploader({ runtimes : 'html5,html4', browse_button : 'pickfiles_logo', container : 'logo_container', max_file_size : '10mb', url : '/file_upload', flash_swf_url : '/jslib/plupload.flash.swf', filters : [ {title : "Image files", extensions : "jpg,gif,png"} ] }); uploader.bind('FilesAdded', function(up, files) { $('#progress_logo').show(); setTimeout(function(){ uploader.start(); },200); }); uploader.bind('Init', function(up, params) { //alert(params.runtime); }); uploader.bind('UploadProgress', function(up, file) { $('#progress_logo_percent').html(file.percent + "%"); }); uploader.bind('Error', function(up, err) { alert("There was an error uploading your image.\n\nPlease make sure the image is actually an image and not a pdf or Word document.\n\nPlease make sure the image is less than 10 megabytes in size."); }); uploader.bind('FileUploaded', function(up, file) { setTimeout(function(){ current_img_hash=Math.random(); $('#img_school_logo').attr('src','/get_file?ep='+is_ep()+'&img_type=logo&_='+current_img_hash); $('#progress_logo').hide(); show_template(); },1000); }); uploader.init(); } if (!uploader_back){ uploader_back = new plupload.Uploader({ runtimes : 'html5,html4', browse_button : 'pickfiles_back', container : 'back_container', max_file_size : '10mb', url : '/file_upload_back', flash_swf_url : '/jslib/plupload.flash.swf', filters : [ {title : "Image files", extensions : "jpg,gif,png"} ] }); uploader_back.bind('Init', function(up, params) { //alert(params.runtime); }); uploader_back.bind('FilesAdded', function(up, files) { $('#progress_back').show(); setTimeout(function(){ uploader_back.start(); },200); }); uploader_back.bind('UploadProgress', function(up, file) { $('#progress_back_percent').html(file.percent + "%"); }); uploader_back.bind('Error', function(up, err) { err_msg=[]; for (x in err) err_msg.push(x+' '+err[x]) alert("There was an error uploading your image.\n\nPlease make sure the image is actually an image and not a pdf or Word document.\n\nPlease make sure the image is less than 10 megabytes in size."); }); uploader_back.bind('FileUploaded', function(up, file) { setTimeout(function(){ current_img_hash=Math.random(); $('#progress_back').hide(); $('#img_school_back').attr('src','/get_file?ep='+is_ep()+'&img_type=back&_='+current_img_hash); },1000); }); uploader_back.init(); } } function show_correct_page(){ var current_page=$('#page_select').val(); var ps; if (current_step==2) create_uploaders(); if (current_step<3){ ps=1; }else if ((current_step==3)||(current_step==7&&is_ep())){ if(extra_col) ps=1; else ps=2; }else if (current_step==7){ ps=1; }else{ ps=2; } if (ps==2) $('#page'+ps).scrollintoview({duration:"slow"}); else $('#page_top').scrollintoview({duration:"slow"}); } function get_col_padding(){ //if(is_webkit()&&get_current_zoom_level()<1){ // return ' style="padding:12pt 4pt;"' //} return '' } var hold_page1=false; var base_height; function show_template(initial){ if(is_ep()){ var org_extra_col=true; extra_col=true; }else{ var org_extra_col=extra_col; if(depth==0){ extra_col=false; } } var total_height=0; for(var x=0;x62; if (total_height<45){ for(var x=0;x0); for (var page_count=(redo_page1?1:2);page_count<=2;page_count++){ var page_id='#page'+page_count; var page = $(page_id).html(''); h=[]; h.push(''); if(page_count==1){ h.push(''); for(var x=1;x<4;x++) h.push(''); } h.push(''); for(var x=1;x<4;x++){ var wpage=page_count; if ((wpage==1)&&(extra_col)&&(x==1)) wpage=2; h.push('
'); } h.push('
'); page.append(h.join('')); } if(extra_col){ $('#page_1_col1').html(''); } page2(2,max_col_height,total_height); if (((extra_col!=org_extra_col)||(redo_page1))&&(depth==0)){ page1(); } //show_correct_page(); } function get_by_p(new_items,p,x){ if(new_items[x]&&(new_items[x]['p']==p)) return new_items[x]; for(var x=0;x'); } $('#legend2_labels').html(l2.join('')); continue; } var in_style=(style=='in')||(t=='open_box'); if (!(customise_sub||in_style||customise)) continue; var h=[]; caption=gl(item,'caption'); lines=item['lines']; left=gl(item,'left'); if (in_style||lines) h.push(''); if (in_style||customise){ h.push(''); h.push('
'); } if (lines){ h.push('
'); var max_headings=MAX_SUB_HEADINGS; if (max_headings
'); } h.push('
'); } if (item['type']=='open_box'){ var sub_heading=gl(item,'sub_caption'); h.push('

' + '
'); } if(left){ h.push('
'); h.push(''); h.push('
'); h.push(''); h.push('
'); h.push('
'); } if (in_style||customise){ if(lines){ if(mcols){ h.push('Column: '); } h.push('

'); } if (in_style){ if(style=='in'){ $('#adv_subjects').append(h.join('')); }else{ $('#adv_subjects_out').append(h.join('')); } }else{ $('#adv_'+customise).append(h.join('')); } }else{ $('#adv_'+customise_sub).append(h.join('')); } } } function resize(){ var page=$('#page'); $('#preview_inner').width($(window).width()-$('#options_inner').width()-80); var height=$(window).height()-$('#header').height()-75; $('.height_control,.height_control_outer').height(height); setTimeout(function(){ $('#preview_inner').width($(window).width()-$('#options_inner').width()-80); },0); } var current_step=1; var step_count=$('.step').length; var alerted=true; function set_zoom(){ var zoom_level=get_current_zoom_level(); if(zoom_level<1){ $('#body').addClass('pinched'); if(!alerted&&is_webkit()){ alert('Please note: Google Chrome and Apple Safari may not display the preview correctly at zoom levels below 100%'); alerted=true; } }else{ $('#body').removeClass('pinched'); } $('#page_zoom').css({zoom:zoom_level,MozTransform:'scale('+zoom_level+')'}); } var bis_ep=$('input:radio[name=reporttype]:checked').val()=='ep';; function is_ep(){ return bis_ep; } function show_steps(){ var step_class='.step'; if(is_ep()){ step_class+='_ep'; } var s=$(step_class); var steps=s.length; var max_steps=steps; $('.p_n_buttons,.step_marker').remove(); s.each(function(index){ var t=$(this); var previous=''; var next; if (index==steps-1){ next=''; }else{ next=''; } var buttons='
'+previous+' '+next+'
'; if (t.hasClass('tall')){ t.children().first().after(buttons); } if(index>max_steps){ index=2; } t.prepend('

Step {0} of {1}

'.replace('{0}',index+1).replace('{1}',max_steps)); //if (t.hasClass('tall')){ t.append(buttons); //} }); } $(function(){ if(location.hash){ $('#reporttype_ep').attr('checked',true); setTimeout(set_report_type,1000); } $(window).resize(resize); resize(); show_steps(); $('#step_'+current_step).show(); if(!is_ie()){ //$('#zoom').val(1); $('#content').addClass('notie'); } $('#zoom').val(1); set_zoom(); $('#zoom').change(function(){ set_zoom(); show_template(); }); lang=$('#l_en').attr('checked',true).val(); for(var x=0;x-1) continue; var caption=gl(cover_items,name); if (restore){ if(!$('#'+name).val()){ $('#'+name).val(caption); $('.p1_'+name).html(d(caption,true)); } }else{ if(caption==$('#'+name).val()){ $('#'+name).val(''); $('.p1_'+name).html(''); } } } $.ajax({ type:'POST', url:'/remove_file', data: 'restore='+restore, success: function(data) { current_img_hash=Math.random(); $('#img_school_logo').attr('src','/get_file?ep='+is_ep()+'&img_type=logo&_='+current_img_hash); $('#img_school_back').attr('src','/get_file?ep='+is_ep()+'&img_type=back&_='+current_img_hash); }, error: function(){ alert('There was an error removing the image'); } }); if (restore){ $(this).val('Clear sample information'); $(this).removeClass('restore'); }else{ $(this).val('Restore sample information'); $(this).addClass('restore'); } }); $('#select_colour').change(function(){ var color=$(this).val(); $('.page_outer').css('color',color); if (color=='#000000'){ $('.reporting_area').css('color','white').css('background-color','black'); }else{ $('.reporting_area').css('color',color).css('background-color','white'); } var img='ncca_black.jpg'; $('.reporting_area').css('border','1px solid black'); $('#ncca_logo').attr('src','/static/img/'+img); show_template(); }); $('.shrink').live('click',function(){ resize_narrative(-1,$(this)); return false; }); $('.auto').live('click',function(){ resize_narrative(0,$(this)); return false; }); $('.grow').live('click',function(){ resize_narrative(1,$(this)); return false; }); $('.force_col').live('change',function(){ show_template(); }); $('.hide_item').live('click',function(){ has_changed_custom_options=true; var t=$(this); var id=t.attr('id').split('_'); var i=parseInt(id[1],10); var item=items[i]; var hide=!t.is(':checked') if(hide&&item.hasOwnProperty('warning')){ var warning=gl(item,'warning'); if (warning&&!confirm(warning)){ return false; } } if (id[0]=='hideline'){ items[i]['hide_lines'][parseInt(id[2],10)]=hide; }else if (id[0]=='hidesub'){ items[i]['hide_sub']=hide; }else{ if(id[0]=='narrative') hide=!hide; items[i][id[0]]=hide; } show_template(); }); function change_l1_narrative(){ var narrative = $('#change_l1_narrative').is(':checked'); if (!narrative) { $('.covid_l1_info_box').hide(); } else { $('.covid_l1_info_box').show(); } for(var x=0;x2){ current_step_id+='_ep'; } $(current_step_id).show().scrollintoview(); show_correct_page(); } $('.previous').live('click',function(){ if(current_step==0) return; current_step--; show_current_step(); }); function step_next(){ if ((current_step==2)&&$('#school_name').val()==gl(cover_items,'school_name')){ alert("Replace the red coloured text with your school's name."); $('#step_2').scrollintoview({duration:"slow"}); $('#school_name').focus(); return false; } if((current_step==1)&&($('input:radio[name=reporttype]:checked').val()=='code')){ if(!$('#pin').val()){ $('#pin').focus(); $('#load_error').html('Please enter a code.'); }else{ load_pdf(); } return; } current_step++; show_current_step(); } $('.next').live('click',step_next); $('#pdf_form').submit(function(){ _gaq.push(['_trackPageview', "/MyReportCard.pdf"]); for (var x=0;x0){i=i.eq(0);var m={e:d(l),s:d(i)};var h={top:m.e.rect.top-(m.s.rect.top+m.s.border.top),bottom:m.s.rect.bottom-m.s.border.bottom-m.s.scrollbar.bottom-m.e.rect.bottom,left:m.e.rect.left-(m.s.rect.left+m.s.border.left),right:m.s.rect.right-m.s.border.right-m.s.scrollbar.right-m.e.rect.right};var k={};if(j.direction.y===true){if(h.top<0){k.scrollTop=m.s.scroll.top+h.top}else{if(h.top>0&&h.bottom<0){k.scrollTop=m.s.scroll.top+Math.min(h.top,-h.bottom)}}}if(j.direction.x===true){if(h.left<0){k.scrollLeft=m.s.scroll.left+h.left}else{if(h.left>0&&h.right<0){k.scrollLeft=m.s.scroll.left+Math.min(h.left,-h.right)}}}if(!f.isEmptyObject(k)){if(e.test(i[0].nodeName)){i=f("html,body")}i.animate(k,j.duration).eq(0).queue(function(o){f.isFunction(j.complete)&&j.complete.call(i[0]);o()})}else{f.isFunction(j.complete)&&j.complete.call(i[0])}}return this}});var a={auto:true,scroll:true,visible:false,hidden:false};f.extend(f.expr[":"],{scrollable:function(k,i,n,h){var m=c[typeof(n[3])==="string"&&n[3].toLowerCase()]||c.both;var l=(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(k,null):k.currentStyle);var o={x:a[l.overflowX.toLowerCase()]||false,y:a[l.overflowY.toLowerCase()]||false,isRoot:e.test(k.nodeName)};if(!o.x&&!o.y&&!o.isRoot){return false}var j={height:{scroll:k.scrollHeight,client:k.clientHeight},width:{scroll:k.scrollWidth,client:k.clientWidth},scrollableX:function(){return(o.x||o.isRoot)&&this.width.scroll>this.width.client},scrollableY:function(){return(o.y||o.isRoot)&&this.height.scroll>this.height.client}};return m.y&&j.scrollableY()||m.x&&j.scrollableX()}})})(jQuery);