diff --git a/tempjpw/IndivLend - Copy.html b/tempjpw/IndivLend - Copy.html deleted file mode 100644 index 9fb1a6579..000000000 --- a/tempjpw/IndivLend - Copy.html +++ /dev/null @@ -1,1299 +0,0 @@ - - - - - -Mifos - Individual Lending - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
 
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tempjpw/IndivLendClient.html b/tempjpw/IndivLendClient.html deleted file mode 100644 index ddbdf0e03..000000000 --- a/tempjpw/IndivLendClient.html +++ /dev/null @@ -1,947 +0,0 @@ - - - - - -Mifos - Individual Lending - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
 
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tempjpw/IndivLendHome - Copy.html b/tempjpw/IndivLendHome - Copy.html deleted file mode 100644 index 0c42f4de1..000000000 --- a/tempjpw/IndivLendHome - Copy.html +++ /dev/null @@ -1,1021 +0,0 @@ - - - - - -Mifos - Individual Lending - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
 
-
- -
- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tempjpw/IndivLendHome.html b/tempjpw/IndivLendHome.html deleted file mode 100644 index e6a159f23..000000000 --- a/tempjpw/IndivLendHome.html +++ /dev/null @@ -1,955 +0,0 @@ - - - - - -Mifos - Individual Lending - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
 
-
-
-
-
- - - - - - - - - - - \ No newline at end of file diff --git a/tempjpw/resources/allinone.css b/tempjpw/resources/allinone.css deleted file mode 100644 index 01a585b81..000000000 --- a/tempjpw/resources/allinone.css +++ /dev/null @@ -1,74 +0,0 @@ -/*reset*/ -html{color:#000;background:#FFF;}body{margin:0 auto;font-family:Arial, Helvetica, Sans-Serif; font-size:12px;},div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;} -strong{font-weight: bolder;} -/*General*/ -div#container {margin-top:0px;} -div#content {margin-left:5px; margin-right:5px;} -/*top navigation*/ -#nav, #nav ul {padding:0;margin:0;list-style:none;} -#nav a {display:block;padding:7px 7px 7px 7px;color:#ccc;text-decoration:none;} -#nav a.dmenu {} -#nav a.dmenu:hover {color:#3366CC !important;background-color: #fff !important;} -#navwrapper {background-color: #2D2D2D;height:30px;} -#nav {padding-top:0px;} -#nav li {float: left; } -#nav li {position: relative;} -#nav li {position: static; width: auto;}/* hide from IE, mac */ -#nav li ul {position: absolute;display: none;margin-left:-1px;padding-bottom:10px;background-color: #FFFFFF;border: 1px solid #bbb;border-top:none;-moz-box-shadow: 0 0 5px #ddd;-webkit-box-shadow: 0 0 5px #ddd;box-shadow: 0 0 5px #ddd;z-index:5000;} -#nav li:hover a, #nav a:focus, -#nav a:active {padding:7px 7px 7px 7px;color:#fff;background:#444;text-decoration:none;} -#nav li ul, #nav ul li {width: 10em;} -#nav ul li a {color: #3366CC !important;border-right: 0;} -#nav ul li a:hover {color:#3366CC !important;background-color: #eef3fb !important;border-right: 0;} -#nav a.current {color:#fff;font-weight:bold;background:#2D2D2D;text-decoration:none;border-top:2px solid #C33;padding-bottom:5px;} -#nav a.current:hover{padding-bottom:5px;} -#nav li:hover ul {display: block;} -#nav li:hover ul a{color: #000000;background-color: transparent;} -#nav ul a:hover {background-color: #606060!important;color: #FFFFFF !important;} -.menuseprator{border-bottom:1px solid #ddd; margin:10px 0 10px 0;} -.arrowdown{color#eee; font-size:0.5em;} -.floatleft{float:left;} -.floatright{float:right;} -.clear{clear:both;} -/*end of top navigation css*/ -/*simple vertical form*/ -label {display: block; font-size: 14px; padding-top: 3px;} -#formcontainer input {font-size:12px; padding:4px 2px; border:solid 1px #aacfe4; width: 402px;} -#formcontainer select {font-size:12px; padding:3px 2px; border:solid 1px #aacfe4; width: 402px;} -fieldset {border-top: 1px solid;} -legend {margin-left: 10px; font-size: 14px; font-weight: bold;} -#ignorefornow button {clear:both; margin-left:225px; width:125px; height:31px; - background:#666666 no-repeat; text-align:center; - line-height:31px; color:#FFFFFF; font-size:11px; font-weight:bold;} -#formcontainer {margin:0 auto; width: auto; border:solid 2px #b7ddf2; background:#ebf4fb; padding: 14px;} -a.multiselectwidget {display: block; border: 1px solid #aaa; text-decoration: none; - background-color: #fafafa; color: #123456; clear:both;} -div.multiselectwidget {float:left; text-align: center; margin-right: 10px;} -select.multiselectwidget {width: 450px; height: 80px;} - -/*display of information in label, attribute fashion*/ -.row .shortrowlabel {float: left; width: 6em; text-align: left; margin-right: 0.5em;} -.row .rowlabel {float: left; width: 8em; text-align: left; margin-right: 0.5em;} -.row .longrowlabel {float: left; width: 18em; text-align: left; margin-right: 0.5em;} -.row .rowvalue {text-align: left; display: inline-block;} -/**/ -#toolbar {padding: 9px 5px;} -/*datatables*/ -table.pretty {width:100%;} -table.pretty th, table.pretty td {border: 1px gainsboro solid;padding: 0.2em;} -table.pretty caption {margin-left: inherit;margin-right: inherit;font-style: italic;font-weight: bold;} -table.pretty thead tr th {text-align: center;font-weight: bold;border-bottom: 2px solid;} -table.pretty thead tr th.empty {border: 0px;} -table.pretty tfoot tr th {text-align: center;font-weight: bold;border-bottom: 2px solid;border-top: 2px solid;} -table.pretty tbody tr th {text-align: center;} -table.pretty tbody tr td {text-align: center; border-top: solid 1px;} -table.pretty tbody tr.odd td {background: #EBF4FB;} -table.pretty tbody tr.even td {background: #BCEEEE;} -table.pretty thead tr th.highlightcol {border-top: solid 2px #2E6E9E;border-left: solid 2px #2E6E9E;border-right: solid 2px #2E6E9E; border-bottom: 1px gainsboro solid;} -table.pretty tfoot tr th.highlightcol {border-left: solid 2px #2E6E9E;border-right: solid 2px #2E6E9E;} -table.pretty thead tr th.lefthighlightcol, table.pretty tbody tr td.lefthighlightcol, table.pretty tfoot tr th.lefthighlightcol{border-left: solid 2px #2E6E9E;} -table.pretty thead tr th.righthighlightcol, table.pretty tbody tr td.righthighlightcol, table.pretty tfoot tr th.righthighlightcol {border-right: solid 2px #2E6E9E;} -table.pretty thead tr th.lefthighlightcolheader, table.pretty tbody tr td.lefthighlightcolheader, table.pretty tfoot tr th.lefthighlightcolheader {border-left: solid 2px #2E6E9E;} -table.pretty thead tr th.righthighlightcolheader, table.pretty tbody tr td.righthighlightcolheader, table.pretty tfoot tr th.righthighlightcolheader {border-right: solid 2px #2E6E9E;} - -div.loantabs {margin-top: 5px;} \ No newline at end of file diff --git a/tempjpw/resources/excel/excel-2007-header-bg.gif b/tempjpw/resources/excel/excel-2007-header-bg.gif deleted file mode 100644 index cdecbe1eb..000000000 Binary files a/tempjpw/resources/excel/excel-2007-header-bg.gif and /dev/null differ diff --git a/tempjpw/resources/excel/excel-2007-header-left.gif b/tempjpw/resources/excel/excel-2007-header-left.gif deleted file mode 100644 index 5e29ab7e6..000000000 Binary files a/tempjpw/resources/excel/excel-2007-header-left.gif and /dev/null differ diff --git a/tempjpw/resources/excel/excel-2007.css b/tempjpw/resources/excel/excel-2007.css deleted file mode 100644 index 362069ed9..000000000 --- a/tempjpw/resources/excel/excel-2007.css +++ /dev/null @@ -1,45 +0,0 @@ -.ExcelTable2007 { - border: 1px solid #B0CBEF; - border-width: 1px 0px 0px 1px; - font-size: 11pt; - font-family: Calibri; - font-weight: 100; - border-spacing: 0px; - border-collapse: collapse; -} - -.ExcelTable2007 TH { - background-image: url(excel-2007-header-bg.gif); - background-repeat: repeat-x; - font-weight: normal; - font-size: 14px; - border: 1px solid #9EB6CE; - border-width: 0px 1px 1px 0px; - height: 17px; -} - -.ExcelTable2007 TD { - border: 0px; - background-color: white; - padding: 0px 4px 0px 2px; - border: 1px solid #D0D7E5; - border-width: 0px 1px 1px 0px; -} - -.ExcelTable2007 TD B { - border: 0px; - background-color: white; - font-weight: bold; -} - -.ExcelTable2007 TD.heading { - background-color: #E4ECF7; - text-align: center; - border: 1px solid #9EB6CE; - border-width: 0px 1px 1px 0px; -} - -.ExcelTable2007 TH.heading { - background-image: url(excel-2007-header-left.gif); - background-repeat: none; -} diff --git a/tempjpw/resources/favicon.ico b/tempjpw/resources/favicon.ico deleted file mode 100644 index ec2bd72e6..000000000 Binary files a/tempjpw/resources/favicon.ico and /dev/null differ diff --git a/tempjpw/resources/formTempates.txt b/tempjpw/resources/formTempates.txt deleted file mode 100644 index b38b73b1a..000000000 --- a/tempjpw/resources/formTempates.txt +++ /dev/null @@ -1,831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tempjpw/resources/global-translations/messages.properties b/tempjpw/resources/global-translations/messages.properties deleted file mode 100644 index 36ebd25f0..000000000 --- a/tempjpw/resources/global-translations/messages.properties +++ /dev/null @@ -1,368 +0,0 @@ -# jQuery.1ln8 plugin seems to give first line of properties file as error for some reason. -app.name=Mifos - Individual Lending: - -link.topnav.clients=Clients -link.topnav.users=User Administration -link.topnav.organisation=Organisation Administration -link.reports=Reports -link.signout=Sign out -link.topnav.account.settings=Account Settings -link.topnav.theme=Theme -link.topnav.culture=Culture - -page.home.title=Home -tab.search=Search -label.client.search=Choose client: -option.client.search.first.choice=--Select Client-- -link.add.new.client=Add a new client - -page.client.account.title=View Client Account Detailscon -page.admin.home.title=Administration Home -page.admin.settings.title=Account Settings - -dialog.title.add.client=Add client -label.office=Office: -option.office.first.choice=--Select Office-- -label.lastname=Last name: -label.firstname=First name: -label.longname=Client or Business name: -label.joiningdate=Joining date: - -error.msg.header=You have the following errors: -validation.msg.client.officeId.cannot.be.blank=A client must be associated with an office. -validation.msg.client.firstname.cannot.be.blank=First name cannot be blank. -validation.msg.client.lastname.cannot.be.blank=Last name cannot be blank. -validation.msg.client.joiningDate.cannot.be.blank=Joining date cannot be blank. -validation.msg.client.firstname.cannot.also.be.provided.when.clientOrBusinessName.is.populated=You cannot provide both fullname and firstname or lastname details. A fullname must be provided or else both firstname and lastname details. -validation.msg.client.lastname.cannot.also.be.provided.when.clientOrBusinessName.is.populated=You cannot provide both fullname and firstname or lastname details. A fullname must be provided or else both firstname and lastname details. - -error.msg.client.id.invalid=Client does not exist. -error.msg.office.id.invalid=Office does not exist. -error.msg.office.duplicate.externalId=An office with 'External Id' already exists. -error.msg.office.duplicate.name=An office with 'name' already exists. -error.msg.office.unknown.data.integrity.issue=An unknown data integrity issue occured. - -dialog.title.confirmation.required=Confirmation required -text.confirmation.required=Are you sure? -dialog.title.functionality.not.available=Functionality not yet available -dialog.messages.functionality.not.available=Functionality not yet available. - -dialog.button.submit=Submit -dialog.button.save=Save -dialog.button.cancel=Cancel -dialog.button.ok=Ok -dialog.button.confirm=Confirm -link.edit=Edit -widget.multiselect.button.add=Add -widget.multiselect.button.remove=Remove - -dialog.title.new.loan.application=New loan application -dialog.button.new.loan.application=New loan application -dialog.button.reject.loan=Reject -dialog.button.withdrawn.by.client.loan=Withdrawn by applicant -dialog.button.approve.loan=Approve -dialog.button.delete.loan=Delete -dialog.button.undo.loan.approval=Undo approval -dialog.button.undo.loan.disbursal=Undo disbursal -dialog.button.disburse.loan=Disburse -dialog.button.loan.repayment=Loan repayment -dialog.button.adjust.loan.repayment=Adjust -dialog.button.loan.waive=Waive - -dialog.button.add.note=Add note -label.client.account.name=Name: -label.client.account.branch=Branch: -label.client.account.joinedon=Joined on: -heading.client.account.account.overview=Account Overview -label.client.account.pending.approval.loans=Pending approval loans -label.client.account.pending.disbursal.loans=Awaiting disbursal loans -label.client.account.active.loans=Active loans -label.client.account.closed.loans=Closed loans -label.client.account.no.loans.exist=No accounts exist -heading.client.account.extra.information=Additional Information -dialog.title.edit.additional.client.information=Edit additional client information - -widget.notes.heading=You have the following notes: -widget.notes.label.client.note=Client note: -widget.notes.label.loan.note=Loan note: -widget.notes.label.loan.transaction.note=Loan transaction note: - -dialog.title.add.note=Add note -dialog.title.edit.note=Edit note -dialog.notes.form.label.note=Note: - -# error handling messages for loan event and transactions screens -error.msg.no.loan.with.identifier.exists=No loan with identifier {0} exists. -error.msg.no.permission=You do not have sufficient permissions to perform this action. -error.msg.no.permission.to.approve.loan.in.past=You do not have permission to approve a loan with a date in the past. -error.msg.no.permission.to.reject.loan.in.past=You do not have permission to reject a loan with a date in the past. -error.msg.no.permission.to.withdraw.loan.in.past=You do not have permission to withdraw a loan with a date in the past. -error.msg.no.permission.to.disburse.loan.in.past=You do not have permission to disburse a loan with a date in the past. -error.msg.no.permission.to.make.repayment.on.loan.in.past=You do not have permission to make a repayment on the loan with a date in the past. -error.msg.cannot.delete.loan.in.its.present.state=You cannot delete the loan in its current state. It must be pending approval. - -validation.msg.invalid.date.format=Invalid date format. -validation.msg.invalid.number.format=Invalid number format. -validation.msg.loan.id.is.invalid=Loan identifier is invalid. -validation.msg.loan.transaction.id.is.invalid=Loan transaction identifier is invalid. - -validation.msg.loan.state.transition.date.cannot.be.blank=A date must be provided when transitioning the loan into this state. -validation.msg.note.exceeds.max.length=The content of the note exceeds max length of 1000 characters. - -# loan event and transactions screens -label.loan.on=On: -label.loan.action.note=Note: -dialog.title.reject.loan=Reject loan -dialog.title.loan.withdrawn.by.client=Withdrawn by client -dialog.title.approve.loan=Approve loan -dialog.title.undo.loan.approval=Undo loan approval: confirmation required -dialog.title.disburse.loan=Disburse loan -dialog.title.undo.loan.disbursal=Undo loan disbursal: confirmation required -dialog.title.loan.repayment=Loan repayment -dialog.title.adjust.loan.repayment=Adjust loan repayment -dialog.title.waive.loan=Waive outstanding amount -label.loan.transaction.on=Repayment on: -label.loan.transaction.amount=Amount: - -tab.client.account.loan.details=Details -tab.client.account.loan.schedule=Schedule -tab.client.account.loan.repayments=Repayments - -tab.client.account.loan.schedule.table.summary.caption=Summary -tab.client.account.loan.schedule.table.repaymentschedule.caption=Repayment Schedule -tab.client.account.loan.schedule.table.repayments.caption=Repayment Activity - -tab.client.account.loan.schedule.table.summary.heading.original=Original Loan -tab.client.account.loan.schedule.table.summary.heading.paid=Paid -tab.client.account.loan.schedule.table.summary.heading.waived=Waived -tab.client.account.loan.schedule.table.heading.outstanding=Outstanding -tab.client.account.loan.schedule.table.column.heading.expected=Expected -tab.client.account.loan.schedule.table.column.heading.paid=Paid -tab.client.account.loan.schedule.table.column.heading.principal=Principal -tab.client.account.loan.schedule.table.column.heading.interest=Interest -tab.client.account.loan.schedule.table.column.heading.total=Total - -tab.client.account.loan.schedule.table.column.heading.date=Date -tab.client.account.loan.schedule.table.column.heading.paymentdate=Payment Date -tab.client.account.loan.schedule.table.column.heading.amountpaid=Amount Paid -tab.client.account.loan.schedule.table.column.heading.principal.portion=Principal Portion -tab.client.account.loan.schedule.table.column.heading.interest.portion=Interest Portion -tab.client.account.loan.schedule.table.column.heading.action=Action - -# client account screen -label.client.account.loan.status=Status: -label.client.account.loan.status.since=since -label.client.account.loan.status.arrears=In arrears by: -label.client.account.loan.submitted.on=Sumbitted on: -label.client.account.loan.approved.on=Approved on: -label.client.account.loan.expected.disbursement.on=Expected dibursement on: -label.client.account.loan.disbursed.on=Disbursed on: -label.client.account.loan.first.repayment.due.on=First repayment due on: -label.client.account.loan.interest.charged.from=Interest charged from: -label.client.account.loan.expected.maturity.on=Expected to mature on: -label.client.account.loan.closed.on=Closed on: -label.client.account.loan.term=Expected loan term: -label.client.account.loan.actual.term=Actual loan term: -label.months=Months -label.days=Days -label.client.account.loan.product=Product: -label.client.account.loan.externalid=External id: -label.client.account.loan.currency=Currency: -label.client.account.loan.principal=Principal: -label.client.account.loan.repayments=Repayments: -label.client.account.loan.amortization=Amortization: -label.client.account.loan.interest=Interest: - -# organisation administration screens -administration.link.view.products=View Products -administration.link.add.product=Add Product -administration.link.view.offices=View Offices -administration.link.add.office=Add Office -administration.link.currency.configuration=Currency Configuration - -administration.link.view.users=View Users -administration.link.add.user=Add User -administration.link.view.roles=View Roles -administration.link.add.role=Add Role -administration.link.view.permissions=View Permissions - -table.heading.product.name=Product Name -table.heading.product.created=Created -table.heading.product.modified=Last Modified -table.heading.product.active=Active - -link.action.product.deactivate=Deactivate -link.action.product.viewedit=View/Edit -link.action.product.delete=Delete - -dialog.title.add.loan.product=Add loan product -dialog.title.product.details=Loan product details - -form.label.loan.applicant=Applicant: -form.label.loan.submitted.on=Submitted on: -form.label.loan.submitted.on.note=Loan submittal note: -form.label.loan.annual.nominal.interestrate=Annual nominal rate %: -form.label.loan.interest.charged.from=Interest charged from: -form.label.loan.expected.disbursement.date.on=Expected disbursement on: -form.label.loan.first.repayment.on=First repayment on: - -validation.msg.loan.digitsAfterDecimal.cannot.be.blank=You must enter a number to represent number of digits after decimal to be supported for product. -validation.msg.loan.digitsAfterDecimal.is.not.within.expected.range=Decimal places must be a number between {1} and {2} inclusive. -validation.msg.loan.repaymentEvery.cannot.be.blank=Repaid every cannot be blank. -validation.msg.loan.repaymentEvery.not.greater.than.zero=Repaid every must be greater than 0. -validation.msg.loan.numberOfRepayments.cannot.be.blank=# of repayments cannot be blank. -validation.msg.loan.numberOfRepayments.not.greater.than.zero=# of repayments must be greater than 0. -validation.msg.loan.principal.cannot.be.blank=Loan amount cannot be blank. -validation.msg.loan.inArrearsTolerance.cannot.be.blank=Arrears tolerance cannot be blank. -validation.msg.loan.interestRatePerPeriod.cannot.be.blank=Nominal interest rate % cannot be blank. -validation.msg.loan.principal.not.greater.than.zero=Loan amount must be greater than zero. -validation.msg.loan.inArrearsTolerance.not.zero.or.greater=Arrears tolerance must be greater than or equal to zero. -validation.msg.loan.interest.rate.per.period.amount.cannot.be.negative=Nominal interest rate % cannot be negative. -validation.msg.loan.repayment.date.cannot.be.blank=The repayment date cannot be blank. -validation.msg.loan.repayment.must.be.greater.than.zero=The repayment amount must be a number greater than zero. -validation.msg.loan.adjustment.must.be.zero.or.greater=The repayment amount must be a number greater than or equal to zero. - -validation.msg.loan.expectedDisbursementDate.cannot.be.blank=Expected disbursement on field cannot be blank. -validation.msg.loan.expectedDisbursementDate.cannot.be.after.first.repayment.date=Expected disbursement date cannot be after the first repayment date. -validation.msg.loan.interestCalculatedFromDate.must.be.entered.when.using.repayments.startfrom.field=The date interest is to be calculated from cannot be left blank when a date is provided for when repayments start from. -validation.msg.loan.submitted.on.date.cannot.be.blank=Submitted on date cannot be blank. -validation.msg.loan.submitted.on.date.cannot.be.after.expectedDisbursementDate=Submitted on date cannot be after the expected disbursement date. - -form.legend.loan.information=Loan Information -form.legend.loan.product.information=Loan Product Information -form.label.product.dropdown=Product: -form.option.product.dropdown.first.choice=--Select Product-- -form.label.loan.product.name=Name: -form.label.loan.product.description=Description: -form.legend.loan.product.currency=Currency -form.label.loan.product.currency=Currency: -form.label.loan.product.decimalplaces=Decimal places: -form.legend.loan.product.loan.terms=Loan Terms -form.label.loan.product.loan.amount=Loan amount: -form.label.loan.product.repaidevery=Repaid every: -form.label.loan.product.numberof.repayments=# of repayments: -form.label.loan.product.amortization=Amortization: -form.label.loan.product.arrears.tolerance=Arrears tolerance: -form.label.loan.product.nominal.interestrate=Nominal interest rate %: -form.label.loan.product.interest.method=Interest method: -form.label.loan.product.interest.rate.calcutated.in.period=Interest calculation period: - -validation.msg.product.name.cannot.be.blank=Product name cannot be blank. -validation.msg.product.description.exceeds.max.length=The content of the description has exceeded max allowed length of 500 characters. -validation.msg.product.digitsAfterDecimal.cannot.be.blank=You must enter a number to represent number of digits after decimal to be supported for product. -validation.msg.product.digitsAfterDecimal.is.not.within.expected.range=Decimal places must be a number between {1} and {2} inclusive. - -validation.msg.product.repaymentEvery.cannot.be.blank=Repaid every cannot be blank. -validation.msg.product.repaymentEvery.not.greater.than.zero=Repaid every must be greater than 0. -validation.msg.product.numberOfRepayments.cannot.be.blank=# of repayments cannot be blank. -validation.msg.product.numberOfRepayments.not.greater.than.zero=# of repayments must be greater than 0. - -validation.msg.product.principal.cannot.be.blank=Loan amount cannot be blank. -validation.msg.product.inArrearsTolerance.cannot.be.blank=Arrears tolerance cannot be blank. -validation.msg.product.interestRatePerPeriod.cannot.be.blank=Nominal interest rate % cannot be blank. - -validation.msg.product.principal.not.greater.than.zero=Loan amount must be greater than zero. -validation.msg.product.inArrearsTolerance.not.zero.or.greater=Arrears tolerance must be greater than or equal to zero. -validation.msg.product.interest.rate.per.period.amount.cannot.be.negative=Nominal interest rate % cannot be negative. - -table.heading.office.name=Office Name -table.heading.office.externalid=External Id -table.heading.office.openedon=Opened on -table.heading.office.parent=Parent Office - -dialog.title.add.office=Add office -dialog.title.office.details=Office details - -form.legend.office.details=Office details -form.label.office.name=Name: -form.label.office.parent=Parent office: -form.label.office.openedon=Opened on: -form.label.office.externalid=External id: - -validation.msg.office.name.cannot.be.blank=Office name cannot be blank. -validation.msg.office.parentId.cannot.be.blank=You must select a parent office. -validation.msg.office.parentId.not.greater.than.zero=You must select a parent office. -validation.msg.office.openingDateFormatted.cannot.be.blank=You must choose a date to represent when the office commenced services. -validation.msg.office.externalId.exceeds.max.length=External id exceeds max length of {0} alpha-numeric characters - {1}. - -dialog.title.configuration.currencies=Currency Configuration -form.label.configuration.available.currencies=Available currencies: -form.label.configuration.allowed.currencies=Allowed currencies: - -validation.msg.configuration.currencies.cannot.be.empty=You must select at least one currency that is 'allowed' for your organisation. - -# user account settings and admin screens -tab.settings=Settings -dialog.title.update.password=Update password -dialog.title.update.details=Update details - -form.label.new.password=New password: -form.label.repeat.new.password=Repeat new password: - -form.label.username=Username: -form.label.firstname=First name: -form.label.lastname=Last name: -form.label.email=Email: - -form.label.heading.office=Office: -form.label.office=Office: - -form.label.heading.details=Details: -form.label.name=Name: -form.label.username=Username: -form.label.email=Email: -form.link.changedetails=Change details - -form.label.heading.security=Security: -form.label.password=Password: -form.link.changepassword=Change password - -form.label.heading.roles=Roles: - -error.msg.username.already.exists.in.organisation=An account with that username already exists. - -validation.msg.user.username.cannot.be.blank=Username cannot be blank. -validation.msg.username.already.exists.in.organisation=An account with that username already exists. -validation.msg.user.firstname.cannot.be.blank=Firstname cannot be blank. -validation.msg.user.lastname.cannot.be.blank=Lastname cannot be blank. -validation.msg.user.email.cannot.be.blank=Email cannot be blank. -validation.msg.user.officeId.cannot.be.blank=You must select an office. -validation.msg.user.officeId.not.greater.than.zero=You must select an office. -validation.msg.user.roles.cannot.be.empty=A user must have at least one role. -validation.msg.changepassword.password.cannot.be.blank=Password cannot be blank. -validation.msg.changepassword.passwordrepeat.cannot.be.blank=Repeated password cannot be blank. -validation.msg.changepassword.passwordrepeat.not.the.same=Password and Repeat password are not the same. - -dialog.title.add.user=Add user -dialog.title.add.role=Add role -dialog.title.edit.details=Edit details - -form.legend.role.details=Role Details -form.label.role.name=Name: -form.label.role.description=Description: -form.label.role.available.permissions=Available permissions: -form.label.role.selected.permissions=Selected permissions: - -form.legend.user.details=User Details -form.label.user.username=Username: -form.label.user.firstname=First name: -form.label.user.lastname=Last name: -form.label.user.email=Email: -form.label.user.office=Office: -form.label.user.available.roles=Available roles: -form.label.user.selected.roles=Selected roles: - -validation.msg.role.name.cannot.be.blank=Name cannot be blank. -validation.msg.role.description.cannot.be.blank=Description cannot be blank. -validation.msg.role.description.exceeds.max.length=The content of the description exceeds max allowed length of 500 characters. -validation.msg.role.permissions.cannot.be.empty=A role must have at least one permission associated with it. - -table.heading.officename=Office Name -table.heading.username=Username -table.heading.name=Name -table.heading.email=Email -table.heading.rolename=Role Name -table.heading.description=Description -table.heading.permission.type=Type -table.heading.permission.permission=Permission -table.heading.permission.description=Description \ No newline at end of file diff --git a/tempjpw/resources/global-translations/messages_fr.properties b/tempjpw/resources/global-translations/messages_fr.properties deleted file mode 100644 index 512c56c70..000000000 --- a/tempjpw/resources/global-translations/messages_fr.properties +++ /dev/null @@ -1,355 +0,0 @@ -app.name=Mifos - Individual Lending (fr): - -link.topnav.clients=Clients(fr) -link.topnav.users=User Administration(fr) -link.topnav.organisation=Organisation Administration(fr) -link.reports=Reports(fr) -link.signout=Sign out(fr) -link.topnav.account.settings=Account Settings(fr) -link.topnav.theme=Theme(fr) -link.topnav.culture=Culture(fr) - -page.home.title=Home(fr) -tab.search=Search(fr) -label.client.search=Choose client:(fr): -option.client.search.first.choice=--Select Client--(fr) -link.add.new.client=Add a new client(fr) - -page.client.account.title=View Client Account Details(fr) -page.admin.home.title=Administration Home(fr) -page.admin.settings.title=Account Settings(fr) - -dialog.title.add.client=Add client(fr) -label.office=Office(fr): -option.office.first.choice=--Select Office--(fr) -label.lastname=Last name(fr): -label.firstname=First name(fr): -label.longname=Full name:(fr) -label.joiningdate=Joining date(fr): - -error.msg.header=You have the following errors:(fr) -validation.msg.client.officeId.cannot.be.blank=A client must be associated with an office.(fr) -validation.msg.client.firstname.cannot.be.blank=First name cannot be blank.(fr) -validation.msg.client.lastname.cannot.be.blank=Last name cannot be blank.(fr) -validation.msg.client.joiningDate.cannot.be.blank=Joining date cannot be blank.(fr) -validation.msg.client.firstname.cannot.also.be.provided.when.clientOrBusinessName.is.populated=You cannot provide both fullname and firstname or lastname details. A fullname must be provided or else both firstname and lastname details.(fr) -validation.msg.client.lastname.cannot.also.be.provided.when.clientOrBusinessName.is.populated=You cannot provide both fullname and firstname or lastname details. A fullname must be provided or else both firstname and lastname details.(fr) - -error.msg.client.id.invalid=Client does not exist.(fr) -error.msg.office.id.invalid=Office does not exist.(fr) -error.msg.office.duplicate.externalId=An office with 'External Id' already exists.(fr) -error.msg.office.duplicate.name=An office with 'name' already exists.(fr) -error.msg.office.unknown.data.integrity.issue=An unknown data integrity issue occured.(fr) - -dialog.title.confirmation.required=Confirmation required(fr) -text.confirmation.required=Are you sure?(fr) -dialog.title.functionality.not.available=Functionality not yet available(fr) -dialog.messages.functionality.not.available=Functionality not yet available.(fr) - -dialog.button.submit=Submit(fr) -dialog.button.save=Save(fr) -dialog.button.cancel=Cancel(fr) -dialog.button.ok=Ok(fr) -dialog.button.confirm=Confirm(fr) -link.edit=Edit(fr) -widget.multiselect.button.add=Add(fr) -widget.multiselect.button.remove=Remove(fr) - -dialog.title.new.loan.application=New loan application(fr) -dialog.button.new.loan.application=New loan application(fr) -dialog.button.reject.loan=Reject(fr) -dialog.button.withdrawn.by.client.loan=Withdrawn by applicant(fr) -dialog.button.approve.loan=Approve(fr) -dialog.button.delete.loan=Delete(fr) -dialog.button.undo.loan.approval=Undo approval(fr) -dialog.button.undo.loan.disbursal=Undo disbursal(fr) -dialog.button.disburse.loan=Disburse(fr) -dialog.button.loan.repayment=Loan repayment(fr) -dialog.button.adjust.loan.repayment=Adjust(fr) -dialog.button.loan.waive=Waive(fr) - -dialog.button.add.note=Add note(fr) -label.client.account.name=Name:(fr) -label.client.account.branch=Branch:(fr) -label.client.account.joinedon=Joined on:(fr) -heading.client.account.account.overview=Account Overview(fr) -label.client.account.pending.approval.loans=Pending approval loans(fr) -label.client.account.pending.disbursal.loans=Awaiting disbursal loans(fr) -label.client.account.active.loans=Active loans(fr) -label.client.account.closed.loans=Closed loans(fr) -label.client.account.no.loans.exist=No accounts exist(fr) -heading.client.account.extra.information=Additional Information(fr) -dialog.title.edit.additional.client.information=Edit additional client information(fr) - -widget.notes.heading=You have the following notes:(fr) -widget.notes.label.client.note=Client note:(fr) -widget.notes.label.loan.note=Loan note:(fr) -widget.notes.label.loan.transaction.note=Loan transaction note:(fr) - -dialog.title.add.note=Add note(fr) -dialog.title.edit.note=Edit note(fr) -dialog.notes.form.label.note=Note:(fr) - -# error handling messages for loan event and transactions screens -error.msg.no.loan.with.identifier.exists=No loan with identifier {0} exists.(fr) -error.msg.no.permission=You do not have sufficient permissions to perform this action.(fr) -error.msg.no.permission.to.approve.loan.in.past=You do not have permission to approve a loan with a date in the past.(fr) -error.msg.no.permission.to.reject.loan.in.past=You do not have permission to reject a loan with a date in the past.(fr) -error.msg.no.permission.to.withdraw.loan.in.past=You do not have permission to withdraw a loan with a date in the past.(fr) -error.msg.no.permission.to.disburse.loan.in.past=You do not have permission to disburse a loan with a date in the past.(fr) -error.msg.no.permission.to.make.repayment.on.loan.in.past=You do not have permission to make a repayment on the loan with a date in the past.(fr) -error.msg.cannot.delete.loan.in.its.present.state=You cannot delete the loan in its current state. It must be pending approval.(fr) - -validation.msg.invalid.date.format=Invalid date format.(fr) -validation.msg.invalid.number.format=Invalid number format.(fr) -validation.msg.loan.id.is.invalid=Loan identifier is invalid.(fr) -validation.msg.loan.transaction.id.is.invalid=Loan transaction identifier is invalid.(fr) - -validation.msg.loan.state.transition.date.cannot.be.blank=A date must be provided when transitioning the loan into this state.(fr) -validation.msg.note.exceeds.max.length=The content of the note exceeds max length of 1000 characters.(fr) - -validation.msg.loan.repayment.date.cannot.be.blank=The repayment date cannot be blank.(fr) -validation.msg.loan.repayment.must.be.greater.than.zero=The repayment amount must be a number greater than zero.(fr) -validation.msg.loan.adjustment.must.be.zero.or.greater=The repayment amount must be a number greater than or equal to zero.(fr) - -# loan event and transactions screens -label.loan.on=On:(fr) -label.loan.action.note=Note:(fr) -dialog.title.reject.loan=Reject loan(fr) -dialog.title.loan.withdrawn.by.client=Withdrawn by client(fr) -dialog.title.approve.loan=Approve loan(fr) -dialog.title.undo.loan.approval=Undo loan approval: confirmation required(fr) -dialog.title.disburse.loan=Disburse loan(fr) -dialog.title.undo.loan.disbursal=Undo loan disbursal: confirmation required(fr) -dialog.title.loan.repayment=Loan repayment(fr) -dialog.title.adjust.loan.repayment=Adjust loan repayment(fr) -dialog.title.waive.loan=Waive outstanding amount(fr) -label.loan.transaction.on=Repayment on:(fr) -label.loan.transaction.amount=Amount:(fr) - -tab.client.account.loan.details=Details(fr) -tab.client.account.loan.schedule=Schedule(fr) -tab.client.account.loan.repayments=Repayments(fr) - -tab.client.account.loan.schedule.table.summary.caption=Summary(fr) -tab.client.account.loan.schedule.table.repaymentschedule.caption=Repayment Schedule(fr) -tab.client.account.loan.schedule.table.repayments.caption=Repayment Activity(fr) - -tab.client.account.loan.schedule.table.summary.heading.original=Original Loan(fr) -tab.client.account.loan.schedule.table.summary.heading.paid=Paid(fr) -tab.client.account.loan.schedule.table.summary.heading.waived=Waived(fr) -tab.client.account.loan.schedule.table.heading.outstanding=Outstanding(fr) -tab.client.account.loan.schedule.table.column.heading.expected=Expected(fr) -tab.client.account.loan.schedule.table.column.heading.paid=Paid(fr) -tab.client.account.loan.schedule.table.column.heading.principal=Principal(fr) -tab.client.account.loan.schedule.table.column.heading.interest=Interest(fr) -tab.client.account.loan.schedule.table.column.heading.total=Total(fr) - -tab.client.account.loan.schedule.table.column.heading.date=Date(fr) -tab.client.account.loan.schedule.table.column.heading.paymentdate=Payment Date(fr) -tab.client.account.loan.schedule.table.column.heading.amountpaid=Amount Paid(fr) -tab.client.account.loan.schedule.table.column.heading.principal.portion=Principal Portion(fr) -tab.client.account.loan.schedule.table.column.heading.interest.portion=Interest Portion(fr) -tab.client.account.loan.schedule.table.column.heading.action=Action(fr) - -# client account screen -label.client.account.loan.status=Status:(fr) -label.client.account.loan.status.since=since(fr) -label.client.account.loan.status.arrears=In arrears by:(fr) -label.client.account.loan.submitted.on=Sumbitted on:(fr) -label.client.account.loan.approved.on=Approved on:(fr) -label.client.account.loan.expected.disbursement.on=Expected dibursement on:(fr) -label.client.account.loan.disbursed.on=Disbursed on:(fr) -label.client.account.loan.first.repayment.due.on=First repayment due on:(fr) -label.client.account.loan.interest.charged.from=Interest charged from:(fr) -label.client.account.loan.expected.maturity.on=Expected to mature on:(fr) -label.client.account.loan.closed.on=Closed on:(fr) -label.client.account.loan.term=Expected loan term:(fr) -label.client.account.loan.actual.term=Actual loan term:(fr) -label.months=Months(fr) -label.days=Days(fr) -label.client.account.loan.product=Product:(fr) -label.client.account.loan.externalid=External id:(fr) -label.client.account.loan.currency=Currency:(fr) -label.client.account.loan.principal=Principal:(fr) -label.client.account.loan.repayments=Repayments:(fr) -label.client.account.loan.amortization=Amortization:(fr) -label.client.account.loan.interest=Interest:(fr) - -# organisation administration screens -administration.link.view.products=View Products(fr) -administration.link.add.product=Add Product(fr) -administration.link.view.offices=View Offices(fr) -administration.link.add.office=Add Office(fr) -administration.link.currency.configuration=Currency Configuration(fr) - -administration.link.view.users=View Users(fr) -administration.link.add.user=Add User(fr) -administration.link.view.roles=View Roles(fr) -administration.link.add.role=Add Role(fr) -administration.link.view.permissions=View Permissions(fr) - -table.heading.product.name=Product Name(fr) -table.heading.product.created=Created(fr) -table.heading.product.modified=Last Modified(fr) -table.heading.product.active=Active(fr) - -link.action.product.deactivate=Deactivate(fr) -link.action.product.viewedit=View/Edit(fr) -link.action.product.delete=Delete(fr) - -dialog.title.add.loan.product=Add loan product(fr) -dialog.title.product.details=Loan product details(fr) - -form.label.loan.applicant=Applicant:(fr) -form.label.loan.submitted.on=Submitted on:(fr) -form.label.loan.submitted.on.note=Loan submittal note:(fr) -form.label.loan.annual.nominal.interestrate=Annual nominal rate %:(fr) -form.label.loan.interest.charged.from=Interest charged from:(fr) -form.label.loan.expected.disbursement.date.on=Expected disbursement on:(fr) -form.label.loan.first.repayment.on=First repayment on:(fr) - -validation.msg.loan.expectedDisbursementDate.method.cannot.be.blank=Expected disbursement on field cannot be blank.(fr) -validation.msg.loan.expectedDisbursementDate.cannot.be.after.first.repayment.date=Expected disbursement date cannot be after the first repayment date.(fr) -validation.msg.loan.interestCalculatedFromDate.must.be.entered.when.using.repayments.startfrom.field=The date interest is to be calculated from cannot be left blank when a date is provided for when repayments start from.(fr) -validation.msg.loan.submitted.on.date.cannot.be.blank=Submitted on date cannot be blank.(fr) -validation.msg.loan.submitted.on.date.cannot.be.after.expectedDisbursementDate=Submitted on date cannot be after the expected disbursement date.(fr) - -form.legend.loan.information=Loan Information(fr) -form.legend.loan.product.information=Loan Product Information(fr) -form.label.product.dropdown=Product:(fr) -form.option.product.dropdown.first.choice=--Select Product--(fr) -form.label.loan.product.name=Name:(fr) -form.label.loan.product.description=Description:(fr) -form.legend.loan.product.currency=Currency(fr) -form.label.loan.product.currency=Currency:(fr) -form.label.loan.product.decimalplaces=Decimal places:(fr) -form.legend.loan.product.loan.terms=Loan Terms(fr) -form.label.loan.product.loan.amount=Loan amount:(fr) -form.label.loan.product.repaidevery=Repaid every:(fr) -form.label.loan.product.numberof.repayments=# of repayments:(fr) -form.label.loan.product.amortization=Amortization:(fr) -form.label.loan.product.arrears.tolerance=Arrears tolerance:(fr) -form.label.loan.product.nominal.interestrate=Nominal interest rate %:(fr) -form.label.loan.product.interest.method=Interest method:(fr) -form.label.loan.product.interest.rate.calcutated.in.period=Interest calculation period:(fr) - - -validation.msg.product.name.cannot.be.blank=Product name cannot be blank.(fr) -validation.msg.product.description.exceeds.max.length=The content of the description has exceeded max allowed length of 500 characters.(fr) -validation.msg.product.digitsAfterDecimal.cannot.be.blank=You must enter a number to represent number of digits after decimal to be supported for product.(fr) -validation.msg.product.digitsAfterDecimal.is.not.within.expected.range=Decimal places must be a number between {1} and {2} inclusive.(fr) - -validation.msg.product.repaymentEvery.cannot.be.blank=Repaid every cannot be blank.(fr) -validation.msg.product.repaymentEvery.not.greater.than.zero=Repaid every must be greater than 0.(fr) -validation.msg.product.numberOfRepayments.cannot.be.blank=# of repayments cannot be blank.(fr) -validation.msg.product.numberOfRepayments.not.greater.than.zero=# of repayments must be greater than 0.(fr) - -validation.msg.product.principal.cannot.be.blank=Loan amount cannot be blank.(fr) -validation.msg.product.inArrearsTolerance.cannot.be.blank=Arrears tolerance cannot be blank.(fr) -validation.msg.product.interestRatePerPeriod.cannot.be.blank=Nominal interest rate % cannot be blank.(fr) - -validation.msg.product.principal.not.greater.than.zero=Loan amount must be greater than zero.(fr) -validation.msg.product.inArrearsTolerance.not.zero.or.greater=Arrears tolerance must be greater than or equal to zero.(fr) -validation.msg.product.interest.rate.per.period.amount.cannot.be.negative=Nominal interest rate % cannot be negative.(fr) - -table.heading.office.name=Office Name(fr) -table.heading.office.externalid=External Id(fr) -table.heading.office.openedon=Opened on(fr) -table.heading.office.parent=Parent Office(fr) - -dialog.title.add.office=Add office(fr) -dialog.title.office.details=Office details(fr) - -form.legend.office.details=Office details(fr) -form.label.office.name=Name:(fr) -form.label.office.parent=Parent office:(fr) -form.label.office.openedon=Opened on:(fr) -form.label.office.externalid=External id:(fr) - -validation.msg.office.name.cannot.be.blank=Office name cannot be blank.(fr) -validation.msg.office.parentId.cannot.be.blank=You must select a parent office.(fr) -validation.msg.office.parentId.not.greater.than.zero=You must select a parent office.(fr) -validation.msg.office.openingDateFormatted.cannot.be.blank=You must choose a date to represent when the office commenced services.(fr) -validation.msg.office.externalId.exceeds.max.length=External id exceeds max length of {0} alpha-numeric characters - {1}.(fr) - -form.label.configuration.available.currencies=Available currencies:(fr) -form.label.configuration.allowed.currencies=Allowed currencies:(fr) - -validation.msg.configuration.currencies.cannot.be.empty=You must select at least one currency that is 'allowed' for your organisation.(fr) - -# user account settings and admin screens -tab.settings=Settings(fr) -dialog.title.update.password=Update password(fr) -dialog.title.update.details=Update details(fr) - -form.label.new.password=New password:(fr) -form.label.repeat.new.password=Repeat new password:(fr) - -form.label.username=Username:(fr) -form.label.firstname=First name:(fr) -form.label.lastname=Last name:(fr) -form.label.email=Email:(fr) - -form.label.heading.office=Office:(fr) -form.label.office=Office:(fr) - -form.label.heading.details=Details:(fr) -form.label.name=Name:(fr) -form.label.username=Username:(fr) -form.label.email=Email:(fr) -form.link.changedetails=Change details(fr) - -form.label.heading.security=Security:(fr) -form.label.password=Password:(fr) -form.link.changepassword=Change password(fr) - -form.label.heading.roles=Roles:(fr) - -error.msg.username.already.exists.in.organisation=An account with that username already exists.(fr) - -validation.msg.user.username.cannot.be.blank=Username cannot be blank.(fr) -validation.msg.username.already.exists.in.organisation=An account with that username already exists.(fr) -validation.msg.user.firstname.cannot.be.blank=Firstname cannot be blank.(fr) -validation.msg.user.lastname.cannot.be.blank=Lastname cannot be blank.(fr) -validation.msg.user.email.cannot.be.blank=Email cannot be blank.(fr) -validation.msg.user.officeId.cannot.be.blank=You must select an office.(fr) -validation.msg.user.officeId.not.greater.than.zero=You must select an office.(fr) -validation.msg.user.roles.cannot.be.blank=A user must have at least one role.(fr) -validation.msg.changepassword.password.cannot.be.blank=Password cannot be blank.(fr) -validation.msg.changepassword.passwordrepeat.cannot.be.blank=Repeated password cannot be blank.(fr) -validation.msg.changepassword.passwordrepeat.not.the.same=Password and Repeat password are not the same.(fr) - -dialog.title.add.user=Add user(fr) -dialog.title.add.role=Add role(fr) -dialog.title.edit.details=Edit details(fr) - -form.legend.role.details=Role Details(fr) -form.label.role.name=Name:(fr) -form.label.role.description=Description:(fr) -form.label.role.available.permissions=Available permissions:(fr) -form.label.role.selected.permissions=Selected permissions:(fr) - -form.legend.user.details=User Details(fr) -form.label.user.username=Username:(fr) -form.label.user.firstname=First name:(fr) -form.label.user.lastname=Last name:(fr) -form.label.user.email=Email:(fr) -form.label.user.office=Office:(fr) -form.label.user.available.roles=Available roles:(fr) -form.label.user.selected.roles=Selected roles:(fr) - -validation.msg.role.name.cannot.be.blank=Name cannot be blank.(fr) -validation.msg.role.description.cannot.be.blank=Description cannot be blank.(fr) -validation.msg.role.description.exceeds.max.length=The content of the description exceeds max allowed length of 500 characters.(fr) -validation.msg.role.permissions.cannot.be.empty=A role must have at least one permission associated with it.(fr) - -table.heading.officename=Office Name(fr) -table.heading.username=Username(fr) -table.heading.name=Name(fr) -table.heading.email=Email(fr) -table.heading.rolename=Role Name(fr) -table.heading.description=Description(fr) -table.heading.permission.type=Type(fr) -table.heading.permission.permission=Permission(fr) -table.heading.permission.description=Description(fr) \ No newline at end of file diff --git a/tempjpw/resources/jsrenderExtra.js b/tempjpw/resources/jsrenderExtra.js deleted file mode 100644 index f351e9276..000000000 --- a/tempjpw/resources/jsrenderExtra.js +++ /dev/null @@ -1,810 +0,0 @@ - - queryParam = (function(){ - var query = {}, pair, search = location.search.substring(1).split("&"), i = search.length; - while (i--) { - pair = search[i].split("="); - query[pair[0]] = decodeURIComponent(pair[1]); - } - return query; - })(); - - - - - - -function getClientContent(baseApiUrl, clientId) { - var content = '
"+(i[0]>0&&G==i[1]-1?'
':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'': -"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, -e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ -(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? -a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, -e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, -"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; -if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== -"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); -;/* - * jQuery UI Progressbar 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - */ -(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); -this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* -this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); -;/* - * jQuery UI Effects 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/ - */ -jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], -16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, -a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= -a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", -"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, -0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, -211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, -d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; -f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, -[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), -d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; -if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); -return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, -arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ -2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, -d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, -a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, -d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ -e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); -;/* - * jQuery UI Effects Fade 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fade - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Fold 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fold - * - * Depends: - * jquery.effects.core.js - */ -(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], -10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); -;/* - * jQuery UI Effects Highlight 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Highlight - * - * Depends: - * jquery.effects.core.js - */ -(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& -this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); -;/* - * jQuery UI Effects Pulsate 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Pulsate - * - * Depends: - * jquery.effects.core.js - */ -(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); -b.dequeue()})})}})(jQuery); -; \ No newline at end of file diff --git a/tempjpw/resources/libs/jquery.base64.js b/tempjpw/resources/libs/jquery.base64.js deleted file mode 100644 index b2fccb4ad..000000000 --- a/tempjpw/resources/libs/jquery.base64.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * jQuery BASE64 functions - * - * - * Encodes the given data with base64. - * String $.base64Encode ( String str ) - *
- * Decodes a base64 encoded data. - * String $.base64Decode ( String str ) - *
- * - * Encodes and Decodes the given data in base64. This encoding is designed to - * make binary data survive transport through transport layers that are not - * 8-bit clean, such as mail bodies. Base64-encoded data takes about 33% more - * space than the original data. This javascript code is used to encode / decode - * data using base64 (this encoding is designed to make binary data survive - * transport through transport layers that are not 8-bit clean). Script is fully - * compatible with UTF-8 encoding. You can use base64 encoded data as simple - * encryption mechanism. If you plan using UTF-8 encoding in your project don't - * forget to set the page encoding to UTF-8 (Content-Type meta tag). This - * function orginally get from the WebToolkit and rewrite for using as the - * jQuery plugin. - * - * Example Code - * $.base64Encode("I'm Persian."); - * Result - * "SSdtIFBlcnNpYW4u" - * - * Code - * $.base64Decode("SSdtIFBlcnNpYW4u"); - * Result - * "I'm Persian." - * - * - * @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com > - * @link http://www.semnanweb.com/jquery-plugin/base64.html - * @see http://www.webtoolkit.info/ - * @license http://www.gnu.org/licenses/gpl.html [GNU General Public License] - * @param {jQuery} - * {base64Encode:function(input)) - * @param {jQuery} - * {base64Decode:function(input)) - * @return string - */ -(function($) { - - var keyString = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - - var uTF8Encode = function(string) { - string = string.replace(/\x0d\x0a/g, "\x0a"); - var output = ""; - for ( var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - output += String.fromCharCode(c); - } else if ((c > 127) && (c < 2048)) { - output += String.fromCharCode((c >> 6) | 192); - output += String.fromCharCode((c & 63) | 128); - } else { - output += String.fromCharCode((c >> 12) | 224); - output += String.fromCharCode(((c >> 6) & 63) | 128); - output += String.fromCharCode((c & 63) | 128); - } - } - return output; - }; - - var uTF8Decode = function(input) { - var string = ""; - var i = 0; - var c = c1 = c2 = 0; - while (i < input.length) { - c = input.charCodeAt(i); - if (c < 128) { - string += String.fromCharCode(c); - i++; - } else if ((c > 191) && (c < 224)) { - c2 = input.charCodeAt(i + 1); - string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - i += 2; - } else { - c2 = input.charCodeAt(i + 1); - c3 = input.charCodeAt(i + 2); - string += String.fromCharCode(((c & 15) << 12) - | ((c2 & 63) << 6) | (c3 & 63)); - i += 3; - } - } - return string; - } - - $.extend({ - base64Encode : function(input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = uTF8Encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + keyString.charAt(enc1) - + keyString.charAt(enc2) + keyString.charAt(enc3) - + keyString.charAt(enc4); - } - return output; - }, - base64Decode : function(input) { - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - while (i < input.length) { - enc1 = keyString.indexOf(input.charAt(i++)); - enc2 = keyString.indexOf(input.charAt(i++)); - enc3 = keyString.indexOf(input.charAt(i++)); - enc4 = keyString.indexOf(input.charAt(i++)); - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - output = output + String.fromCharCode(chr1); - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } - output = uTF8Decode(output); - return output; - } - }); -})(jQuery); \ No newline at end of file diff --git a/tempjpw/resources/libs/jquery.dataTables.TitleNumeric.js b/tempjpw/resources/libs/jquery.dataTables.TitleNumeric.js deleted file mode 100644 index 0f6382513..000000000 --- a/tempjpw/resources/libs/jquery.dataTables.TitleNumeric.js +++ /dev/null @@ -1,16 +0,0 @@ - -jQuery.fn.dataTableExt.oSort['title-numeric-asc'] = function(a,b) { - var x = a.match(/title="*(-?[0-9\.]+)/)[1]; - var y = b.match(/title="*(-?[0-9\.]+)/)[1]; - x = parseFloat( x ); - y = parseFloat( y ); - return ((x < y) ? -1 : ((x > y) ? 1 : 0)); -}; - -jQuery.fn.dataTableExt.oSort['title-numeric-desc'] = function(a,b) { - var x = a.match(/title="*(-?[0-9\.]+)/)[1]; - var y = b.match(/title="*(-?[0-9\.]+)/)[1]; - x = parseFloat( x ); - y = parseFloat( y ); - return ((x < y) ? 1 : ((x > y) ? -1 : 0)); -}; diff --git a/tempjpw/resources/libs/jquery.i18n.properties-min-1.0.9.js b/tempjpw/resources/libs/jquery.i18n.properties-min-1.0.9.js deleted file mode 100644 index 059b4906d..000000000 --- a/tempjpw/resources/libs/jquery.i18n.properties-min-1.0.9.js +++ /dev/null @@ -1,9 +0,0 @@ -(function(k){function n(c,a){k.ajax({url:c,async:!1,cache:a.cache,contentType:"text/plain;charset="+a.encoding,dataType:"text",success:function(b){r(b,a.mode)}})}function r(c,a){for(var b="",e=c.split(/\n/),d=/(\{\d+\})/g,q=/\{(\d+)\}/g,m=/(\\u.{4})/ig,f=0;f0&&e[f].match("^#")!="#"){var g=e[f].split("=");if(g.length>0){for(var o=unescape(g[0]).replace(/^\s\s*/,"").replace(/\s\s*$/,""),h=g.length==1?"":g[1];h.match(/\\$/)== -"\\";)h=h.substring(0,h.length-1),h+=e[++f].replace(/\s\s*$/,"");for(var l=2;l0&&(a+="."),a+=c[b],eval("typeof "+a+' == "undefined"')&&eval(a+"={};")}function s(c){var a=[],c=parseInt(c.substr(2),16);c>=0&&c=2&&n(c.path+a[i]+"_"+c.language.substring(0,2)+".properties",c),c.language.length>=5&&n(c.path+a[i]+"_"+c.language.substring(0,5)+".properties",c);c.callback&&c.callback()};k.i18n.prop=function(c){var a=k.i18n.map[c];if(a==null)return"["+ -c+"]";var b;if(typeof a=="string"){for(b=0;(b=a.indexOf("\\",b))!=-1;)a=a[b+1]=="t"?a.substring(0,b)+"\t"+a.substring(b++ +2):a[b+1]=="r"?a.substring(0,b)+"\r"+a.substring(b++ +2):a[b+1]=="n"?a.substring(0,b)+"\n"+a.substring(b++ +2):a[b+1]=="f"?a.substring(0,b)+"\u000c"+a.substring(b++ +2):a[b+1]=="\\"?a.substring(0,b)+"\\"+a.substring(b++ +2):a.substring(0,b)+a.substring(b+1);var e=[],d,j;for(b=0;b=0){var m=a.substring(0,b);m!=""&&e.push(m);e.push(j);b=0;a=a.substring(d+1)}else b=d+1;else b++;a!=""&&e.push(a);a=e;k.i18n.map[c]=e}if(a.length==0)return""; -if(a.lengh==1&&typeof a[0]=="string")return a[0];m="";for(b=0;b3&&(c=c.substring(0,3)+c.substring(3).toUpperCase());return c};var j;if(!j)j=function(c,a,b){if(Object.prototype.toString.call(a)!=="[object RegExp]")return typeof j._nativeSplit=="undefined"?c.split(a,b):j._nativeSplit.call(c, -a,b);var e=[],d=0,k=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.sticky?"y":""),a=RegExp(a.source,k+"g"),m,f,g;c+="";j._compliantExecNpcg||(m=RegExp("^"+a.source+"$(?!\\s)",k));if(b===void 0||+b<0)b=Infinity;else if(b=Math.floor(+b),!b)return[];for(;f=a.exec(c);){k=f.index+f[0].length;if(k>d&&(e.push(c.slice(d,f.index)),!j._compliantExecNpcg&&f.length>1&&f[0].replace(m,function(){for(var a=1;a1&&f.index=b))break;a.lastIndex===f.index&&a.lastIndex++}d===c.length?(g||!a.test(""))&&e.push(""):e.push(c.slice(d));return e.length>b?e.slice(0,b):e},j._compliantExecNpcg=/()??/.exec("")[1]===void 0,j._nativeSplit=String.prototype.split;String.prototype.split=function(c,a){return j(this,c,a)}})(jQuery); \ No newline at end of file diff --git a/tempjpw/resources/libs/jquery.observable.min.js b/tempjpw/resources/libs/jquery.observable.min.js deleted file mode 100644 index 32d307acf..000000000 --- a/tempjpw/resources/libs/jquery.observable.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/* JsObservable: http://github.com/BorisMoore/jsviews */ -(function(a,f){a.observable=function(b){return a.isArray(b)?new d(b):new c(b)};var g=[].splice;function c(a){if(!this.data)return new c(a);this._data=a;return this}a.observable.Object=c;c.prototype={_data:null,data:function(){return this._data},setProperty:function(b,e){if(a.isArray(b))for(var g=0,l=b.length;g1){c=a.isArray(c)?c:[c];if(c.length>0){g.apply(this._data,[d,0].concat(c));b(this._data,{change:"insert",index:d,items:c})}}return this},remove:function(c,a){e(c);a=a===f||a===null?1:a;if(a&&c>-1){var d=this._data.slice(c,c+a);a=d.length;if(a){this._data.splice(c,a);b(this._data,{change:"remove",index:c,items:d})}}return this},move:function(c,d,a){e(c);e(d);a=a===f||a===null?1:a;if(a){var g=this._data.slice(c,c+a);this._data.splice(c,a);this._data.splice.apply(this._data,[d,0].concat(g));b(this._data,{change:"move",oldIndex:c,index:d,items:g})}return this},refresh:function(a){var c=this._data.slice(0);g.apply(this._data,[0,this._data.length].concat(a));b(this._data,{change:"refresh",oldItems:c});return this}}})(jQuery); \ No newline at end of file diff --git a/tempjpw/resources/libs/jquery.views.js b/tempjpw/resources/libs/jquery.views.js deleted file mode 100644 index 2bfdb84b3..000000000 --- a/tempjpw/resources/libs/jquery.views.js +++ /dev/null @@ -1,1053 +0,0 @@ -/*! JsViews v1.0pre: http://github.com/BorisMoore/jsviews */ -/* - * jQuery plugin providing interactive data-driven views, based on integration between jQuery Templates and jQuery Data Link. - * Requires jquery.render.js (optimized version of jQuery Templates, for rendering to string) - * See JsRender at http://github.com/BorisMoore/jsrender - * and jquery.observable.js also at http://github.com/BorisMoore/jsviews - * - * Copyright 2011, Boris Moore - * Released under the MIT License. - */ -(function( $, undefined ) { - -//=============== -// event handlers -//=============== - -// var TEST_EVENTS = { total:0, change:0, arrayChange:0, propertyChange:0 }; -var FALSE = false, TRUE = true, - topView, viewsNs, decl, - oldCleanData = $.cleanData, - fnSetters = { - value: "val", - html: "html", - text: "text" - }, - jsvData = "_jsvData"; - -function elemChangeHandler( ev ) { - var setter, cancel, fromAttr, toPath, linkToInfo, linkContext, sourceValue, link, cnvt, target, - data = this.target, - source = ev.target, - $source = $( source ), - view = $.view( source ), - links = this.links, - context = view.ctx, - beforeChange = context.beforeChange, - l = links.length; - - while ( l-- && !cancel ) { - link = links[ l ]; - if ( !link.filter || (link.filter && $source.is( link.filter ))) { - fromAttr = link.fromAttr; - if ( !fromAttr ) { - // Merge in the default attribute bindings for this source element - fromAttr = viewsNs.merge[ source.nodeName.toLowerCase() ]; - fromAttr = fromAttr ? fromAttr.from.fromAttr : "text"; - } - setter = fnSetters[ fromAttr ]; - sourceValue = $.isFunction( fromAttr ) ? fromAttr( source ) : setter ? $source[setter]() : $source.attr( fromAttr ); - if ((!beforeChange || !(cancel = beforeChange.call( view, ev ) === FALSE )) && sourceValue !== undefined ) { - // Find linkToInfo using link.to, or if not specified, use declarative specification - // provided by decl.applyLinkToInfo, applied to source element - linkToInfo = link.to || $.trim( source.getAttribute( viewsNs.linkToAttr )); - // linkTo does not support multiple targets - use imperative linking for that scenario... - if ( linkToInfo ) { - cnvt = link.convert; - linkToInfo = splitParams( linkToInfo ); - target = linkToInfo[ 0 ].slice( 0, -1 ); - data = (view && view.data) || data; - // data is the current view data, or the top-level target of linkTo. - // get the target object - target = getTargetObject( data, view, target ); - cnvt = linkToInfo[ 3 ]; - toPath = $.trim( linkToInfo[ 1 ].slice( 0, -1 )); - linkContext = { - source: source, - target: target, - convert: cnvt, - path: toPath - }; - if ( cnvt ) { - sourceValue = getConvertedValue( linkContext, data, view, cnvt, sourceValue ); - } - if ( sourceValue !== undefined && target ) { - $.observable( target ).setProperty( toPath, sourceValue ); - if ( context.afterChange ) { //TODO only call this if the target property changed - context.afterChange.call( linkContext, ev ); - } - } - ev.stopPropagation(); // Stop bubbling - } - } - if ( cancel ) { - ev.stopImmediatePropagation(); - } - } - } -} - -function propertyChangeHandler( ev, eventArgs ) { - var pathInfo, setter, cancel, changed, attr, sourceValue, css, - link = this, - target = link.target, - $target = $( target ), - source = ev.target, - sourcePath = (eventArgs && eventArgs.path) || ev.path, - view = $.view( target ), - context = view.ctx, - beforeChange = context.beforeChange, - pathInfos = getLinkFromDataInfo( target, source ).paths[ sourcePath ], - l = pathInfos && pathInfos.length; - - while ( l-- ) { - pathInfo = pathInfos[ l ]; - if ((!beforeChange || !(eventArgs && (cancel = beforeChange.call( this, ev, eventArgs ) === FALSE ))) - && (!view || view.onDataChanged( eventArgs ) !== FALSE )) { - - attr = pathInfo.attr; - - sourceValue = getConvertedValue( link, link.source, view, pathInfo.expr, eventArgs && eventArgs.value ); - - if ( $.isFunction( sourceValue )) { - sourceValue = sourceValue.call( source ); - } - - if ( !attr ) { - // Merge in the default attribute bindings for this target element - attr = viewsNs.merge[ target.nodeName.toLowerCase() ]; - attr = attr ? attr.to.toAttr : "text"; - } - - if ( css = attr.indexOf( "css-" ) === 0 && attr.substr( 4 )) { - if ( changed = $target.css( css ) !== sourceValue ) { - $target.css( css, sourceValue ); - } - } else { - setter = fnSetters[ attr ]; - if ( setter ) { - if ( changed = $target[setter]() !== sourceValue ) { - $target[setter]( sourceValue ); - } - } else if ( changed = $target.attr( attr ) !== sourceValue ) { - $target.attr( attr, sourceValue ); - } - } - - if ( eventArgs && changed && context.afterChange ) { - context.afterChange.call( link, ev, eventArgs ); - } - } - } -} - -function arrayChangeHandler( ev, eventArgs ) { - var cancel, - context = this.ctx, - beforeChange = context.beforeChange, - sourceValue = eventArgs ? eventArgs.change : viewsNs.linkToAttr; // linkToAttr used as a marker of trigger events - - if ((!beforeChange || !(cancel = beforeChange.call( this, ev, eventArgs ) === FALSE )) - && sourceValue !== undefined ) { - this.onDataChanged( eventArgs ); - if ( context.afterChange ) { - context.afterChange.call( this, ev, eventArgs ); - } - } -} - -function setArrayChangeLink( view ) { - var handler, - data = view.data, - onArrayChange = view._onArrayChange; - - if ( onArrayChange ) { - if ( onArrayChange[ 1 ] === data ) { - return; - } - $([ onArrayChange[ 1 ]]).unbind( "arrayChange", onArrayChange[ 0 ]); -// $( "#console" ).append( --TEST_EVENTS.total + " - arrayChange " + --(TEST_EVENTS.arrayChange) + "
"); - } - - if ( $.isArray( data )) { - handler = function() { - arrayChangeHandler.apply( view, arguments ); - }; - $([ data ]).bind( "arrayChange", handler ); - view._onArrayChange = [ handler, data ]; -// $( "#console" ).append( ++TEST_EVENTS.total + " + arrayChange " + ++(TEST_EVENTS.arrayChange) + "
"); - } -} - -//=============== -// view hierarchy -//=============== - -function setViewContext( view, context, merge ) { - var parentContext = view.parent && view.parent.ctx, - viewContext = view._ctx; - // Propagate inherited context through children - view.ctx = merge - ? (viewContext && parentContext ? $.extend( {}, parentContext, viewContext ) : parentContext || viewContext) - : context && context !== parentContext - // Set additional context on this view (which will modify the context inherited from the parent, and be inherited by child views) - ? (view._ctx = context, (parentContext ? $.extend( {}, parentContext, context ) : context)) - : parentContext; -} - -function View( context, node, path, template, parentView, parentElViews, data ) { - var views, index, viewCount, tagInfo, ctx, presenter, options, - self = this; - - $.extend( self, { - views: [], - nodes: node ? [] : [ document.body ], - tmpl: template || (parentView && parentView.tmpl), - path: path, - parent: parentView, - prevNode: node - }); - if ( parentView ) { - views = parentView.views; - parentElViews.push( self ); - data = data || parentView.data; - if ( $.isArray( parentView.data )) { - self.index = index = path; - views.splice( index, 0, self ); - viewCount = views.length; - data = data[ index ]; - while ( index++ < viewCount-1 ) { - $.observable( views[ index ] ).setProperty( "index", index ); - } - self.tag = parentView.tag; - } else { - if ( path ) { - // TODO getDataAndContext and passing of context and data from tags needs work. - // Also, consider more 'codeless' approach, and more consistent syntax with codeless tag markup - data = getDataAndContext( data, parentView, path ); - context = context || data[ 1 ]; - data = data[ 0 ]; - } - self.index = views.length; - views.push( self ); - if ( context.tag ) { - self.tag = [context.tag]; - } else { - template = template.split( "=" ); - if ( template.shift() === "tag" ) { - self.tag = template; - } - } - } - } - self.data = data; - setViewContext( self, context ); - setArrayChangeLink( self ); - - if ( (tagInfo = self.tag) && !$.isArray( data )) { - // This view is from a registered presenter - presenter = viewsNs.tags[ tagInfo[ 0 ]]; - if ( presenter && presenter.presenter ) { - ctx = presenter.ctx || {}; - options = tagInfo[1] - ? getTargetObject( parentView.data, parentView, "{" + tagInfo[ 1 ] + "}" ) - // Declarative presenter {{foo}} - : parentView.ctx; - // Imperative: link( data, foo ) - $.extend( options, presenter.options || {} ); - // attach plugin to content of view - - ctx[ tagInfo[ 0 ]] = new presenter.presenter( options, self ); - // Make presenter available off the ctx object - self.context( ctx ); - } - } -} - -function createNestedViews( node, parent, nextNode, depth, data, context, prevNode, index ) { - var tokens, parentElViews, view, existing, parentNode, elem, elem2, params, presenter, tagInfo, ctx, - currentView = parent, - viewDepth = depth; - context = context || {}; - index = index || 0; - node = prevNode || node; - - if ( !prevNode && node.nodeType === 1 ) { - if ( viewDepth++ === 0 ) { - // Add top-level element nodes to view.nodes - currentView.nodes.push( node ); - } - var linkFromInfo = node.getAttribute( viewsNs.linkFromAttr ), - getFromInfo = node.getAttribute( viewsNs.getFromAttr ); - - if ( linkFromInfo || getFromInfo ) { - addLinksFromData( data || parent.data, node, getFromInfo, linkFromInfo, TRUE ); - } - node = node.firstChild; - } else { - node = node.nextSibling; - } - - while ( node && node !== nextNode ) { - if ( node.nodeType === 1 ) { - createNestedViews( node, currentView, nextNode, viewDepth, data, context ); - } else if ( node.nodeType === 8 && (tokens = /^(\/?)(?:(item)|(?:(tmpl)(?:\((.*)\))?(?:\s+([^\s]+))?))$/.exec( node.nodeValue ))) { - // tokens: [ commentText, "/", "item", dataParams, tmplParam ] - - parentNode = node.parentNode; - if ( tokens[ 1 ]) { - // or - currentView.nextNode = node; - if (( tagInfo = currentView.tag ) && ( ctx = currentView.ctx[ tagInfo[ 0 ]]) && ctx.onAfterCreate ) { - // This view is from a registered presenter which has registered an onAfterCreate callback - ctx.onAfterCreate(); - } - if ( currentView.ctx.onAfterCreate ) { - currentView.ctx.onAfterCreate.call( currentView, currentView ); - } - if ( tokens[ 2 ]) { - // An item close tag: - currentView = parent; - } else { - // A tmpl close tag: - return node; - } - } else { - // or - parentElViews = parentElViews || jsViewsData( parentNode, "view", TRUE ); - if ( tokens[ 2 ]) { - // An item open tag: - currentView = new View( context, node, index++, undefined, currentView, parentElViews ); - } else { - // A tmpl open tag: - view = $.view( node ); - if ( view && view.prevNode === node ) { - if ( view.data === data ) { - existing = view.nextNode; - } else { - view.data = data; - view.render( context ); - return view.nextNode; - } - } else { - view = new View( context, node, tokens[ 4 ], tokens[ 5 ], currentView, parentElViews, data ); - } - // Jump to the nextNode of the tmpl view - node = existing || createNestedViews( node, view, nextNode, 0 ); - } - } - } else if ( viewDepth === 0 ) { - // Add top-level non-element nodes to view.nodes - currentView.nodes.push( node ); - } - node = node.nextSibling; - } -} - -//======================= -// Expression evaluation -//======================= - -function getDataAndContext( source, view, paramString ) { - return Function( "$", "$data", "$view", "$ctx", - "with($data){return [" + paramString + "];}")( $, source, view, view.ctx ); -} - -function getConvertedValue( context, source, view, expression, value ) { - try { - return Function( "$", "$data", "$view", "$ctx", "$value", - "with($data){return " + expression + ";}") - .call( context, $, source, view, view.ctx, value ); - } catch(e) { - // in debug mode, throw 'bad syntax error'; - throw e.message; - } -} - -function getTargetObject( source, view, expression ) { - try { - return expression - ? Function( "$", "$data", "$view", "$ctx", - "with($data){return " + expression + ";}")( $, source, view, view.ctx ) - : source; - } catch(e) { - // in debug mode, throw 'bad syntax error'; - throw e.message; - } -} - -//=============== -// data linking -//=============== - -function link( from, to, links, context ) { - var lnk, filter, targetElems, toLinks, fromLinks, linksToData, i; - - if ( links ) { - - links = $.isArray( links ) ? links : [ links ]; - - toLinks = []; - fromLinks = []; - i = links.length; - - while ( i-- ) { - lnk = links[ i ]; - if ( lnk.to ) { - toLinks.push({ to: lnk.to, filter: lnk.filter }); - } - if ( lnk.from || lnk.getFrom ) { - fromLinks.push( lnk ); - } - } - i = fromLinks.length; - while ( i-- ) { - lnk = fromLinks[ i ]; - filter = lnk.filter; - targetElems = filter ? from.find( filter ).add( $( this ).filter( filter )) : from; // Use future findFilter method in jQuery 1.7? - - targetElems.each( function() { - // If 'from' path points to a property of a descendant 'leaf object', - // link not only from leaf object, but also from intermediate objects - addLinksFromData( to, this, lnk.getFrom, lnk.from ); - }); - } - } - if ( !links || toLinks.length ) { - from.each( function() { - if ( !links ) { - // DECLARATIVE DATA LINKING - - // Linking HTML to object or array - linksToData = jsViewsData( this, "to" ); - i = linksToData.length; - while ( i-- ) { - lnk = linksToData[ i ]; - if ( lnk.links === declLinkTo ) { - if ( lnk.target === to ) { - // Already declaratively linked to the same object - return; - } - // Already linked to a different object, so unlink from previous object - removeLinksToData( this, declLinkTo ); - linksToData.splice( i, 1 ); - } - } - toLinks = declLinkTo; // For declarative case - - // Linking object or array to HTML - createNestedViews( this, $.view( this ), undefined, undefined, to, context ); - } - addLinksToData( this, to, toLinks ); - }); - } - return from; -} - -//function unlink( from, to, links ) { // TODO -//} - -function addLinksFromData( source, target, getFrom, linkFrom ) { - var param, cnvtParam, i, l, lastChar, attr, openParenIndex, get, object, cnvtParams, view, - triggers = [], - cnvt = ""; - - linkFrom = splitParams( (linkFrom ? linkFrom + "," : "") + (getFrom ? "|," + getFrom + ",": ""), TRUE ); - while ( param = linkFrom.shift() ) { - l = param.length; - lastChar = param.charAt( l - 1 ); - param = param.slice( 0, -1 ); - switch ( lastChar ) { - case ':': - attr = $.trim( param ); - break; - case '[': - cnvt = $.trim( param ); - break; - case ')': - cnvt = cnvt || param; - break; - case ']': - triggers = [[ cnvt, param ]]; - cnvt = cnvt ? (cnvt + "." + param) : param; - cnvt += $.isFunction( source[ param ]) ? "()": ""; - break; - case '\r': - openParenIndex = ++param; // Convert to integer and increment - break; - case ',': - if ( param === '|') { - get = TRUE; - } else { - // Apply binding - if ( openParenIndex ) { - cnvtParams = cnvt.slice( openParenIndex ); - cnvtParams = splitParams( cnvtParams ); - for ( i = 0, l = cnvtParams.length; i < l; i++ ) { - cnvtParam = $.trim(cnvtParams[ i ]); - lastChar = cnvtParam.charAt( cnvtParam.length - 1 ); - cnvtParam = cnvtParam.slice( 0, -1 ); - if ( lastChar === '[') { - cnvtParams[ i ] = object = cnvtParam; - } else if ( lastChar === ']') { - triggers.push([ object, cnvtParam ]); - cnvtParams[ i ] = object ? ("." + cnvtParam) : cnvtParam; - cnvtParams[ i ] += $.isFunction( source[ cnvtParam ]) ? "()": ""; - object = ""; - } - } - cnvt = cnvt.slice( 0, openParenIndex ) + cnvtParams.join("") + ")"; - } - - cnvt += param; - view = $.view( target ); - l = triggers.length; - while ( l-- ) { - var trigger = triggers[ l ], - path = trigger[ 1 ], - fromOb = getTargetObject( source, view, trigger[ 0 ]), - link = { source: source, target: target }, - innerPath = path.split("."), - innerOb = fromOb; - - // If 'from' path points to a property of a descendant 'leaf object', - // link not only from leaf object, but also from intermediate objects - while ( innerPath.length > 1 ) { - innerOb = innerOb[ innerPath.shift() ]; - if ( innerOb ) { - addLinkFromData( innerOb, link, innerPath.join( "." ), cnvt, attr ); - } - } - // The last trigger of get bindings will be called on adding the link (to get/initialize the value) - addLinkFromData( fromOb, link, path, cnvt, attr, !l && get ); - } - openParenIndex = 0; - triggers = []; - attr = cnvt = ""; - } - } - } -} - -function addLinkFromData( source, link, path, expr, attr, get ) { - var paths, pathInfos, handler, - target = link.target, - linkInfo = getLinkFromDataInfo( target, source ), - pathInfo = { attr: attr, expr: expr}; - - if ( linkInfo ) { - // Set path info for this path - pathInfos = linkInfo.paths[ path ] = linkInfo.paths[ path ] || []; - pathInfos.push( pathInfo ); - // get handler - handler = linkInfo.handler; - } else { - handler = function() { - propertyChangeHandler.apply( link, arguments ); - }; - - // Store handler for unlinking - if ( target ) { - paths = {}; - paths[ path ] = [ pathInfo ]; - jsViewsData( target, "from", TRUE ).push({ source: source, paths: paths, handler: handler }); - } - $( source ).bind( "propertyChange", handler ); - } -// $( "#console" ).append( ++TEST_EVENTS.total + " + propertyChange " + ++(TEST_EVENTS.propertyChange) + "
"); - if ( get ) { - handler({ target: source, path: path }); - } -} - -function addLinksToData( source, target, links ) { - var handler = function() { - elemChangeHandler.apply( { target: target, links: links }, arguments ); - }; - - // Store handler for unlinking - jsViewsData( source, "to", TRUE ).push({ target: target, links: links, handler: handler }); - $( source ).bind( "change", handler ); -} - -function removeLinksToData( source, links ) { - var prevLinkInfo, - prevLinkInfos = jsViewsData( source, "to" ), - l = prevLinkInfos.length; - while( l-- ) { - prevLinkInfo = prevLinkInfos[ l ]; - if ( prevLinkInfo.links === links ) { - $( source ).unbind( "change", prevLinkInfo.handler); - prevLinkInfos.splice( l, 1 ); -// $( "#console" ).append( --TEST_EVENTS.total + " - change " + --(TEST_EVENTS.change) + "
"); - } - } -} - -function getLinkFromDataInfo( target, source ) { - var link, - links = jsViewsData( target, "from" ), - l = links.length; - while( l-- ) { - link = links[ l ]; - if ( link.source === source ) { - // Set path info for this path - return link; - } - } -} - -//=============== -// helpers -//=============== - -function clean( i, el ) { // TODO optimize for perf - var link, links , l, views, parentView, view; - - if ( jsViewsData( el, "to" ).length ) { - $( el ).unbind( "change" ); -// $( "#console" ).append( --TEST_EVENTS.total + " - change " + --(TEST_EVENTS.change) + "
"); - } - - links = jsViewsData( el, "from" ); - l = links.length; - - while( l-- ) { - link = links[ l ]; - $( link.source ).unbind( "propertyChange", link.handler ); -// $( "#console" ).append( --TEST_EVENTS.total + " - propertyChange " + --(TEST_EVENTS.propertyChange) + "
"); - } - - views = jsViewsData( el, "view" ); - if ( l = views.length ) { - parentView = $.view( el ); - while( l-- ) { - view = views[ l ]; - if ( view.parent === parentView ) { - parentView.removeViews( view.index, 1 ); // NO - ONLY remove view if its top-level nodes are all.. (TODO) - } - } - } -} - -function jsViewsData( el, type, create ) { - var jqData = $.data( el, jsvData ) || (create && $.data( el, jsvData, { "view": [], "from": [], "to": [] })); - return jqData ? jqData[ type ] : []; -} - -function splitParams( paramString, markParen ) { - // Split into params (or values in an array literal, or keys and values in an object literal) - // (Achieved by splitting before top-level ':' or ',' chars) - var openParenIndex, - startIndex = 0, - parenDepth = 0, - quoted = FALSE, // boolean for string content in double qoutes - aposed = FALSE; // boolean for string content in single qoutes - - paramString = paramString.replace( /\s+/g, " " ); - - return paramString - .replace( /(\))|([\:\,])|(\')|(\")|([\(\[\{])|([\}\]])/g, function( all, cnvt, colon, apos, quot, leftParen, rightParen, index ) { - if ( aposed ) { - // within single-quoted string - aposed = !apos; - return all; - } - if ( quoted ) { - // within double-quoted string - quoted = !quot; - return all; - } - if ( cnvt ) { - // follow top-level ':' or ',' with '\t' - return --parenDepth - ? all - : (markParen && paramString.charAt( index + 1 ) === ',' ) - ? (openParenIndex -= startIndex, startIndex = index, - all + "\t" + openParenIndex + "\r\t") - :all; - } - if ( colon ) { - // follow top-level ':' or ',' with '\t' - return parenDepth - ? all - : (startIndex = index+1, all + "\t"); - } - if ( leftParen ) { - if ( parenDepth++ ) { - return all; - } - if ( all === '(' ) { - openParenIndex = index; - } - // follow top-level '[' by '\t' - return all !== '[' ? all : "[\t"; - } - if ( rightParen ) { - // follow top-level ']' by '\t' - return ( --parenDepth || all !== ']' ) ? all : "]\t"; - } - aposed = apos; - quoted = quot; - return all; - }) - .split( "\t" ); -} - -function inputAttrib( elem ) { - return elem.type === "checkbox" ? elem.checked : $( elem ).val(); -} - -$.extend({ - - //======================= - // jQuery $.view() plugin - //======================= - - view: function( node, inner ) { - // $.view() returns top node - // $.view( node ) returns view that contains node - var returnView, view, parentElViews, i, finish, - startTagReg = /^item|^tmpl(\(\$?[\w\.]*\))?(\s+[^\s]+)?$/, - topNode = document.body, - startNode = node; - - if ( inner ) { - // Treat supplied node as a container element, step through content, and return the first view encountered. - finish = node.nextSibling || node.parentNode; // - while ( finish !== (node = node.firstChild || node.nextSibling || node.parentNode.nextSibling )) { - if ( node.nodeType === 8 && startTagReg.test( node.nodeValue )) { - view = $.view( node ); - if ( view.prevNode === node ) { - return view; - } - } - } - return; - } - - node = node || topNode; - if ( topView && !topView.views.length ) { - returnView = topView; // Perf optimization for common case - } else { - // Step up through parents to find an element which is a views container, or if none found, create the top-level view for the page - while( !(parentElViews = jsViewsData( finish = node.parentNode || topNode, "view" )).length ) { - if ( !finish || node === topNode ) { - jsViewsData( topNode.parentNode, "view", TRUE ).push( returnView = topView = new View()); - topView.ctx = {}; - break; - } - node = finish; - } - if ( !returnView && node === topNode ) { - returnView = parentElViews[0]; - } - while ( !returnView && node ) { - // Step back through the nodes, until we find an item or tmpl open tag - in which case that is the view we want - if ( node.nodeType === 8 ) { - if ( /^\/item|^\/tmpl$/.test( node.nodeValue )) { - // A tmpl or item close tag: or - i = parentElViews.length; - while ( i-- ) { - view = parentElViews[ i ]; - if ( view.nextNode === node ) { - // If this was the node originally passed in, this is the view we want. - returnView = (node === startNode && view); - // If not, jump to the beginning of this item/tmpl and continue from there - node = view.prevNode; - break; - } - } - } else if ( startTagReg.test( node.nodeValue )) { - // A tmpl or item open tag: or - i = parentElViews.length; - while ( i-- ) { - view = parentElViews[ i ]; - if ( view.prevNode === node ) { - returnView = view; - break; - } - } - } - } - node = node.previousSibling; - } - // If not within any of the views in the current parentElViews collection, move up through parent nodes to find next parentElViews collection - returnView = returnView || $.view( finish ); - } - return returnView; - }, - - //======================= - // override cleanData - //======================= - - cleanData: function( elems ) { - $( elems ).each( clean ); // TODO - look at perf optimization on this - oldCleanData.call( $, elems ); - } -}); - -//======================= -// $.views (namespace) -//======================= - -viewsNs = $.views = $.views || {}; - -$.extend( viewsNs, { - presenters: {}, - activeViews: true, - getProperty: function( data, value ) { - // support for property getter on data - return $.isFunction( value ) ? value.call(data) : value; - }, - linkToAttr: "data-to", - linkFromAttr: "data-from", - getFromAttr: "data-getfrom", - merge: { - input: { - from: { - fromAttr: inputAttrib - }, - to: { - toAttr: "value" - } - } - }, - - //=============== - // registerPresenters - //=============== - - // Register a 'control' - which associates a Presenter object with a template - // Optionally associate with a tag, for declarative use. (Rendering of template and instantiation/attaching of presenter). - registerPresenters: registerPresenters = function( name, presenter ) { - var key, tag; - - if ( typeof name === "object" ) { - for ( key in name ) { - registerPresenters( key, name[ key ]); - } - } else { - // Simple single property case. - presenter.ctx = presenter.ctx || {}; - - tag = (tag = presenter.tag) === undefined ? name : tag; - // If tag not set to null or empty string, then register a tag for this control - if ( tag ) { - presenter.tag = tag; - viewsNs.tags[ tag ] = presenter; - } - - plugin = (plugin = presenter.plugin) === undefined ? name : plugin; - // If plugin not set to null or empty string, then register create a generated jQuery plugin for this control - if ( plugin ) { - //Generated jQuery plugin - $.fn[ plugin ] = $.fn[ plugin ] || function( data, options ) { - return this.link( data, presenter, options ); - } - presenter.plugin = plugin; - } - viewsNs.presenters[ name ] = presenter; - } - return this; - }, - - //======================= - // view prototype - //======================= - - view: { - onDataChanged: function( eventArgs ) { - if ( eventArgs ) { - // This is an observable action (not a trigger/handler call from pushValues, or similar, for which eventArgs will be null) - var self = this, - action = eventArgs.change, - index = eventArgs.index, - items = eventArgs.items; - switch ( action ) { - case "insert": - self.addViews( index, items ); - break; - case "remove": - self.removeViews( index, items.length ); - break; - case "move": - self.render(); // Could optimize this - break; - case "refresh": - self.render(); - // Othercases: (e.g.undefined, for setProperty on observable object) etc. do nothing - } - } - return TRUE; - }, - render: function() { - var prevNode = this.prevNode, - nextNode = this.nextNode, - parentNode = prevNode.parentNode; - - $( this.nodes ).remove(); - this.removeViews( 0, this.views.length ); - this.nodes = []; - $( prevNode ).after( $.render( this.data, this.tmpl, this.ctx ) ); - parentNode.removeChild( prevNode.nextSibling ); - parentNode.removeChild( nextNode.previousSibling ); - createNestedViews( parentNode, this, nextNode, 0, undefined, undefined, prevNode, 0 ); //this.index - setArrayChangeLink( this ); - return this; - }, - addViews: function( index, dataItems, tmpl ) { - var parent, - itemsCount = dataItems.length, - context = this.ctx, - views = this.views; - - if ( index && !views[index-1] ) { - return; // If subview for provided index does not exist, do nothing - } - if ( itemsCount ) { - if ( this.path ) { - parent = this.parent; - context = getDataAndContext( parent.data, parent, this.path )[1]; - } - var html = $.render( dataItems, tmpl || this.tmpl, context, this, TRUE ), - // Use passed-in template if provided, since this added view may use a different template than the original one used to render the array. - - prevNode = index ? views[ index-1 ].nextNode : this.prevNode, - nextNode = prevNode.nextSibling, - parentNode = prevNode.parentNode; - $( prevNode ).after( html ); - parentNode.removeChild( prevNode.nextSibling ); - parentNode.removeChild( nextNode.previousSibling ); - createNestedViews( parentNode, this, nextNode, 0, undefined, undefined, prevNode, index ); - } - return this; - }, - removeViews: function( index, itemsCount, keepHtml ) { - if ( itemsCount ) { - var parentElViews, parentViewsIndex, viewCount, - views = this.views, - current = index + itemsCount; - - while ( current-- > index ) { - var view = views[ current ], - i = view.views.length, - node = view.prevNode, - nextNode = view.nextNode, - nodes = [ node ]; - - if ( i ) { - view.removeViews( 0, i, keepHtml ); - } - - // Remove this view from the parentElViews collection - parentElViews = parentElViews || jsViewsData( view.nextNode.parentNode, "view" ); - i = parentElViews.length; - while ( i-- && parentViewsIndex === undefined ) { - if ( parentElViews[ i ] === view ) { - parentViewsIndex = i; - } - } - parentElViews.splice( parentViewsIndex, 1 ); - - if ( !keepHtml ) { - while ( node !== nextNode ) { - node = node.nextSibling; - nodes.push( node ); - } - $( nodes ).remove(); - } - view.data = undefined; - setArrayChangeLink( view ); - } - views.splice( index, itemsCount ); - viewCount = views.length; - - while ( index < viewCount ) { - $.observable( views[ index ] ).setProperty( "index", index++ ); - } - } - return this; - }, - context: function( context ) { - var self = this, - parent = self.parent, - parentCtx = parent ? parent.ctx : {}; - if ( !context ) { - // Clear context - self.each( function( view ) { - view.ctx = parentCtx; - view._ctx = undefined; - }); - } else if ( context !== self.ctx ) { - self.each( function( view ) { - setViewContext( view, context, view !== self ); - }); - } - return this; - }, - each: function( callback ) { - callback( this ); - var l = this.views.length; - while ( l-- ) { - this.views[ l ].each( callback ); - } - return this; - }, - content: function( select ) { - return select ? $( select, this.nodes ) : $( this.nodes ); - } - } -}); - -//======================= -// jQuery plugins -//======================= - -$.fn.extend({ - view: function( inner ) { - return $.view( this[0], inner ); - }, - addLinks: function( data, links, context ) { - // Explicit Linking - return link( this, data, links, context ); - }, -// removeLinks: function( data, links, context ) { //TODO -// return unlink( this, data, links, context ); -// }, - link: function( data, tmpl, context ) { - // Declarative Linking - // If context is a function, cb - shorthand for { beforeChange: cb } - // if tmpl not a map, corresponds to $("#container").html( $.render( data, tmpl )).link( data ); - if ( !this.length ) { - return this; - } - - if ( tmpl ) { - tmpl = tmpl.tag && tmpl === $.views.tags[ tmpl.tag ] - ? (context.tag = tmpl.tag, context.tmpl || tmpl.tmpl) - // Special case: tmpl is a presenter - : $.isPlainObject( tmpl ) - ? (context = tmpl, FALSE) - // Linking only. (context was passed in as second parameter, no template parameter passed) - : tmpl; - // Linking and rendering (passing a template) - - if ( tmpl && (tmpl = $.template( tmpl ))) { - removeLinksToData( this[0], declLinkTo ); - this.empty(); - if ( data ) { - this.append( $.render( data, tmpl, context )); - // Using append, rather than html, as workaround for issues in IE compat mode. (Using innerHTML leads to initial comments being stripped) - } - } - } - return link( this, data, undefined, context ); - } -}); - -View.prototype = viewsNs.view; -decl = viewsNs.decl; -declLinkTo = [{ filter: "input[" + viewsNs.linkToAttr + "]" }]; -})( jQuery ); diff --git a/tempjpw/resources/libs/jsrender.js b/tempjpw/resources/libs/jsrender.js deleted file mode 100644 index 5998650c3..000000000 --- a/tempjpw/resources/libs/jsrender.js +++ /dev/null @@ -1,573 +0,0 @@ -/*! JsRender v1.0pre - (jsrender.js version: does not require jQuery): http://github.com/BorisMoore/jsrender */ -/* - * Optimized version of jQuery Templates, fosr rendering to string, using 'codeless' markup. - * - * Copyright 2011, Boris Moore - * Released under the MIT License. - */ -window.JsViews || window.jQuery && jQuery.views || (function( window, undefined ) { - -var $, _$, JsViews, viewsNs, tmplEncode, render, rTag, registerTags, registerHelpers, extend, - FALSE = false, TRUE = true, - jQuery = window.jQuery, document = window.document, - htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, - rPath = /^(true|false|null|[\d\.]+)|(\w+|\$(view|data|ctx|(\w+)))([\w\.]*)|((['"])(?:\\\1|.)*\7)$/g, - rParams = /(\$?[\w\.\[\]]+)(?:(\()|\s*(===|!==|==|!=|<|>|<=|>=)\s*|\s*(\=)\s*)?|(\,\s*)|\\?(\')|\\?(\")|(\))|(\s+)/g, - rNewLine = /\r?\n/g, - rUnescapeQuotes = /\\(['"])/g, - rEscapeQuotes = /\\?(['"])/g, - rBuildHash = /\x08([^\x08]+)\x08/g, - autoName = 0, - escapeMapForHtml = { - "&": "&", - "<": "<", - ">": ">" - }, - htmlSpecialChar = /[\x00"&'<>]/g, - slice = Array.prototype.slice; - -if ( jQuery ) { - - //////////////////////////////////////////////////////////////////////////////////////////////// - // jQuery is loaded, so make $ the jQuery object - $ = jQuery; - - $.fn.extend({ - // Use first wrapped element as template markup. - // Return string obtained by rendering the template against data. - render: function( data, context, parentView, path ) { - return render( data, this[0], context, parentView, path ); - }, - - // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template. - template: function( name, context ) { - return $.template( name, this[0], context ); - } - }); - -} else { - - //////////////////////////////////////////////////////////////////////////////////////////////// - // jQuery is not loaded. Make $ the JsViews object - - // Map over the $ in case of overwrite - _$ = window.$; - - window.JsViews = JsViews = window.$ = $ = { - extend: function( target, source ) { - var name; - for ( name in source ) { - target[ name ] = source[ name ]; - } - return target; - }, - isArray: Array.isArray || function( obj ) { - return Object.prototype.toString.call( obj ) === "[object Array]"; - }, - noConflict: function() { - if ( window.$ === JsViews ) { - window.$ = _$; - } - return JsViews; - } - }; -} - -extend = $.extend; - -//================= -// View constructor -//================= - -function View( context, path, parentView, data, template ) { - // Returns a view data structure for a new rendered instance of a template. - // The content field is a hierarchical array of strings and nested views. - - parentView = parentView || { viewsCount:0, ctx: viewsNs.helpers }; - - var parentContext = parentView && parentView.ctx; - - return { - jsViews: "v1.0pre", - path: path || "", - // inherit context from parentView, merged with new context. - itemNumber: ++parentView.viewsCount || 1, - viewsCount: 0, - tmpl: template, - data: data || parentView.data || {}, - // Set additional context on this view (which will modify the context inherited from the parent, and be inherited by child views) - ctx : context && context === parentContext - ? parentContext - : (parentContext ? extend( extend( {}, parentContext ), context ) : context||{}), - // If no jQuery, extend does not support chained copies - so limit to two parameters - parent: parentView - }; -} -extend( $, { - views: viewsNs = { - templates: {}, - tags: { - "if": function() { - var ifTag = this, - view = ifTag._view; - view.onElse = function( presenter, args ) { - var i = 0, - l = args.length; - while ( l && !args[ i++ ]) { - // Only render content if args.length === 0 (i.e. this is an else with no condition) or if a condition argument is truey - if ( i === l ) { - return ""; - } - } - view.onElse = undefined; // If condition satisfied, so won't run 'else'. - return render( view.data, presenter.tmpl, view.ctx, view); - }; - return view.onElse( this, arguments ); - }, - "else": function() { - var view = this._view; - return view.onElse ? view.onElse( this, arguments ) : ""; - }, - each: function() { - var i, - self = this, - result = "", - args = arguments, - l = args.length, - content = self.tmpl, - view = self._view; - for ( i = 0; i < l; i++ ) { - result += args[ i ] ? render( args[ i ], content, self.ctx || view.ctx, view, self._path, self._ctor ) : ""; - } - return l ? result - // If no data parameter, use the current $data from view, and render once - : result + render( view.data, content, view.ctx, view, self._path, self.tag ); - }, - "=": function( value ) { - return value; - }, - "*": function( value ) { - return value; - } - }, - helpers: { - not: function( value ) { - return !value; - } - }, - allowCode: FALSE, - debugMode: TRUE, - err: function( e ) { - return viewsNs.debugMode ? ("
Error: " + (e.message || e) + ". "): '""'; - }, - -//=============== -// setDelimiters -//=============== - - setDelimiters: function( openTag, closeTag ) { - // Set or modify the delimiter characters for tags: "{{" and "}}" - var firstCloseChar = closeTag.charAt( 0 ), - secondCloseChar = closeTag.charAt( 1 ); - openTag = "\\" + openTag.charAt( 0 ) + "\\" + openTag.charAt( 1 ); - closeTag = "\\" + firstCloseChar + "\\" + secondCloseChar; - - // Build regex with new delimiters - // {{ - rTag = openTag - // # tag (followed by space,! or }) or equals or code - + "(?:(?:(\\#)?(\\w+(?=[!\\s\\" + firstCloseChar + "]))" + "|(?:(\\=)|(\\*)))" - // params - + "\\s*((?:[^\\" + firstCloseChar + "]|\\" + firstCloseChar + "(?!\\" + secondCloseChar + "))*?)" - // encoding - + "(!(\\w*))?" - // closeBlock - + "|(?:\\/([\\w\\$\\.\\[\\]]+)))" - // }} - + closeTag; - - // Default rTag: # tag equals code params encoding closeBlock - // /\{\{(?:(?:(\#)?(\w+(?=[\s\}!]))|(?:(\=)|(\*)))((?:[^\}]|\}(?!\}))*?)(!(\w*))?|(?:\/([\w\$\.\[\]]+)))\}\}/g; - - rTag = new RegExp( rTag, "g" ); - }, - - -//=============== -// registerTags -//=============== - - // Register declarative tag. - registerTags: registerTags = function( name, tagFn ) { - var key; - if ( typeof name === "object" ) { - for ( key in name ) { - registerTags( key, name[ key ]); - } - } else { - // Simple single property case. - viewsNs.tags[ name ] = tagFn; - } - return this; - }, - -//=============== -// registerHelpers -//=============== - - // Register helper function for use in markup. - registerHelpers: registerHelpers = function( name, helper ) { - if ( typeof name === "object" ) { - // Object representation where property name is path and property value is value. - // TODO: We've discussed an "objectchange" event to capture all N property updates here. See TODO note above about propertyChanges. - var key; - for ( key in name ) { - registerHelpers( key, name[ key ]); - } - } else { - // Simple single property case. - viewsNs.helpers[ name ] = helper; - } - return this; - }, - -//=============== -// tmpl.encode -//=============== - - encode: function( encoding, text ) { - return text - ? ( tmplEncode[ encoding || "html" ] || tmplEncode.html)( text ) // HTML encoding is the default - : ""; - }, - - encoders: tmplEncode = { - "none": function( text ) { - return text; - }, - "html": function( text ) { - // HTML encoding helper: Replace < > & and ' and " by corresponding entities. - // Implementation, from Mike Samuel - return String( text ).replace( htmlSpecialChar, replacerForHtml ); - } - //TODO add URL encoding, and perhaps other encoding helpers... - }, - -//=============== -// renderTag -//=============== - - renderTag: function( tag, view, encode, content, tagProperties ) { - // This is a tag call, with arguments: "tag", view, encode, content, presenter [, params...] - var ret, ctx, name, - args = arguments, - presenters = viewsNs.presenters; - hash = tagProperties._hash, - tagFn = viewsNs.tags[ tag ]; - - if ( !tagFn ) { - return ""; - } - - content = content && view.tmpl.nested[ content - 1 ]; - tagProperties.tmpl = tagProperties.tmpl || content || undefined; - // Set the tmpl property to the content of the block tag, unless set as an override property on the tag - - if ( presenters && presenters[ tag ]) { - ctx = extend( extend( {}, tagProperties.ctx ), tagProperties ); - delete ctx.ctx; - delete ctx._path; - delete ctx.tmpl; - tagProperties.ctx = ctx; - tagProperties._ctor = tag + (hash ? "=" + hash.slice( 0, -1 ) : ""); - - tagProperties = extend( extend( {}, tagFn ), tagProperties ); - tagFn = viewsNs.tags.each; // Use each to render the layout template against the data - } - - tagProperties._encode = encode; - tagProperties._view = view; - ret = tagFn.apply( tagProperties, args.length > 5 ? slice.call( args, 5 ) : [view.data] ); - return ret || (ret === undefined ? "" : ret.toString()); // (If ret is the value 0 or false or null, will render to string) - } - }, - -//=============== -// render -//=============== - - render: render = function( data, tmpl, context, parentView, path, tagName ) { - // Render template against data as a tree of subviews (nested template), or as a string (top-level template). - // tagName parameter for internal use only. Used for rendering templates registered as tags (which may have associated presenter objects) - var i, l, dataItem, arrayView, content, result = ""; - - if ( arguments.length === 2 && data.jsViews ) { - parentView = data; - context = parentView.ctx; - data = parentView.data; - } - tmpl = $.template( tmpl ); - if ( !tmpl ) { - return ""; // Could throw... - } - - if ( $.isArray( data )) { - // Create a view item for the array, whose child views correspond to each data item. - arrayView = new View( context, path, parentView, data); - l = data.length; - for ( i = 0, l = data.length; i < l; i++ ) { - dataItem = data[ i ]; - content = dataItem ? tmpl( dataItem, new View( context, path, arrayView, dataItem, tmpl, this )) : ""; - result += viewsNs.activeViews ? "" + content + "" : content; - } - } else { - result += tmpl( data, new View( context, path, parentView, data, tmpl )); - } - - return viewsNs.activeViews - // If in activeView mode, include annotations - ? "" + result + "" - // else return just the string result - : result; - }, - -//=============== -// template -//=============== - - template: function( name, tmpl ) { - // Set: - // Use $.template( name, tmpl ) to cache a named template, - // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc. - // Use $( "selector" ).template( name ) to provide access by name to a script block template declaration. - - // Get: - // Use $.template( name ) to access a cached template. - // Also $( selectorToScriptBlock ).template(), or $.template( null, templateString ) - // will return the compiled template, without adding a name reference. - // If templateString is not a selector, $.template( templateString ) is equivalent - // to $.template( null, templateString ). To ensure a string is treated as a template, - // include an HTML element, an HTML comment, or a template comment tag. - - if (tmpl) { - // Compile template and associate with name - if ( "" + tmpl === tmpl ) { // type string - // This is an HTML string being passed directly in. - tmpl = compile( tmpl ); - } else if ( jQuery && tmpl instanceof $ ) { - tmpl = tmpl[0]; - } - if ( tmpl ) { - if ( jQuery && tmpl.nodeType ) { - // If this is a template block, use cached copy, or generate tmpl function and cache. - tmpl = $.data( tmpl, "tmpl" ) || $.data( tmpl, "tmpl", compile( tmpl.innerHTML )); - } - viewsNs.templates[ tmpl._name = tmpl._name || name || "_" + autoName++ ] = tmpl; - } - return tmpl; - } - // Return named compiled template - return name - ? "" + name !== name // not type string - ? (name._name - ? name // already compiled - : $.template( null, name )) - : viewsNs.templates[ name ] || - // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) - $.template( null, htmlExpr.test( name ) ? name : try$( name )) - : null; - } -}); - -viewsNs.setDelimiters( "{{", "}}" ); - -//================= -// compile template -//================= - -// Generate a reusable function that will serve to render a template against data -// (Compile AST then build template function) - -function parsePath( all, comp, object, viewDataCtx, viewProperty, path, string, quot ) { - return object - ? ((viewDataCtx - ? viewProperty - ? ("$view." + viewProperty) - : object - :("$data." + object) - ) + ( path || "" )) - : string || (comp || ""); -} - -function compile( markup ) { - var newNode, - loc = 0, - stack = [], - topNode = [], - content = topNode, - current = [,,topNode]; - - function pushPreceedingContent( shift ) { - shift -= loc; - if ( shift ) { - content.push( markup.substr( loc, shift ).replace( rNewLine,"\\n")); - } - } - - function parseTag( all, isBlock, tagName, equals, code, params, useEncode, encode, closeBlock, index ) { - // rTag : # tagName equals code params encode closeBlock - // /\{\{(?:(?:(\#)?(\w+(?=[\s\}!]))|(?:(\=)|(\*)))((?:[^\}]|\}(?!\}))*?)(!(\w*))?|(?:\/([\w\$\.\[\]]+)))\}\}/g; - - // Build abstract syntax tree: [ tagName, params, content, encode ] - var named, - hash = "", - parenDepth = 0, - quoted = FALSE, // boolean for string content in double qoutes - aposed = FALSE; // or in single qoutes - - function parseParams( all, path, paren, comp, eq, comma, apos, quot, rightParen, space, index ) { - // path paren eq comma apos quot rtPrn space - // /(\$?[\w\.\[\]]+)(?:(\()|(===)|(\=))?|(\,\s*)|\\?(\')|\\?(\")|(\))|(\s+)/g - - return aposed - // within single-quoted string - ? ( aposed = !apos, (aposed ? all : '"')) - : quoted - // within double-quoted string - ? ( quoted = !quot, (quoted ? all : '"')) - : comp - // comparison - ? ( path.replace( rPath, parsePath ) + comp) - : eq - // named param - ? parenDepth ? "" :( named = TRUE, '\b' + path + ':') - : paren - // function - ? (parenDepth++, path.replace( rPath, parsePath ) + '(') - : rightParen - // function - ? (parenDepth--, ")") - : path - // path - ? path.replace( rPath, parsePath ) - : comma - ? "," - : space - ? (parenDepth - ? "" - : named - ? ( named = FALSE, "\b") - : "," - ) - : (aposed = apos, quoted = quot, '"'); - } - - tagName = tagName || equals; - pushPreceedingContent( index ); - if ( code ) { - if ( viewsNs.allowCode ) { - content.push([ "*", params.replace( rUnescapeQuotes, "$1" )]); - } - } else if ( tagName ) { - if ( tagName === "else" ) { - current = stack.pop(); - content = current[ 2 ]; - isBlock = TRUE; - } - params = (params - ? (params + " ") - .replace( rParams, parseParams ) - .replace( rBuildHash, function( all, keyValue, index ) { - hash += keyValue + ","; - return ""; - }) - : ""); - params = params.slice( 0, -1 ); - newNode = [ - tagName, - useEncode ? encode || "none" : "", - isBlock && [], - "{" + hash + "_hash:'" + hash + "',_path:'" + params + "'}", - params - ]; - - if ( isBlock ) { - stack.push( current ); - current = newNode; - } - content.push( newNode ); - } else if ( closeBlock ) { - current = stack.pop(); - } - loc = index + all.length; // location marker - parsed up to here - if ( !current ) { - throw "Expected block tag"; - } - content = current[ 2 ]; - } - markup = markup.replace( rEscapeQuotes, "\\$1" ); - markup.replace( rTag, parseTag ); - pushPreceedingContent( markup.length ); - return buildTmplFunction( topNode ); -} - -// Build javascript compiled template function, from AST -function buildTmplFunction( nodes ) { - var ret, node, i, - nested = [], - l = nodes.length, - code = "try{var views=" - + (jQuery ? "jQuery" : "JsViews") - + '.views,tag=views.renderTag,enc=views.encode,html=views.encoders.html,$ctx=$view && $view.ctx,result=""+\n\n'; - - for ( i = 0; i < l; i++ ) { - node = nodes[ i ]; - if ( node[ 0 ] === "*" ) { - code = code.slice( 0, i ? -1 : -3 ) + ";" + node[ 1 ] + ( i + 1 < l ? "result+=" : "" ); - } else if ( "" + node === node ) { // type string - code += '"' + node + '"+'; - } else { - var tag = node[ 0 ], - encode = node[ 1 ], - content = node[ 2 ], - obj = node[ 3 ], - params = node[ 4 ], - paramsOrEmptyString = params + '||"")+'; - - if( content ) { - nested.push( buildTmplFunction( content )); - } - code += tag === "=" - ? (!encode || encode === "html" - ? "html(" + paramsOrEmptyString - : encode === "none" - ? ("(" + paramsOrEmptyString) - : ('enc("' + encode + '",' + paramsOrEmptyString) - ) - : 'tag("' + tag + '",$view,"' + ( encode || "" ) + '",' - + (content ? nested.length : '""') // For block tags, pass in the key (nested.length) to the nested content template - + "," + obj + (params ? "," : "") + params + ")+"; - } - } - ret = new Function( "$data, $view", code.slice( 0, -1) + ";return result;\n\n}catch(e){return views.err(e);}" ); - ret.nested = nested; - return ret; -} - -//========================== Private helper functions, used by code above ========================== - -function replacerForHtml( ch ) { - // Original code from Mike Samuel - return escapeMapForHtml[ ch ] - // Intentional assignment that caches the result of encoding ch. - || ( escapeMapForHtml[ ch ] = "&#" + ch.charCodeAt( 0 ) + ";" ); -} - -function try$( selector ) { - // If selector is valid, return jQuery object, otherwise return (invalid) selector string - try { - return $( selector ); - } catch( e) {} - return selector; -} -})( window ); diff --git a/tempjpw/resources/menu_left.png b/tempjpw/resources/menu_left.png deleted file mode 100644 index 1183b4b6d..000000000 Binary files a/tempjpw/resources/menu_left.png and /dev/null differ diff --git a/tempjpw/resources/menu_right.png b/tempjpw/resources/menu_right.png deleted file mode 100644 index b69e637f3..000000000 Binary files a/tempjpw/resources/menu_right.png and /dev/null differ diff --git a/tempjpw/resources/mifos.jpg b/tempjpw/resources/mifos.jpg deleted file mode 100644 index d110d9586..000000000 Binary files a/tempjpw/resources/mifos.jpg and /dev/null differ diff --git a/tempjpw/resources/stretchydata-0.95.js b/tempjpw/resources/stretchydata-0.95.js deleted file mode 100644 index d94b8cfda..000000000 --- a/tempjpw/resources/stretchydata-0.95.js +++ /dev/null @@ -1,537 +0,0 @@ -(function($) { - - $.stretchyData = {}; - - $.stretchyData.displayAllExtraData = function(params) { - - if (!(params.url)) { - alert(doI18N("reportingInitError - url parameter")); - return; - } - if (!(params.basicAuthKey)) { - alert(doI18N("reportingInitError - basicAuthKey parameter")); - return; - } - if (!(params.datasetType)) { - alert(doI18N("reportingInitError - datasetType parameter")); - return; - } - if (!(params.datasetPKValue)) { - alert(doI18N("reportingInitError - datasetPKValue parameter")); - return; - } - if (!(params.datasetTypeDiv)) { - alert(doI18N("reportingInitError - datasetTypeDiv parameter")); - return; - } - - var headingPrefix = ""; - if (params.headingPrefix) - headingPrefix = params.headingPrefix; - var headingClass = ""; - if (params.headingClass) - headingClass = params.headingClass; - var labelClass = ""; - if (params.labelClass) - labelClass = params.labelClass; - var valueClass = ""; - if (params.valueClass) - valueClass = params.valueClass; - displayAllExtraData(params.url, params.basicAuthKey, params.datasetType, - params.datasetPKValue, params.datasetTypeDiv, headingPrefix, - headingClass, labelClass, valueClass); - }; - - $.stretchyData.popupEditDialog = function(url, basicAuthKey, datasetType, datasetName, datasetPKValue, dsnDivName, title, width, height) { - popupEditDialog(url, basicAuthKey, datasetType, datasetName, datasetPKValue, dsnDivName, title, width, height); - }; - - displayAllSuccessFunction = function(data, textStatus, jqXHR) { - - var headingClassStr = ""; - if (displayAllVars.headingClass > "") - headingClassStr = ' class="' + displayAllVars.headingClass + '" '; - - var extraDataNamesVar = ""; - for ( var i in data) { - var dsnDivName = generateDsnDivName(displayAllVars.datasetType, i, - displayAllVars.datasetTypeDiv); - extraDataNamesVar += '
' - + doI18N(displayAllVars.headingPrefix) - + doI18N(data[i].name) - + ' - '; - - extraDataNamesVar += editExtraDataLink(displayAllVars.url, displayAllVars.basicAuthKey, - displayAllVars.datasetType, - data[i].name, - displayAllVars.datasetPKValue, dsnDivName); - - extraDataNamesVar += '
'; - extraDataNamesVar += '
'; - } - $('#' + displayAllVars.datasetTypeDiv).html(extraDataNamesVar); - for ( var i in data) { - var dsnDivName = generateDsnDivName(displayAllVars.datasetType, i, - displayAllVars.datasetTypeDiv); - viewExtraData(displayAllVars.url, displayAllVars.basicAuthKey, displayAllVars.datasetType, - data[i].name, - displayAllVars.datasetPKValue, dsnDivName); - } - - }; - - displayAllErrorFunction = function(jqXHR, textStatus, errorThrown) { - alert(jqXHR.responseText); - }; - - function displayAllExtraData(url, basicAuthKey, datasetType, datasetPKValue, - datasetTypeDiv, headingPrefix, headingClass, labelClass, valueClass) { - - displayAllVars = { - url : url, - basicAuthKey : basicAuthKey, - datasetType : datasetType, - datasetPKValue : datasetPKValue, - datasetTypeDiv : datasetTypeDiv, - headingPrefix : headingPrefix, - headingClass : headingClass, - labelClass : labelClass, - valueClass : valueClass - }; - - displayAllUrl = url + "additionalfields?type=" + encodeURIComponent(datasetType); - getData(displayAllUrl, basicAuthKey, displayAllSuccessFunction, displayAllErrorFunction); - } - - function editExtraDataLink(url, basicAuthKey, datasetType, datasetName, datasetPKValue, - dsnDivName) { - - var popupVar = "jQuery.stretchyData.popupEditDialog('" + url + "', '" + basicAuthKey + "', '" - + datasetType + "', '" + datasetName + "', " + datasetPKValue - + ", '" + dsnDivName + "', '" + doI18N("Edit") + " " - + doI18N(datasetName) + "', 900, 500)"; - var editLink = '' - + doI18N("Edit") + '
'; - // alert(editLink); - return editLink; - } - - function viewExtraDataset(data, dsnDivName) { - - var dataLength = data.data.length; - var extraDataViewVar = ''; - - var colsPerRow = 2; - var colsPerRowCount = 0; - var labelClassStr = ""; - var valueClassStr = ""; - if (displayAllVars.labelClass > "") - labelClassStr = ' class="' + displayAllVars.labelClass + '" '; - if (displayAllVars.valueClass > "") - valueClassStr = ' class="' + displayAllVars.valueClass + '" '; - - for ( var i in data.columnHeaders) { - if (!(data.columnHeaders[i].columnName == "id")) { - colsPerRowCount += 1; - if (colsPerRowCount > colsPerRow) { - extraDataViewVar += ''; - colsPerRowCount = 1; - } - var colVal = ""; - if (dataLength > 0) - colVal = data.data[0].row[i]; - if (colVal == null) - colVal = ""; - - if (colVal > "" && data.columnHeaders[i].columnType == "Text") - colVal = ''; - extraDataViewVar += ''; - } - } - extraDataViewVar += '
' + doI18N(data.columnHeaders[i].columnName) - + ':' + colVal + '
'; - $('#' + dsnDivName).html(extraDataViewVar); - // alert(dsnDivName + ": " + dsnDivName + extraDataViewVar); - } - ; - viewExtraDataErrorFunction = function(jqXHR, textStatus, errorThrown) { - alert("err: " + jqXHR.responseText); - }; - - function viewExtraData(url, basicAuthKey, datasetType, datasetName, datasetPKValue, dsnDivName) { - var viewExtraDataUrl = url + "additionalfields/" - + encodeURIComponent(datasetType) + "/" - + encodeURIComponent(datasetName) + "/" - + encodeURIComponent(datasetPKValue); - - var evalViewExtraDataSuccessFunction = "var viewExtraDataSuccessFunction = function(data, textStatus, jqXHR){ viewExtraDataset(data, '" - + dsnDivName + "'); };" - eval(evalViewExtraDataSuccessFunction); - getData(viewExtraDataUrl, basicAuthKey, viewExtraDataSuccessFunction, viewExtraDataErrorFunction); - } - - popupEditErrorFunction = function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - }; - popupEditSuccessFunction = function(data, textStatus, jqXHR) { - currentEditPopup.dialogDiv.append(extraDataBuildTemplate(data)); - extraDataOpenDialog(currentEditPopup.url, currentEditPopup.basicAuthKey); - extraDataFormatDates(data.columnHeaders); - }; - - function popupEditDialog(url, basicAuthKey, datasetType, datasetName, datasetPKValue, dsnDivName, title, width, height) { - - currentEditPopup = { - dialogDiv : $("
"), - dsnDivName : dsnDivName, - title : title, - width : width, - height : height, - datasetType : datasetType, - datasetName : datasetName, - datasetPKValue : datasetPKValue, - baseUrl : url, - basicAuthKey : basicAuthKey, - url : url + "additionalfields/" - + encodeURIComponent(datasetType) + "/" - + encodeURIComponent(datasetName) + "/" - + encodeURIComponent(datasetPKValue) - }; - getData(currentEditPopup.url, currentEditPopup.basicAuthKey, popupEditSuccessFunction, popupEditErrorFunction); - } - - function generateDsnDivName(datasetType, i, uniqueDivid) { - return extraDataUnderscore(datasetType) + "_" + i + "_" - + extraDataUnderscore(uniqueDivid); - } - - /* start of code to fill data in edit form */ - - function extraDataUnderscore(colName) { - return colName.replace(/ /g, "_") - } - - function extraDataColDisplayHTML(colName, colType, colLength, - colDisplayType, colAllowedValues, colVal) { - var displayHTML = ''; - var valueAttr = "" - if (colVal != null) - valueAttr = 'value="' + colVal.replace(/"/g, """) + '"'; - var colNameUnderscore = extraDataUnderscore(colName); - - switch (colType) { - case "String": - var colAllowedValuesLength = colAllowedValues.length; - if (colDisplayType != "List") { - var colSize = 40; - if (colLength < colSize) - colSize = colLength; - displayHTML += '' - } else - displayHTML += extraDataSelectTag(colNameUnderscore, - colAllowedValues, colVal); - break; - case "Text": - var textVal = ""; - if (colVal != null) - textVal = colVal; - displayHTML += ''; - break; - case "Date": - displayHTML += ''; - break; - case "Decimal": - displayHTML += ''; - break; - case "Integer": - displayHTML += ''; - break; - default: - displayHTML += "'" + colType + "'"; - } - displayHTML += ''; - return displayHTML; - } - - function extraDataSelectTag(colName, colAllowedValues, colVal) { - - var selectedVal = ""; - var selectHtml = ''; - // alert(selectHtml); - return selectHtml; - } - - function extraDataBuildTemplate(data) { - - var dataLength = data.data.length; - - var extraDataTemplateVar = '
'; - extraDataTemplateVar += ''; - - var colsPerRow = 2; - var colsPerRowCount = 0; - - for ( var i in data.columnHeaders) { - - if (!(data.columnHeaders[i].columnName == "id")) { - colsPerRowCount += 1; - if (colsPerRowCount > colsPerRow) { - extraDataTemplateVar += ''; - colsPerRowCount = 1; - } - var colVal = ""; - if (dataLength > 0) - colVal = data.data[0].row[i]; - extraDataTemplateVar += extraDataColDisplayHTML( - data.columnHeaders[i].columnName, - data.columnHeaders[i].columnType, - data.columnHeaders[i].columnLength, - data.columnHeaders[i].columnDisplayType, - data.columnHeaders[i].columnValues, colVal); - } - } - extraDataTemplateVar += ''; - return extraDataTemplateVar += '
'; - } - - function extraDataFormatDates(columnHeaders) { - - for ( var i in columnHeaders) { - // alert("in loop: " + - // extraDataUnderscore(columnHeaders[i].columnName) + " Type: " + - // columnHeaders[i].columnType); - switch (columnHeaders[i].columnType) { - case "Date": - $('#' + extraDataUnderscore(columnHeaders[i].columnName)) - .datepicker({ - - changeMonth : true, - changeYear : true, - dateFormat : 'yy-mm-dd' - }); - - break; - default: - } - } - } - - $.fn.serializeObject = function() { - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name] !== undefined) { - if (!o[this.name].push) { - o[this.name] = [ o[this.name] ]; - } - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - }); - return o; - }; - - function extraDataOpenDialog(url, basicAuthKey) { - - // var saveButton = jQuery.i18n.prop('dialog.button.save'); - // var cancelButton = jQuery.i18n.prop('dialog.button.cancel'); - var saveButton = "save"; - var cancelButton = "cancel" - - var buttonsOpts = {}; - buttonsOpts[saveButton] = function() { - $('.multiSelectedItems option').each(function(i) { - $(this).attr("selected", "selected"); - }); - - var form_data = JSON.stringify($('#entityform').serializeObject()); - - var jqxhr = $.ajax({ - url : url, - type : 'POST', - contentType : "application/json; charset=utf-8", - dataType : 'json', - data : form_data, - cache : false, - beforeSend : function(xhr) { - console.log("base64: " + basicAuthKey); - xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey); - }, - success : function(data, textStatus, jqXHR) { - currentEditPopup.dialogDiv.dialog("close"); - viewExtraData(currentEditPopup.baseUrl, basicAuthKey, - currentEditPopup.datasetType, - currentEditPopup.datasetName, - currentEditPopup.datasetPKValue, - currentEditPopup.dsnDivName) - }, - error : function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - } - }); - }; - - buttonsOpts[cancelButton] = function() { - $(this).dialog("close"); - }; - - currentEditPopup.dialogDiv - .dialog( - { - // title: jQuery.i18n.prop(titleCode), - title : currentEditPopup.title, - width : currentEditPopup.width, - height : currentEditPopup.height, - modal : true, - buttons : buttonsOpts, - close : function() { - // if i dont do this, theres a problem with - // errors being appended to dialog view second - // time round - $(this).remove(); - }, - open : function(event, ui) { - $('.multiadd') - .click( - function() { - return !$( - '.multiNotSelectedItems option:selected') - .remove() - .appendTo( - '#selectedItems'); - }); - - $('.multiremove') - .click( - function() { - return !$( - '.multiSelectedItems option:selected') - .remove() - .appendTo( - '#notSelectedItems'); - }); - } - }).dialog('open'); - } - - /* end of code to fill data in edit form and display it */ - - function getData(url, basicAuthKey, successFunction, errorFunction) { - - $.ajax({ - url : url, - type : 'GET', - contentType : "application/json; charset=utf-8", - dataType : 'json', - cache : false, - beforeSend : function(xhr) { - console.log("base64: " + basicAuthKey); - xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey); - }, - success : successFunction, - error : errorFunction - }); - } - - function handleXhrError(jqXHR, textStatus, errorThrown, templateSelector, - placeholderDiv) { - - if (jqXHR.status === 0) { - alert('Not connect.\n Verify Network.'); - } else if (jqXHR.status == 404) { - alert('Requested page not found. [404]'); - } else if (jqXHR.status == 500) { - alert('Internal Server Error [500].'); - } else if (errorThrown === 'parsererror') { - alert('Requested JSON parse failed.'); - } else if (errorThrown === 'timeout') { - alert('Time out error.'); - } else if (errorThrown === 'abort') { - alert('Ajax request aborted.'); - } else { - // remove error class from all input fields - var $inputs = $('#entityform :input'); - - $inputs.each(function() { - $(this).removeClass("ui-state-error"); - }); - - $(placeholderDiv).html(""); - - var jsonErrors = JSON.parse(jqXHR.responseText); - - var errorArray = new Array(); - var arrayIndex = 0; - $.each(jsonErrors, function() { - var fieldId = '#' + this.field; - $(fieldId).addClass("ui-state-error"); - - var errorObj = new Object(); - errorObj.field = this.field; - errorObj.code = this.code; - errorObj.message = this.code; - errorObj.value = this.value; - - errorArray[arrayIndex] = errorObj; - arrayIndex++ - }); - - var templateArray = new Array(); - var templateErrorObj = new Object(); - templateErrorObj.title = "You have the following errors:"; - templateErrorObj.errors = errorArray; - - templateArray[0] = templateErrorObj; - - var formErrorsHtml = $(templateSelector).render(templateArray); - - $(placeholderDiv).append(formErrorsHtml); - } - } - - function doI18N(xlateStr, params) { - /* - * if (I18N_Needed == "Y") { if (highlightMissingXlations == "Y") return - * jQuery.i18n.prop(xlateStr, params) else { var xlated = - * jQuery.i18n.prop(xlateStr, params); if (xlated.substr(0,1) == "[" && - * xlated.substr(xlated.length - 1, 1) == "]") return xlated.substr(1, - * xlated.length - 2) else return xlated; } } else { var retStr = - * xlateStr; if (retStr == 'rpt_select_one') retStr = 'Select One'; if - * (retStr == 'rpt_select_all') retStr = 'Select All'; return retStr; } - */ - return xlateStr; - } - -})(jQuery); diff --git a/tempjpw/resources/stretchyreporting/dots64.gif b/tempjpw/resources/stretchyreporting/dots64.gif deleted file mode 100644 index 3980ff00b..000000000 Binary files a/tempjpw/resources/stretchyreporting/dots64.gif and /dev/null differ diff --git a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages.properties b/tempjpw/resources/stretchyreporting/mifosngbundle/Messages.properties deleted file mode 100644 index ba07f6335..000000000 --- a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages.properties +++ /dev/null @@ -1,44 +0,0 @@ - -#Messages -appropriateValues = Please select appropriate values -appropriateDateValues = Please enter appropriate date values -invalidDate = Invalid Date: -startAfterEndDate = Start Date is After End Date -reportingInitError = Reporting Initialise Error: parameter {0} Mandatory - -#Labels -rpt_run = Run -rpt_clear = Clear -rpt_select_one = Select One -rpt_select_all = All - -Report = Report -Office = Office -startDate = Start Date -endDate = End Date - - -#Screen Reports/Screen Charts/Pentaho Reports -ListClientLoans = List Client Loans -ListClients = List Clients - - -#ListClientLoans -Name = Client -current_state_enum = Status Id -installments = No. of Installments -interest_rate_peryear = Interest Rate Per Annum -principal_currency_code = Currency -principal_amount = Principal -submittedon_date = Submitted -approvedon_date = Approved -expected_disbursedon_date = Expected Disbursal -expected_firstrepaymenton_date = Expected 1st Repayment -expected_maturedon_date = Expected Maturity -disbursedon_date = Disbursal -closedon_date = Closed -withdrawnon_date = Withdrawn -rejectedon_date = Rejected -rescheduledon_date = Rescheduled -writtenoffon_date = Written Off - diff --git a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_en-US.properties b/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_en-US.properties deleted file mode 100644 index 5932cbb9f..000000000 --- a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_en-US.properties +++ /dev/null @@ -1,2 +0,0 @@ - -appropriateValues = Please select appropriate values \ No newline at end of file diff --git a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_en.properties b/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_en.properties deleted file mode 100644 index 5932cbb9f..000000000 --- a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_en.properties +++ /dev/null @@ -1,2 +0,0 @@ - -appropriateValues = Please select appropriate values \ No newline at end of file diff --git a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_sr.properties b/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_sr.properties deleted file mode 100644 index d6b2ac4bc..000000000 --- a/tempjpw/resources/stretchyreporting/mifosngbundle/Messages_sr.properties +++ /dev/null @@ -1,39 +0,0 @@ - -#Messages -appropriateValues = Just put the right values in -invalidDate = Bad Date Mate: -startAfterEndDate = Start Date is After End Date - -#Labels -rpt_run = Kick It -rpt_clear = Rubbed Out -rpt_select_one = Pick 1 Mate -rpt_select_all = Kit n Kaboodle - -Report = Tell Me -Office = Big End of Town -startDate = Start It Here -endDate = End It Here - - -#Screen Reports/Screen Charts/Pentaho Reports -ActiveLoansLastInstallment = Nearly Finished -ActiveLoanSummaryBranch = Loan Summary -AgingSummary = Aging and Aging -CustomerDetails = Custmer Detawls - - -#ActiveLoansLastInstallment Column Headers -center_name = Centa -group_name = Growp -client_name = Cliyant -loan_amount = Laun Amownt -office_name = Orfice - -#ActiveLoanSummaryBranch Column Headers -branch = Braanch -amount_arrears = Amount up the Creek - -#AgingSummary Column Headers -weeks_in_arrears = Weeks up the Creek -transaction_type = Txn Typo \ No newline at end of file diff --git a/tempjpw/resources/stretchyreporting/stretchyreporting-0.987.js b/tempjpw/resources/stretchyreporting/stretchyreporting-0.987.js deleted file mode 100644 index 6d29983c8..000000000 --- a/tempjpw/resources/stretchyreporting/stretchyreporting-0.987.js +++ /dev/null @@ -1,1369 +0,0 @@ -(function($) { - -$.stretchyReporting = {}; - -$.stretchyReporting.initialise = function(params) { - initialiseReporting(params) - }; - -$.stretchyReporting.newReportSelected = function(selectedRpt) { - newReportSelected(selectedRpt); - }; - -$.stretchyReporting.showTypeChanged = function() { - showTypeChanged(); - }; - -$.stretchyReporting.clearLoadingImg = function() { - clearLoadingImg(); - }; - -$.stretchyReporting.nothingCallback = function() { - // nothing - }; - -$.stretchyReporting.changeLanguage = function(newLanguage) { - changeLanguage(newLanguage) - }; - -$.stretchyReporting.changeDecimals = function(newDecimals) { - changeDecimals(newDecimals) - }; - -$.stretchyReporting.changeSeparator= function(sepChar, decChar, indFormat) { - changeSeparator(sepChar, decChar, indFormat) - }; - -function fnRecordsDisplay(){ -// oSettings isn't defined when table first created but coding around to not -// call this method until after it is. - // if (typeof(oSettings) != "undefined") return oSettings.fnRecordsDisplay() - // else return 0; - return oSettings.fnRecordsDisplay(); -} - - -function initialiseReporting(params) { - - tableSizeLimit = setTableSizeLimit(); - - showMsg("Table size limit is: " + tableSizeLimit ); - - nullTitleValue = "-99999999.11"; - - resValue = ''; - if (params.resValue) resValue = params.resValue; - - I18N_Needed = 'Y'; - if (params.I18N_Needed) I18N_Needed = params.I18N_Needed; - - bundleDir = 'bundle/'; - if (params.bundleDir) bundleDir = params.bundleDir; - - - highlightMissingXlations = "Y"; - if (params.highlightMissingXlations) highlightMissingXlations = params.highlightMissingXlations; - - if (params.initialLanguage) initI18N(params.initialLanguage); - else initI18N(""); - - if (params.reportOutputDiv) $('#' + params.reportOutputDiv).html('
'); - else - { - alert(doI18N("reportingInitError", ['reportOutputDiv'])); - return; - } - - rptDB = "" - if (params.rptDB) rptDB = params.rptDB; - - if (params.RESTUrl) RESTUrl = params.RESTUrl - else RESTUrl = ""; - - if (params.basicAuthKey) basicAuthKey = params.basicAuthKey - else basicAuthKey = ""; - - if (params.pentahoUrl) pentahoUrl = params.pentahoUrl - else pentahoUrl = ""; - - loadingImg = "dots64.gif"; - if (params.loadingImg) loadingImg = params.loadingImg; - - if (params.reportsListDiv) reportsListDiv = '#' + params.reportsListDiv; - else - { - alert(doI18N("reportingInitError", ['reportsListDiv'])); - return; - } - $(reportsListDiv).html(''); - reportsListDivLabel = 'Report'; - - if (params.inputParametersDiv) inputParametersDiv = '#' + params.inputParametersDiv; - else - { - alert(doI18N("reportingInitError", ['inputParametersDiv'])); - return; - } - - if (params.runReportDiv) runReportDiv = '#' + params.runReportDiv; - else - { - alert(doI18N("reportingInitError", ['runReportDiv'])); - return; - } - - if (params.clearReportDiv) clearReportDiv = '#' + params.clearReportDiv; - else - { - alert(doI18N("reportingInitError", ['clearReportDiv'])); - return; - } - - if (params.apiKey || params.sharedSecret || params.accessToken || params.tokenSecret) - { - showMsg("OAuth params passed"); - isAuthRequest = true; - if ((params.apiKey == null) || (params.sharedSecret == null) || (params.accessToken == null) || (params.tokenSecret == null)) - { - alert("Each of apiKey, sharedSecret, accessToken and tokenSecret must be passed as parameters"); - return; - } - apiKey = params.apiKey; - sharedSecret = params.sharedSecret; - accessToken = params.accessToken; - tokenSecret = params.tokenSecret; - } - else - { - isAuthRequest = false; - showMsg("OAuth params were not passed"); - } - - -// google charts - google.load("visualization", "1", {packages:["corechart"]}); - // google.load('visualization', '1', {packages:['table']}); - - reportListing = []; - listOfParameters = []; - - setupButtons(); - initialiseSuccessFunctionVariables(); - initialiseDataTableDef(); - - decimalsNo = 4; - if (params.decimals) decimalsNo = params.decimals; - - separatorChar = ','; - if (params.separatorChar) separatorChar = params.separatorChar; - - dbDecimalChar = "."; - decimalChar = "."; - if (params.decimalChar) decimalChar = params.decimalChar; - - indianFormat = false; - if (params.indianFormat) indianFormat = params.indianFormat; - - - reportQuery = 'FullReportList'; - if (params.reportQuery) reportQuery = params.reportQuery; - - getReportData(reportQuery, {}, setupReportListSuccess, true) -} - -function setCurrentDate() { - var xxDate = new Date(); - return xxDate.getFullYear() + "-" + pad2(xxDate.getMonth() + 1) + "-" + pad2(xxDate.getDate()); -} - -function pad2(number) { - return (number < 10 ? '0' : '') + number -} - -function formatNumber(nStr) -{ -// format no. of decimal places - var mainNum; - if (decimalsNo < 0) - { - mainNum = (nStr / Math.pow(10, Math.abs(decimalsNo))).toFixed(0); - } - else mainNum = nStr.toFixed(decimalsNo); - - if (indianFormat == true) return indianFormatNumber(mainNum) - else return generalFormatNumber(mainNum); -} - -// function for converting string into indian currency format -function indianFormatNumber(inNum) { - - var mainNum = inNum + ''; - var signStr = ""; - if (inNum < 0) - { - signStr = "-"; - mainNum = mainNum.substr(1); - } - - - var dpos = mainNum.indexOf(dbDecimalChar); - var nStrEnd = ''; - if (dpos != -1) { - nStrEnd = decimalChar + mainNum.substring(dpos + 1, mainNum.length); - mainNum = mainNum.substring(0, dpos); - } - - - var remLength = mainNum.length; - if (remLength > 3) - { - var strArray = []; - var biteSize = 3; - - strArray.push(mainNum.substr(remLength - biteSize , biteSize)); - mainNum = mainNum.substr(0, remLength - biteSize); - - biteSize = 2; - do - { - remLength = mainNum.length; - if (remLength < 2) biteSize = 1; - strArray.push(mainNum.substr(remLength - biteSize , biteSize)); - if (remLength > biteSize) mainNum = mainNum.substr(0, remLength - biteSize); - } - while (remLength > biteSize); - - mainNum = ""; - var arrLen = strArray.length - 1; - for (i = arrLen; i >= 0; i -= 1) - { - if (i < arrLen) mainNum += separatorChar; - mainNum += strArray[i]; - } - } - return signStr + mainNum + nStrEnd; -} - -function generalFormatNumber(inNum) { - - var mainNum = inNum + ''; - if (separatorChar != "") - { - var dpos = mainNum.indexOf(dbDecimalChar); - var nStrEnd = ''; - if (dpos != -1) { - nStrEnd = decimalChar + mainNum.substring(dpos + 1, mainNum.length); - mainNum = mainNum.substring(0, dpos); - } - var rgx = /(\d+)(\d{3})/; - while (rgx.test(mainNum)) { - mainNum = mainNum.replace(rgx, '$1' + separatorChar + '$2'); - } - return mainNum + nStrEnd; - } - else return mainNum; // no separator format - -} - -function getOrigTitleNumericValue(titleNumericValue) { - var returnVal = titleNumericValue.substr(13); - dblQuotePos = returnVal.indexOf('"'); - return Number(returnVal.substr(0, dblQuotePos)); -} - -function invalidDate(checkDate) { -// validates for yyyy-mm-dd returns true if invalid, false is valid -var dateformat = /^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/; - - if(!(dateformat.test(checkDate))) { - return true; - } - else - { - var dyear = checkDate.substring(0,4); - var dmonth = checkDate.substring(5,7) - 1; - var dday = checkDate.substring(8); - - var newDate=new Date(dyear,dmonth ,dday); - return !((dday==newDate.getDate()) && (dmonth==newDate.getMonth()) && (dyear==newDate.getFullYear())); - } -} - -function setupButtons() { - $(runReportDiv).button(); - $(runReportDiv).button({ label: doI18N("rpt_run") }); - $(runReportDiv).click(function() { - runTheReport(); - }); - - $(clearReportDiv).button(); - $(clearReportDiv).button({ label: doI18N("rpt_clear") }); - $(clearReportDiv).click(function() { - clearTheReport(); - }); - - disableRunButton(); - disableClearButton(); -} - -function clearTheReport() { - $('#StretchyReportOutput').html(""); - $('.DTTT_collection').remove(); - disableClearButton(); -} - -function enableClearButton() { - $(clearReportDiv).button( "option", "disabled", false ); -} - -function disableClearButton() { - $(clearReportDiv).button( "option", "disabled", true ); -} - -function enableRunButton() { - $(runReportDiv).button( "option", "disabled", false ); -} - -function disableRunButton() { - $(runReportDiv).button( "option", "disabled", true ); -} - - -function getReportListingIndexSelectedReport() { - - var selectedRpt = $(reportsListDiv + ' select option:selected').val(); - return getReportListingIndex(selectedRpt); -} - - -function getReportListingIndex(reportOption) { - - for (var i in reportListing) - { - if (reportListing[i].name == reportOption) - { - return i; - } - } - - var returnMessage = "Report Option not Found: " + reportOption; - alert(returnMessage); - return "returnMessage"; -} - - -function hideAllParameters() { - - clearTheReport(); - - for (var i in listOfParameters) - { - $("#" + listOfParameters[i].name).css("display", "none"); - } - $("#rptOutputType").css("display", "none"); - $("#rptShowType").css("display", "none"); -} - -function makeSelectTag(selectTagParams, selectOne, selectAll, xlateText) { - -var selectHtml = '
' + doI18N(selectTagParams.label) + '
'; - selectHtml = selectHtml + ''; - $(selectTagParams.divName).html(selectHtml ); - $(selectTagParams.divName + ' select option:eq(0)').attr('selected', 'selected'); -} - - -function newReportSelected(selectedRpt) { - - hideAllParameters(); - - if (!(selectedRpt == "0")) - { - enableRunButton(); - var reportListingIndex = getReportListingIndex(selectedRpt); - var isParam = false; - for (var i in reportListing[reportListingIndex].parameters) - { - isParam = true; - $('#' + reportListing[reportListingIndex].parameters[i][1]).css("display", "inline"); - } - - if (reportListing[reportListingIndex].type == 'Pentaho') $("#rptOutputType").css("display", "inline"); - if (reportListing[reportListingIndex].type == 'Table') $("#rptShowType").css("display", "inline"); - - if (isParam == false) runTheReport(); - } - else disableRunButton(); - -} - -function showTypeChanged() { - - if ($(reportsListDiv + ' select option:selected').val() != "0") runTheReport() - else showMsg("was select one"); - -} - -function runTheReport() -{ - var selectedRpt = $(reportsListDiv + ' select option:selected').val(); - - clearTheReport(); - - var reportListingIndex = getReportListingIndexSelectedReport(); - - if (parameterValidationErrors(reportListing[reportListingIndex].parameters) == 1) - { - return; - } - - var theParams = {}; - - var pValue; - var reportParameterName; - for (var i in reportListing[reportListingIndex].parameters) - { - var paramDetails = getParameterDetailsUsingName(reportListing[reportListingIndex].parameters[i][1]); - switch(paramDetails.displayType) - { - case "select": - pValue = $('#' + paramDetails.name+ ' select option:selected').val(); - break; - case "date": - pValue = $('#' + paramDetails.variable).val(); - break; - default: - alert("System Error: Unknown Display Type: " + paramDetails.displayType); - } - - if (reportListing[reportListingIndex].type == 'Pentaho') reportParameterName = reportListing[reportListingIndex].parameters[i][0] - else reportParameterName = paramDetails.variable; - - // alert("Variable: " + reportParameterName + " Value: " + pValue); - theParams[reportParameterName] = pValue ; - } - - $('#StretchyReportOutput').html('

'); - - - - var showOption = $('#rptShowType option:selected').val(); - switch(reportListing[reportListingIndex].type) - { - case "Table": - if (showOption == "XLS") getExportCSV(selectedRpt, theParams, false) - else - { - reportDataSuccess = function(data, textStatus, jqXHR){ - createTable(data); - showTableReport(); - }; - getReportData(selectedRpt, theParams, reportDataSuccess, false); - } - break; - case "Chart": - reportDataSuccess = function(data, textStatus, jqXHR){ - createTable(data); - createChart(data); - showChartReport(reportListing[reportListingIndex].subtype); - }; - getReportData(selectedRpt, theParams, reportDataSuccess, false); - break; - case "Pentaho": - getPentahoReport(selectedRpt, theParams); - break; - - default: - alert("System Error: Unknown Report Type: " + reportListing[reportListingIndex].type); - } - - enableClearButton(); -} - - - - -function initialiseAllParameters() { - -var parameterTableHtml = ''; - - for (var i in listOfParameters) - { - switch(listOfParameters[i].displayType) - { - case "select": - parameterTableHtml += ''; - break; - case "date": - parameterTableHtml += ''; - break; - default: - alert("System Error: Unknown Display Type: " + listOfParameters[i].displayType); - return 1; - } - } - - parameterTableHtml += ''; - parameterTableHtml += ''; - parameterTableHtml += '
' + doI18N(listOfParameters[i].label) + '
'; - parameterTableHtml += '
'; - - $(inputParametersDiv).html(parameterTableHtml); - -// set the initial values for parameters - for (var i in listOfParameters) - { - parameterTableHtml = parameterTableHtml + ' '; - - switch(listOfParameters[i].displayType) - { - case "select": - break; - case "date": - - $('#' + listOfParameters[i].variable).datepicker({ - changeMonth: true, - changeYear: true, - dateFormat: 'yy-mm-dd' - }); - var tmpDate; - switch(listOfParameters[i].defaultVal) - { - case "today": - tmpDate = setCurrentDate(); - break; - case "fromstart": - tmpDate = "1900-01-01"; - break; - default: - tmpDate = listOfParameters[i].defaultVal; - } - $('#' + listOfParameters[i].variable).val(tmpDate); - break; - default: - alert("System Error: Unknown Display Type: " + listOfParameters[i].displayType); - return 1; - } - } - - hideAllParameters(); - - -// Populate all select (drop down list box) parameters - for (var i in listOfParameters) - { - if (listOfParameters[i].displayType == 'select') - { - var selectOne = 'false'; - var selectAll = 'false'; - if (listOfParameters[i].selectOne == 'Y') selectOne = 'true'; - if (listOfParameters[i].selectAll == 'Y') selectAll = 'true'; - - eval(generateSelectSuccessVariable(listOfParameters[i].name, listOfParameters[i].label, selectOne, selectAll)); - - getReportData(listOfParameters[i].name, {}, selectSuccess, true) - } - } - -} - - - -function initialiseSuccessFunctionVariables(){ -var tmpRow; -setupParameterListSuccess = function(data, textStatus, jqXHR){ - showMsgE("In setupParameterListSuccess "); - - for (var i in data.data ) - { - tmpRow = { - name: data.data[i].row[0], - variable: data.data[i].row[1], - label: data.data[i].row[2], - displayType: data.data[i].row[3], - formatType: data.data[i].row[4], - defaultVal: data.data[i].row[5], - selectOne: data.data[i].row[6], - selectAll: data.data[i].row[7] - } - listOfParameters.push(tmpRow); - } - initialiseAllParameters(); - }; - -setupReportListSuccess = function(data, textStatus, jqXHR){ - showMsgE("In setupReportListSuccess"); - getReportData('FullParameterList', {}, setupParameterListSuccess, true); - - var prevId = -1; - var currId; - var tmpParameters; - for (var i in data.data ) // create reportListing array - { - currId = data.data[i].row[0] - if (currId != prevId) - { - tmpParameters = []; - if (!(data.data[i].row[5] == null)) - { - tmpParam = []; - tmpParam.push(data.data[i].row[6]); - tmpParam.push(data.data[i].row[7]); - tmpParameters.push(tmpParam); - } - tmpRow = { - id: data.data[i].row[0], - name: data.data[i].row[1], - type: data.data[i].row[2], - subtype: data.data[i].row[3], - category: data.data[i].row[4], - parameters: tmpParameters - } - reportListing.push(tmpRow); - prevId = currId; - - } - else - { - tmpParam = []; - tmpParam.push(data.data[i].row[6]); - tmpParam.push(data.data[i].row[7]); - reportListing[(reportListing.length - 1)].parameters.push(tmpParam); - } - } - - - var reportSelectData = []; - for (var i in reportListing) - { - reportSelectData.push({id: reportListing[i].name, name: reportListing[i].name}); - } - var listOfReportsTag = {divName: reportsListDiv, - label: reportsListDivLabel, - selectOnClick: 'jQuery.stretchyReporting.newReportSelected(options[selectedIndex].value)', - selectData: reportSelectData - } - - makeSelectTag(listOfReportsTag, true, false, true); - }; -} - -function copyXLSon() { - showMsg("Turning them on"); - $('#ToolTables_RshowTable_0').css('display', 'inline'); - $('#ToolTables_RshowTable_1').css('display', 'inline'); - ttInstances = TableTools.fnGetMasters(); - for (i in ttInstances) { - ttInstances[i].that.fnResizeButtons(); - } - filteredCopyXLSon = true; - -} - -function copyXLSoff() { - showMsg("Turning them off"); - $('#ToolTables_RshowTable_0').css('display', 'none'); - $('#ToolTables_RshowTable_1').css('display', 'none'); - filteredCopyXLSon = false; -} - -function applyFilterRules() { - - if (maxRowsForCopyandXLS >= fnRecordsDisplay()) - { - showMsg("Max: " + maxRowsForCopyandXLS + " >= " + fnRecordsDisplay()); - if (filteredCopyXLSon == true) showMsg("copy xls on - so no need to do anything") - else - { - showMsg("copy xls off - so can turn back on"); - copyXLSon(); - oTable.fnDraw(); - } - } - else - { - showMsg("Max: " + maxRowsForCopyandXLS + " < " + fnRecordsDisplay()); - if (filteredCopyXLSon == true) - { - showMsg("copy xls on - so have to turn off"); - copyXLSoff(); - oTable.fnDraw(); - } - else showMsg("copy xls off - so no need to do anything"); - } - -} - -function initialiseDataTableDef() { -dataTableDef = { - // "sDom": 'lfTip<"top"<"clear">>rtlfTip<"bottom"<"clear">>', - "sDom": 'lfTip<"top"<"clear">>rt', - "oTableTools": { - "aButtons": [{ "sExtends": "copy", - "sButtonText": doI18N("Copy to Clipboard") - }, - { "sExtends": "xls", - "sButtonText": doI18N("Save to CSV") - } - // { - // "sExtends": "print", - // "sButtonText": doI18N("Print") - // } - ], - "sSwfPath": resValue + "DataTables-1.8.2/extras/TableTools/media/swf/copy_cvs_xls.swf" - }, - - "aaData": [], - "aoColumns": [], - "sPaginationType": "full_numbers", - "bDeferRender": true, - "bProcessing": true, - "aLengthMenu": [[5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"]] - // "bJQueryUI": true - } - -} - - -function generateSelectSuccessVariable(paramName, paramLabel, selectOne, selectAll) { - -return 'var selectSuccess = function(data, textStatus,jqXHR){' + - ' var selectData = [];' + - ' for (var i in data.data )' + - ' {' + - 'selectData.push({id: data.data[i].row[0], name: data.data[i].row[1]});' + - ' }' + - " selectTagParams = {divName: '#" + paramName + "'," + - "label: '" + paramLabel + "'," + - "selectOnClick: '$.stretchyReporting.nothingCallback()'," + - "selectData: selectData " + - '};' + - ' makeSelectTag(selectTagParams, ' + selectOne + ', ' + selectAll + ', false);' + - '};'; - -} - - -function createChart(theData) { - - RData = new google.visualization.DataTable(); - RData.addColumn('string', dataTableDef.aoColumns[0].sTitle); - RData.addColumn('number', dataTableDef.aoColumns[1].sTitle); - RData.addRows(dataTableDef.aaData.length); - - var ii = 0; - var numberData; - var dblQuotePos; - for (var i in dataTableDef.aaData) - { - RData.setValue(ii, 0, dataTableDef.aaData[i][0]); - - if (dataTableDef.aoColumns[1].sType == "title-numeric" && dataTableDef.aaData[i][1].substr(0, 11) == '' + ""; - else - { - convNum = formatNumber(parseFloat(tmpVal)); - tmpVal = '' + convNum; - } - break; - default: - alert("System Error - Type not Found: " + tableColumns[j].sType); - } - tmpArr.push(tmpVal); - } - tableData.push(tmpArr); - } - - maxRowsForCopyandXLS = Math.round(tableSizeLimit / (tableColumns.length)); - showMsg("Setting at Start maxRowsForCopyandXLS: " + maxRowsForCopyandXLS ); - filteredCopyXLSon = true; - - dataTableDef.aaData = tableData; - dataTableDef.aoColumns= tableColumns; - dataTableDef.aaSorting = []; - dataTableDef.fnDrawCallback = function() { - showMsg( 'DataTables has redrawn the table' ); - if (isNewTable == false) applyFilterRules() - else isNewTable = false; - }; - -} - -function convertCRtoBR(str) { - return str.replace(/(\r\n|[\r\n])/g, "
"); -} - -function showTableReport() { - isNewTable = true; - $('#StretchyReportOutput').html( '
' ); - oTable = $('#RshowTable').dataTable(dataTableDef); - oSettings = oTable.fnSettings(); - - showMsg("1st recs displayed is: " + fnRecordsDisplay()); - applyFilterRules(); -} - - -function showChartReport(rptSubType) { -/* - * $('#StretchyReportOutput').html( '
' ); - * $('#RshowTable').dataTable(dataTableDef); - */ - - $('#StretchyReportOutput').html( '
' ); - - -var options; -var Rchart; - - switch(rptSubType) - { - case "Pie": - options = { - legend: 'right', is3D: true, - width: 1000, height: 600 - // chartArea: {left:0,top:0, width:"100%",height:"100%"} - }; - - Rchart = new google.visualization.PieChart(document.getElementById('RshowChart')); - Rchart.draw(RData, options); - break; - case "Bar": - options = { - width: 1000, height: 600 - // vAxis: {title: 'xxxxxxx', titleTextStyle: {color: - // 'red'}} - // chartArea: {left:0,top:0, width:"100%",height:"100%"} - }; - - Rchart = new google.visualization.BarChart(document.getElementById('RshowChart')); - Rchart.draw(RData, options); - break; - default: - alert("System Error: Unknown Chart Type: " + rptSubType); - } - - - - - -/* - * var Rchart = new - * google.visualization.PieChart(document.getElementById('RshowChart')); - * Rchart.draw(RData, {legend: 'right', is3D: true, width: 400, height: 500, - * chartArea: {left:0,top:0, width:"100%",height:"100%"}}); - */ -/* - * var chartCategories = []; for (var i in dataTableDef.aaData) { - * chartCategories.push(dataTableDef.aaData[i][0]); } - * - * var chartSeries = []; - * - * for (var i in dataTableDef.aaData) { chartSeries.push({data: - * dataTableDef.aaData[i][1]}); } - * - * - * var Rchart = new Highcharts.Chart({ chart: { renderTo: 'RshowChart', - * defaultSeriesType: 'bar' }, title: { text: 'Historic World Population by - * Region' }, xAxis: { categories: chartCategories, title: { text: null } }, - * yAxis: { min: -5000000, title: { text: 'Population (millions)', align: 'high' } }, - * tooltip: { formatter: function() { return ''+ this.series.name +': '+ this.y +' - * millions'; } }, plotOptions: { bar: { dataLabels: { enabled: true } } }, - * legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -100, - * y: 100, floating: true, borderWidth: 1, backgroundColor: '#FFFFFF', shadow: - * true }, credits: { enabled: false }, series: chartSeries }); - */ - - -} - - -function getReportData(rptName, inParams, successFunction, isParameterType) { - if (isAuthRequest == true) getReportDataAuth(rptName, inParams, successFunction, isParameterType) - else getReportDataNoAuth(rptName, inParams, successFunction, isParameterType); -} - - -function getReportDataAuth(rptName, inParams, successFunction, isParameterType) { -alert("needs fixing up, dont rely on data") -return - var inQueryParameters = {}; - for (var i in inParams ) inQueryParameters["R_" + i] = inParams[i]; - if (rptDB > "") inQueryParameters["R_rptDB"] = rptDB; - -// OAuthSimple().reset(); -// var OAuthProcess = (new OAuthSimple()).sign({ -// path : RESTUrl, -// parameters : inQueryParameters, -// signatures : { -// 'consumer_key' : apiKey, -// 'shared_secret' : sharedSecret, -// 'access_token' : accessToken, -// 'access_secret' : tokenSecret -// } -// }); - - showMsgE("getReportData IS Auth: " + inQueryParameters); - $.ajax({ - url: RESTUrl, - type:'GET', - dataType: 'json', - contentType: "application/json; charset=utf-8", - crossDomain: false, - cache: false, - beforeSend: function( xhr ) { - xhr.setRequestHeader("Accept", "application/json"); - console.log("base64: " + basicAuthKey); - xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey); - }, - success: successFunction, - error:function(jqXHR, textStatus, errorThrown){ - showMsgE("getReportData IS Auth Error: "); - var jsonValue = jQuery.parseJSON(jqXHR.responseText); - alert("Response Text: " + jqXHR.responseText + " Text Status: " + textStatus); - } - }); - - -} - - -function buildReportParms(inParams) { - - var paramCount = 1; - var reportParams = ""; - for (var i in inParams ) - { - if (paramCount > 1) reportParams += "&" - reportParams += encodeURIComponent("R_" + i) + "=" + encodeURIComponent(inParams[i]); - paramCount = paramCount + 1; - } - if (rptDB > "") - { - if (paramCount > 1) reportParams += "&" - reportParams = encodeURIComponent("R_rptDB") + "=" + encodeURIComponent(rptDB); - } - - return reportParams -} - -function getReportDataNoAuth(rptName, inParams, successFunction, isParameterType) { - - var inQueryParameters = buildReportParms(inParams); - if (isParameterType == true) - { - if (inQueryParameters > "") inQueryParameters += "¶meterType=true" - else inQueryParameters = "parameterType=true" - } - - showMsgE("getReportDataNoAuth: " + inQueryParameters); - $.ajax({ - url: RESTUrl + "/" + rptName, - type:'GET', - dataType: 'json', - data: inQueryParameters, - contentType: "application/json; charset=utf-8", - crossDomain: false, - cache: false, - beforeSend : function(xhr) { - xhr.setRequestHeader("Accept", "application/json"); - console.log("base64: " + basicAuthKey); - xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey); - }, - success: successFunction, - error:function(jqXHR, textStatus, errorThrown){ - showMsgE("getReportDataNoAuth: "); - alert("Response Text: " + jqXHR.responseText + " Text Status: " + textStatus + " Error Thrown: " + errorThrown); - var jsonValue = jQuery.parseJSON(jqXHR.responseText); - alert("Last Alert - " + jsonValue.value + "for " + jsonValue.field + " : " + jsonValue.code); - } - }); - -} - - -function getExportCSV(rptName, inParams, isParameterType) { - - var inQueryParameters = buildReportParms(inParams); - if (inQueryParameters > "") inQueryParameters = "?" + inQueryParameters + "&exportCSV=true" - else inQueryParameters = "?exportCSV=true"; - if (isParameterType == true) inQueryParameters += "¶meterType=true"; - - var fullExportUrl = RESTUrl + "/" + rptName + inQueryParameters; - showMsg("full export url: " + fullExportUrl); - var loadHTML = ''; - - $('#StretchyReportOutput').html(loadHTML); - -} - - -function getPentahoReport(rptName, inParams) { -//todo - var currentReportName = inparams.name; //remember to include this when doing pentaho example - var inQueryParameters = "?output-type=" + $('#rptOutputType option:selected').val(); - // var paramCount = 1; - for (var i in inParams ) - { - // if (paramCount > 1) inQueryParameters += "&" - // else inQueryParameters += "?"; - inQueryParameters += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(inParams[i]); - // paramCount = paramCount + 1; - } - - var fullReportUrl = pentahoUrl + inQueryParameters; - showMsg("full pentaho url: " + fullReportUrl); - - var loadHTML = ''; - - $('#StretchyReportOutput').html(loadHTML); - -} - -function clearLoadingImg() { - $('#rptLoadingFrame').css("background", ""); -} - -function parameterValidationErrors(reportParams) -{ -var tmpStartDate = ""; -var tmpEndDate = ""; - for (var i in reportParams) - { - // alert("rpt param:" + reportParams[i][1]); - var paramDetails = getParameterDetailsUsingName(reportParams[i][1]); - - switch(paramDetails.displayType) - { - case "select": - var selectedVal = $('#' + paramDetails.name + ' select option:selected').val(); - if (selectedVal == 0) - { - alert(doI18N("appropriateValues")); - return 1; - } - break; - case "date": - var tmpDate = $('#' + paramDetails.variable).val(); - if (!(tmpDate > "")) - { - alert(doI18N("appropriateDateValues")); - return 1; - } - if (invalidDate(tmpDate) == true) - { - alert(doI18N("invalidDate") + " " + tmpDate); - return 1; - } - - if (paramDetails.variable == "startDate") tmpStartDate = tmpDate; - if (paramDetails.variable == "endDate") tmpEndDate = tmpDate; - break; - default: - alert("System Error: Unknown Display Type: " + paramDetails.displayType); - return 1; - } - } - - if (tmpStartDate > "" && tmpEndDate > "") - { - if (tmpStartDate > tmpEndDate) - { - alert(doI18N("startAfterEndDate")); - return 1; - } - } - - return 0; -} - - -function getParameterDetailsUsingName(inputParam) { - - for (var i in listOfParameters ) - { - if (listOfParameters[i].name == inputParam) - { - return listOfParameters[i]; - } - } - - alert("System Error - Parameter not Found: " + inputParam); - return {name: "unknownInputField"}; -} - - -function initI18N(lang) { - - if (I18N_Needed == "Y") - { - var Ilang = lang; - if (Ilang == "") Ilang = $.i18n.browserLang(); - jQuery.i18n.properties({ - name:'Messages', - path: bundleDir, - mode:'map', - cache: true, - language: Ilang, - callback: function() { - } - }); - } -} - - -function changeLanguage(newLanguage) { - initI18N(newLanguage); - -// run and clear buttons - $(runReportDiv).button({ label: doI18N("rpt_run") }); - $(clearReportDiv).button({ label: doI18N("rpt_clear") }); - - -// report listing - $(reportsListDiv + ' div').text(doI18N(reportsListDivLabel)); - $(reportsListDiv + ' option').each(function(index) { - if ($(this).val() == "0") $(this).text(doI18N('rpt_select_one')) - else - { - if ($(this).val() == "-1") $(this).text(doI18N('rpt_select_all')) - else - { - $(this).text(doI18N($(this).val())) - } - } - }); - -// parameter labels - for (var i in listOfParameters) - { - $('#' + listOfParameters[i].name + ' div').text(doI18N(listOfParameters[i].label)); - -// parameter options select one/all - if (listOfParameters[i].displayType == 'select') - { - $('#' + listOfParameters[i].name + ' option').each(function(index) { - if ($(this).val() == "0") $(this).text(doI18N('rpt_select_one')) - else - { - if ($(this).val() == "-1") $(this).text(doI18N('rpt_select_all')) - } - }); - } - } - -// Data output (if any) - if ($('#StretchyReportOutput').html() > "" ) - { - for (var i in dataTableDef.aoColumns) - { - var tmpval = dataTableDef.aoColumns[i].sTitle ; - dataTableDef.aoColumns[i].sTitle = doI18N(dataTableDef.aoColumns[i].sOriginalHeading); - } - redrawOutput(); - } - -} - -function doI18N(xlateStr, params) { - - if (I18N_Needed == "Y") - { - if (highlightMissingXlations == "Y") return jQuery.i18n.prop(xlateStr, params) - else - { - var xlated = jQuery.i18n.prop(xlateStr, params); - if (xlated.substr(0,1) == "[" && xlated.substr(xlated.length - 1, 1) == "]") return xlated.substr(1, xlated.length - 2) - else return xlated; - } - } - else - { - var retStr = xlateStr; - if (retStr == 'rpt_select_one') retStr = 'Select One'; - if (retStr == 'rpt_select_all') retStr = 'Select All'; - return retStr; - } -} - - -function changeDecimals(newDecimals) { - - decimalsNo = newDecimals; - updateNumberData(); -} - -function changeSeparator(sepChar, decChar, indFormat) { - - separatorChar = sepChar; - decimalChar = decChar; - indianFormat = indFormat; - updateNumberData(); -} - - -function updateNumberData() { -// Data output (if any) - if ($('#StretchyReportOutput').html() > "" ) - { - var tmpVal; - var origVal; - var convNum; - for (var i in dataTableDef.aaData ) - { - for (var j in dataTableDef.aaData[i]) - { - if (dataTableDef.aoColumns[j].sType == "title-numeric") - { - origVal = getOrigTitleNumericValue(dataTableDef.aaData[i][j]); - if (origVal == nullTitleValue) convNum = "" - else convNum = formatNumber(parseFloat(origVal)); - dataTableDef.aaData[i][j] = '' + convNum; - } - } - } - redrawOutput(); - } - -} - -function redrawOutput() { - - clearTheReport(); - var reportListingIndex = getReportListingIndexSelectedReport(); - switch(reportListing[reportListingIndex].type) - { - case "Table": - showTableReport(); - break; - case "Chart": - showChartReport(); - case "Pentaho": - break; - default: - alert("System Error: Unknown Report Type: " + reportListing[reportListingIndex].type); - } - enableClearButton(); - -} - -function setTableSizeLimit() { - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ // test for MSIE x.x; - var ieversion=new Number(RegExp.$1) // capture x.x portion and store as - // a number - if (ieversion>=9) return 50000 - else return 3000; - } - else return 50000; - -} - -function showMsg(msg) { -// remove except for testing console.log(msg); -} - -function showMsgE(msg) { - // console.log(msg); -} - - -})(jQuery); - - - diff --git a/tempjpw/resources/stretchyreporting/stretchyreporting.css b/tempjpw/resources/stretchyreporting/stretchyreporting.css deleted file mode 100644 index 3b697bb7d..000000000 --- a/tempjpw/resources/stretchyreporting/stretchyreporting.css +++ /dev/null @@ -1,52 +0,0 @@ - -.ui-button-text { - font-size: 12px; -} - -.reportLabel { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-weight: bold; - font-size: 13px; -} - -#MifosReportOutput { - width: 100%; - //height: 600px; - border-top-style: solid; - border-top-width: 1px; - border-top-color: black; -} - -#reportLoadingImage { - display:block; - margin:0 auto; - text-align:center; -} - -.rptAlignRight { - text-align: right; -} - - -.dataTables_filter { - width: 30%; - float: left; - text-align: left; -} - - -.dataTables_length { - width: 40%; - float: left; -} - - -.dataTables_info { - width: 40%; - float: left; -} - -.dataTables_paginate { - float: left; - text-align: left; -} diff --git a/tempjpwNow/IndivLendHome.html b/tempjpwNow/IndivLendHome.html index e6a159f23..b011b93e7 100644 --- a/tempjpwNow/IndivLendHome.html +++ b/tempjpwNow/IndivLendHome.html @@ -340,7 +340,7 @@ diff --git a/tempjpwNow/resources/jsrenderExtra.js b/tempjpwNow/resources/jsrenderExtra.js index f351e9276..f802956a4 100644 --- a/tempjpwNow/resources/jsrenderExtra.js +++ b/tempjpwNow/resources/jsrenderExtra.js @@ -1,34 +1,70 @@ - queryParam = (function(){ - var query = {}, pair, search = location.search.substring(1).split("&"), i = search.length; - while (i--) { - pair = search[i].split("="); - query[pair[0]] = decodeURIComponent(pair[1]); - } - return query; - })(); +queryParam = (function(){ + var query = {}, pair, search = location.search.substring(1).split("&"), i = search.length; + while (i--) { + pair = search[i].split("="); + query[pair[0]] = decodeURIComponent(pair[1]); + } + return query; + })(); +function showILLogon(apiUrl, logonDivName) { + var htmlVar = '
'; + htmlVar += ''; + htmlVar += '
User Name:
Password:
'; - - -function getClientContent(baseApiUrl, clientId) { - var content = '