Index: lams_tool_spreadsheet/.classpath =================================================================== diff -u --- lams_tool_spreadsheet/.classpath (revision 0) +++ lams_tool_spreadsheet/.classpath (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/.cvsignore =================================================================== diff -u --- lams_tool_spreadsheet/.cvsignore (revision 0) +++ lams_tool_spreadsheet/.cvsignore (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,3 @@ +.myeclipse +.mymetadata +build Index: lams_tool_spreadsheet/build.properties =================================================================== diff -u --- lams_tool_spreadsheet/build.properties (revision 0) +++ lams_tool_spreadsheet/build.properties (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,25 @@ +######################################################################################################################## +### BUILD PROPERTIES ### +### 1) Do *NOT* use backslashes in paths unless you are sure the ANT task treats them properly. ### +### 2) Use only ant variables (${foo}) that You declared above or make *SURE* You derive them from the right place. ### +### 3) Comment out boolean style build settings instead of setting false. Set to false may fail. ### +### 4) Uncommenting the forceClean attribute *WILL* delete your sourcecode to make place for vcs controlled builds. ### +### +######################################################################################################################## + +### project properties ### +signature=lasprd10 +project.displayname = lams spreadsheet tool +weblib=lib + +#project version +tool.version=20080612 + +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.0 + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.spreadsheet Index: lams_tool_spreadsheet/build.xml =================================================================== diff -u --- lams_tool_spreadsheet/build.xml (revision 0) +++ lams_tool_spreadsheet/build.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | creating directory structure | + +------------------------------------------+ + + + + + + + + + + + + + + +------------------------------------------+ + | clean | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | generating hibernate metadata | + +------------------------------------------+ + + + + Building hbm.xml files using XDoclet to ${conf.hibernate.mapping.dir} from ${src.java.dir} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | create jar file | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +------------------------------------------+ + | build jar file | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MINE + + + + + + + + +------------------------------------------+ + | Generate the deployment package. | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploying the Spreadsheet tool + + + + + + + + + + + + + + +------------------------------------------+ + | built war file | + +------------------------------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/conf/hibernate/mappings/.cvsignore =================================================================== diff -u --- lams_tool_spreadsheet/conf/hibernate/mappings/.cvsignore (revision 0) +++ lams_tool_spreadsheet/conf/hibernate/mappings/.cvsignore (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ +org Index: lams_tool_spreadsheet/conf/hibernate/mappings/hibernate.properties =================================================================== diff -u --- lams_tool_spreadsheet/conf/hibernate/mappings/hibernate.properties (revision 0) +++ lams_tool_spreadsheet/conf/hibernate/mappings/hibernate.properties (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,7 @@ +hibernate.connection.username=lams +hibernate.connection.password=lamsdemo +hibernate.connection.url=jdbc:mysql://localhost/lams +hibernate.connection.driver_class=com.mysql.jdbc.Driver +hibernate.dialect=org.hibernate.dialect.MySQLDialect + + Index: lams_tool_spreadsheet/conf/jar/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_spreadsheet/conf/jar/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_spreadsheet/conf/jar/META-INF/MANIFEST.MF (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,3 @@ +Implementation-Title: LAMS - Spreadsheet Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) Index: lams_tool_spreadsheet/conf/language/lams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_spreadsheet/conf/language/lams/ApplicationResources.properties (revision 0) +++ lams_tool_spreadsheet/conf/language/lams/ApplicationResources.properties (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,172 @@ +appName = shareresources +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Tue Jun 03 08:13:06 BST 2008 + +#=================== labels for ShareResources =================# + +activity.description =Sharing resources with others. +label.authoring.basic.resource.instructions =Instructions +label.authoring.heading.instructions =Instructions +label.authoring.heading.instructions.desc =Please input online and offline instructions +label.authoring.basic.instruction =Instruction +label.authoring.basic.resource.add.instruction =Add Instruction +label.authoring.online.instruction =Online Instructions +label.authoring.offline.instruction =Offline Instructions +error.resource.item.desc.blank =Comment/Instruction can not be blank +activity.helptext =Uploading your resources to share with others. +tool.display.name =Share Resources Tool +tool.description =Tool for sharing resources. +appName =Share Resources +errorPage.title =Error page +errorPage.heading =Some error occurs when handling your request +label.authoring.heading =Share Resources +label.author.title =Share Resources Authoring +label.authoring.heading.basic =Basic +label.next.instruction =Next Instruction +label.authoring.heading.basic.desc =Basic input information for shared resources +msg.no.instruction =No instruction available. +label.authoring.heading.advance.desc =Please input advance options for shared resources +label.authoring.basic.title =Title +label.learning.comment.or.instruction =Comment/Instruction +label.authoring.basic.add.url =Add URL +label.authoring.basic.add.file =Add Single File +label.authoring.basic.resource.list.title =Resource List +label.authoring.basic.resource.url =URL +label.authoring.basic.resource.file =File +label.authoring.basic.resource.website =Website +label.authoring.basic.resource.verify.url =Verify URL +label.authoring.basic.resource.preview =Preview +label.authoring.basic.resource.edit =Edit +label.authoring.basic.resource.delete =Delete +monitoring.tab.instructions =Instruction +label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions: +label.authoring.basic.resource.title.input =Title +label.authoring.basic.resource.url.input =URL +label.authoring.basic.resource.file.input =File +label.authoring.basic.resource.description.input =Description +label.authoring.basic.resource.zip.file.input =Zip file: +label.authoring.online.file =Upload online file +label.authoring.offline.file =Upload offline file +label.authoring.choosefile.button =Choose file +label.authoring.upload.online.button =Upload Online +label.authoring.upload.offline.button =Upload Offline +label.authoring.online.filelist =Online file list +label.authoring.offline.filelist =Offline file list +label.authoring.online.delete =Delete +label.authoring.offline.delete =Delete +label.authoring.advance.mini.number.resources.view =Minimum number of resources to view +label.authoring.advance.allow.learner.add.urls =Allow learners to add URLs +label.authoring.advance.allow.learner.add.files =Allow learners to add Files +label.authoring.cancel.button =Cancel +label.description =Description: +authoring.exception =There is a problem in shared resources authoring page, the reason is {0} +error.resource.item.title.blank =Title can not be blank. +error.resource.item.url.blank =URL can not be blank. +error.resource.item.file.blank =File can not be blank. +error.resource.item.invalid.url =Invalid URL format. +error.upload.failed =Upload file failed: {0} +error.msg.upload.file.not.found =Could not find upload file {0}. +error.msg.zip.file.exception =Could not handle zip file when uploading file. +error.msg.file.not.found =File not found exception occurs when uploading file. +error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file. +error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html). +error.msg.io.exception =IOException occurs when uploading file. +error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. +error.msg.default.content.not.find =Could not retrieve default content record for this tool. +authoring.msg.cancel.save =Do you want to close this window without saving? +label.learning.title =Share Resource Learning +label.learning.heading =Share Resources +label.resoruce.to.review =Resources to view +label.learning.minimum.review =You must view at least {0} of the resources. +label.check.for.new =Check for new +label.suggest.new =Suggest a new +label.learning.new.file =New file details: +label.learning.new.url =New URL details: +monitoring.tab.summary =Summary +monitoring.tab.statistics =Statistic +monitoring.tab.edit.activity =Edit Activity +monitoring.label.group =Group +monitoring.summary.note =Note: number of learners is the number of learners who have viewed the resource. +monitoring.label.type =Type +monitoring.label.title =Title +monitoring.label.suggest =Suggested By +monitoring.label.number.learners =Number of Learners +monitoring.label.hide =Hide +monitoring.label.show =Show +monitoring.label.user.loginname =Login name +monitoring.label.user.name =Name +monitoring.label.hidden =Hidden +label.monitoring.edit.activity.cancel =Cancel +label.monitoring.edit.activity.update =Update +label.monitoring.edit.activity.edit =Edit +message.monitoring.edit.activity.not.editable =This Activity is no longer editable +export.label.resource =Resource +export.label.no.learning.object =No offline package available +export.title =Export portfolio of Share Resource +export.init.resource =Initial Resources +errors.header = +errors.footer = +error.valueReqd =Value Required +error.inputFileTooLarge =Input File size is too large! +error.uploading =error uploading +error.title.empty =Title can not be blank +message.msg.maxFileSize =Max 250K +label.open =Open +label.delete =Delete +label.download =Download +label.view =View +label.edit =Edit +label.completed =Completed +button.upload =Upload +button.add =Add +button.cancel =Cancel +message.monitoring.summary.no.session =No Session Available +label.show =Show +label.hide =Hide +label.save =Save +label.cancel =Cancel +define.later.message =Please wait for the teacher to complete the contents of this activity. +run.offline.message =This activity is not being done on the computer. Please see your instructor for details. +message.monitoring.summary.no.resource.for.group =No resource available for this group. +button.try.again =Try again +open.in.new.window =Open URL in pop-up +page.title.monitoring.view.reflection =View Notebook Entries +button.edit =Edit +message.no.reflection.available =No notebook available +error.reflection.emtpy =Please input Notebook Entry +title.reflection =Notebook Entry +monitoring.user.reflection =Notebook Entry +activity.title =Spreadsheet +label.authoring.save.button =Save +monitoring.label.access.time =Access time +label.authoring.advance.lock.on.finished =Lock when finished +label.authoring.heading.advance =Advanced +label.authoring.basic.add.learning.object =Add IMS Content Package +label.authoring.basic.add.website =Add Zipped Website +label.authoring.basic.resource.learning.object =IMS CP +error.msg.ims.package =Invalid IMS CP format. +message.step.of =Step {0} of {1} +label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource) +label.up =Move Up +label.down =Move down +label.continue =Continue +monitoring.user.fullname =Name +button.close =Close +label.monitoring.heading.access =Learners list +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.attachment.executable =The uploaded file is executable, please zip it before uploading. +lable.learning.minimum.view.number.less =You must view at least another {0} of the resources. +label.finished =Next Activity +label.finish =Finished +error.msg.repository =A repository error occurred while trying to upload the file. +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +monitoring.label.attachments =Attachments +message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it. +label.export.reflection =Notebook Entries +message.warnLockOnFinish =Note: After you click on \u201cNext Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources. +monitoring.label.instructions =Instructions + + +#======= End labels: Exported 161 labels for en AU ===== Index: lams_tool_spreadsheet/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_spreadsheet/conf/language/lams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_spreadsheet/conf/language/lams/ApplicationResources_en_AU.properties (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,169 @@ +appName = shareresources +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Tue Jun 03 08:13:06 BST 2008 + +#=================== labels for ShareResources =================# + +activity.description =Spreadsheet. +activity.helptext =Spreadsheet Tool. +tool.display.name =Spreadsheet Tool +tool.description =Tool for displaying spreadsheets. +appName =Spreadsheet +errorPage.title =Error page +errorPage.heading =Some error occurs when handling your request +label.authoring.heading =Spreadsheet +label.authoring.title =Spreadsheet Authoring +label.authoring.heading.basic =Basic +label.authoring.heading.basic.desc =Basic input information for shared resources +label.authoring.heading.advance.desc =Please input advance options for shared resources +label.authoring.basic.resource.instructions =Instructions +label.authoring.heading.instructions =Instructions +label.authoring.heading.instructions.desc =Please input online and offline instructions +label.authoring.basic.instruction =Instruction +label.authoring.basic.resource.add.instruction =Add Instruction +label.authoring.online.instruction =Online Instructions +label.authoring.offline.instruction =Offline Instructions +label.authoring.basic.title =Title +label.authoring.basic.spreadsheet =Spreadsheet +label.authoring.basic.resource.preview =Preview +label.authoring.basic.resource.edit =Edit +label.authoring.basic.resource.delete =Delete +label.authoring.basic.resource.title.input =Title +label.authoring.basic.resource.description.input =Description +label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions: +label.authoring.advanced.play.only =Play only (learner can only play with the spreadsheet but cannot save) +label.authoring.advanced.learners.are.allowed.to.save =Learners are allowed to submit individual spreadsheets +label.authoring.advanced.enable.spreadsheet.marking =Enable spreadsheet marking +label.authoring.online.file =Upload online file +label.authoring.offline.file =Upload offline file +label.authoring.choosefile.button =Choose file +label.authoring.upload.online.button =Upload Online +label.authoring.upload.offline.button =Upload Offline +label.authoring.online.filelist =Online file list +label.authoring.offline.filelist =Offline file list +label.authoring.online.delete =Delete +label.authoring.offline.delete =Delete +label.authoring.cancel.button =Cancel +label.learning.title =Share Resource Learning +label.learning.comment.or.instruction =Comment/Instruction +label.learning.heading =Share Resources +label.monitoring.summary.learner =Learner +label.monitoring.summary.marked =Marked? +label.monitoring.summary.lock.when.finished =Lock when finished: +label.monitoring.summary.individual.spreadsheets =Learners are allowed to submit individual spreadsheets: +label.monitoring.summary.marking.enabled =Spreadsheet marking is enabled: +label.monitoring.summary.notebook.reflection =Notebook Reflection: +label.monitoring.summary.overall.summary =Overall Summary +label.monitoring.summary.confirm.completion =Confirm Completion +label.monitoring.summary.title.reflection =Notebook Entry +label.monitoring.summary.reflection =Notebook Entry +label.monitoring.summary.mark.button =Mark +label.monitoring.summary.user =Learner +label.monitoring.summary.viewAllMarks.button =View All Marks +label.monitoring.summary.releaseMarks.button =Release Marks +label.monitoring.summary.downloadMarks.button =Download Marks +label.monitoring.edit.activity.cancel =Cancel +label.monitoring.edit.activity.update =Update +label.monitoring.edit.activity.edit =Edit +label.monitoring.statistics.session.name =Session name +label.monitoring.statistics.marked =Marked spreadsheets +label.monitoring.statistics.not.marked =Not marked spreadsheets +label.monitoring.statistics.total.spreadsheets.sent.by.learners =Total spreadsheets sent by learners +label.monitoring.heading.access =Learners list +label.reviewitem.spreadsheet.sent.by =Spreadsheet sent by +label.reviewitem.user.hasnot.sent.spreadsheet =User hasn't sent spreadsheet yet. +label.reviewitem.title =Review User's Spreadsheet +label.description =Description: +authoring.exception =There is a problem in shared resources authoring page, the reason is {0} +error.resource.item.title.blank =Title can not be blank. +error.resource.item.file.blank =File can not be blank. +error.upload.failed =Upload file failed: {0} +error.msg.upload.file.not.found =Could not find upload file {0}. +error.msg.file.not.found =File not found exception occurs when uploading file. +error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html). +error.msg.io.exception =IOException occurs when uploading file. +error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. +error.msg.default.content.not.find =Could not retrieve default content record for this tool. +authoring.msg.cancel.save =Do you want to close this window without saving? +label.resoruce.to.review =Resources to view +label.check.for.new =Check for new +monitoring.tab.instructions =Instruction +monitoring.tab.summary =Summary +monitoring.tab.statistics =Statistics +monitoring.tab.edit.activity =Edit Activity +monitoring.label.group =Group +monitoring.summary.note =Note: number of learners is the number of learners who have viewed the resource. +monitoring.label.type =Type +monitoring.label.title =Title +monitoring.label.suggest =Suggested By +monitoring.label.number.learners =Number of Learners +monitoring.label.hide =Hide +monitoring.label.show =Show +monitoring.label.user.loginname =Login name +monitoring.label.user.name =Name +monitoring.label.hidden =Hidden +monitoring.label.attachments =Attachments +message.monitoring.edit.activity.not.editable =This Activity is no longer editable +export.label.resource =Resource +export.label.no.learning.object =No offline package available +export.title =Export portfolio of Share Resource +export.init.resource =Initial Resources +errors.header = +errors.footer = +error.valueReqd =Value Required +error.inputFileTooLarge =Input File size is too large! +error.uploading =error uploading +error.title.empty =Title can not be blank +message.msg.maxFileSize =Max 250K +label.open =Open +label.delete =Delete +label.download =Download +label.view =View +label.edit =Edit +label.completed =Completed +button.upload =Upload +button.add =Add +button.cancel =Cancel +message.monitoring.summary.no.session =No Session Available +label.show =Show +label.hide =Hide +label.save =Save +label.cancel =Cancel +define.later.message =Please wait for the teacher to complete the contents of this activity. +run.offline.message =This activity is not being done on the computer. Please see your instructor for details. +message.monitoring.summary.no.resource.for.group =No resource available for this group. +button.try.again =Try again +page.title.monitoring.view.reflection =View Notebook Entries +button.edit =Edit +message.no.reflection.available =No notebook available +error.reflection.emtpy =Please input Notebook Entry +title.reflection =Notebook Entry +monitoring.user.reflection =Notebook Entry +activity.title =Spreadsheet +label.authoring.save.button =Save +monitoring.label.access.time =Access time +label.authoring.advance.lock.on.finished =Lock when finished +label.authoring.heading.advance =Advanced +message.step.of =Step {0} of {1} +label.up =Move Up +label.down =Move down +label.continue =Continue +monitoring.user.fullname =Name +button.close =Close +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.attachment.executable =The uploaded file is executable, please zip it before uploading. +label.finished =Next Activity +label.finish =Finished +error.msg.repository =A repository error occurred while trying to upload the file. +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +monitoring.label.attachments =Attachments +message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it. +msg.no.instruction =No instruction available. +label.export.reflection =Notebook Entries +message.warnLockOnFinish =Note: After you click on \u201cNext Activity\u201d, if you come back to this Spreadsheet, you won\u2019t be able to submit apreadsheet's changes. +monitoring.label.instructions =Instructions + + +#======= End labels: Exported 161 labels for en AU ===== Index: lams_tool_spreadsheet/conf/language/rams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_spreadsheet/conf/language/rams/ApplicationResources.properties (revision 0) +++ lams_tool_spreadsheet/conf/language/rams/ApplicationResources.properties (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,167 @@ +appName = shareresources +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the RAMS Community by Ernie Ghiglione on Tue Mar 25 15:30:52 EST 2008 + +#=================== labels for ShareResources =================# + +appName =Share Resources +activity.title =Spreadsheet +activity.description =Sharing resource with others. +activity.helptext =Uploading your resources to share with others. +tool.display.name =Share Resources Tool +tool.description =Tool for sharing resources. +errorPage.title =Error page +errorPage.heading =Some error occurs when handling your request +label.authoring.heading =Share Resources +label.author.title =Share Resources Authoring +label.authoring.heading.basic =Basic +label.authoring.heading.advance =Advanced +label.authoring.heading.instructions =Instructions +label.authoring.heading.basic.desc =Basic input information for shared resources +label.authoring.heading.instructions.desc =Please input online and offline instructions +label.authoring.heading.advance.desc =Please input advance options for shared resources +label.authoring.basic.title =Title +label.authoring.basic.instruction =Instruction +label.authoring.basic.add.url =Add URL +label.authoring.basic.add.file =Add Single File +label.authoring.basic.add.website =Add Zipped Website +label.authoring.basic.add.learning.object =Add IMS Content Package +label.authoring.basic.resource.list.title =Resource List +label.authoring.basic.resource.url =URL +label.authoring.basic.resource.file =File +label.authoring.basic.resource.website =Website +label.authoring.basic.resource.learning.object =IMS CP +label.authoring.basic.resource.verify.url =Verify URL +label.authoring.basic.resource.preview =Preview +label.authoring.basic.resource.edit =Edit +label.authoring.basic.resource.delete =Delete +label.authoring.basic.resource.add.instruction =Add Instruction +label.authoring.basic.resource.instructions =Instructions +label.authoring.basic.resource.title.input =Title +label.authoring.basic.resource.url.input =URL +label.authoring.basic.resource.file.input =File +label.authoring.basic.resource.description.input =Description +label.authoring.basic.resource.zip.file.input =Zip file: +label.authoring.online.instruction =Online Instructions +label.authoring.offline.instruction =Offline Instructions +label.authoring.online.file =Upload online file +label.authoring.offline.file =Upload offline file +label.authoring.choosefile.button =Choose file +label.authoring.upload.online.button =Upload Online +label.authoring.upload.offline.button =Upload Offline +label.authoring.online.filelist =Online file list +label.authoring.offline.filelist =Offline file list +label.authoring.online.delete =Delete +label.authoring.offline.delete =Delete +label.authoring.advance.lock.on.finished =Lock when finished +label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource) +label.authoring.advance.mini.number.resources.view =Minimum number of resources to view +label.authoring.advance.allow.learner.add.urls =Allow participants to add URLs +label.authoring.advance.allow.learner.add.files =Allow participants to add Files +label.next.instruction =Next Instruction +label.authoring.save.button =Save +label.authoring.cancel.button =Cancel +label.description =Description: +authoring.exception =There is a problem in shared resources authoring page, the reason is {0} +error.resource.item.title.blank =Title can not be blank. +error.resource.item.url.blank =URL can not be blank. +error.resource.item.file.blank =File can not be blank. +error.resource.item.desc.blank =Comment/Instruction can not be blank +error.resource.item.invalid.url =Invalid URL format. +error.upload.failed =Upload file failed: {0} +error.msg.upload.file.not.found =Could not find upload file {0}. +error.msg.zip.file.exception =Could not handle zip file when uploading file. +error.msg.file.not.found =File not found exception occurs when uploading file. +error.msg.ims.package =Invalid IMS CP format. +error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file. +error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html). +error.msg.io.exception =IOException occurs when uploading file. +error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. +error.msg.repository =Repository occurs exception while trying to upload file. +error.msg.default.content.not.find =Could not retrieve default content record for this tool. +msg.no.instruction =No instruction available. +authoring.msg.cancel.save =Do you want to close this window without saving? +label.learning.title =Share Resource +label.learning.heading =Share Resources +label.resoruce.to.review =Resources to view +label.learning.minimum.review =You must view at least {0} of the resources. +lable.learning.minimum.view.number.less =You at least view another {0} of the resources. +label.check.for.new =Check for new +label.suggest.new =Suggest a new +label.learning.new.file =New file details: +label.learning.new.url =New URL details: +label.learning.comment.or.instruction =Comment/Instruction +monitoring.tab.summary =Summary +monitoring.tab.statistics =Statistic +monitoring.tab.instructions =Instruction +monitoring.tab.edit.activity =Edit Activity +monitoring.label.group =Group +monitoring.summary.note =Note: number of participants is the number of participants who have viewed the resource. +monitoring.label.type =Type +monitoring.label.title =Title +monitoring.label.suggest =Suggested By +monitoring.label.number.learners =Number of Participants +monitoring.label.hide =Hide +monitoring.label.show =Show +monitoring.label.user.loginname =Login name +monitoring.label.user.name =Name +monitoring.label.hidden =Hidden +label.monitoring.edit.activity.cancel =Cancel +label.monitoring.edit.activity.update =Update +label.monitoring.edit.activity.edit =Edit +message.monitoring.edit.activity.not.editable =This Activity is no longer editable +export.label.resource =Resource +export.label.no.learning.object =No offline package available +export.title =Export portfolio of Share Resource +export.init.resource =Initial Resources +errors.header = +errors.footer = +error.valueReqd =Value Required +error.inputFileTooLarge =Input File size is too large! +error.uploading =error uploading +error.title.empty =Title can not be blank +message.msg.maxFileSize =Max 250K +label.open =Open +label.delete =Delete +label.download =Download +label.view =View +label.edit =Edit +label.finished =Finished +label.completed =Completed +label.finish =Finish +button.upload =Upload +button.add =Add +button.cancel =Cancel +message.monitoring.summary.no.session =No Session Available +label.show =Show +label.hide =Hide +label.save =Save +label.cancel =Cancel +monitoring.label.access.time =Access time +define.later.message =Please wait for the researcher to complete the contents of this activity. +run.offline.message =This activity is not being done on the computer. Please see your instructor for details. +message.monitoring.summary.no.resource.for.group =No resource available for this group. +button.try.again =Try again +open.in.new.window =Open URL in pop-up +label.up =Move Up +label.down =Move down +label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions: +error.reflection.emtpy =Please input reflection +title.reflection =Reflection +label.continue =Continue +monitoring.user.fullname =Name +monitoring.user.reflection =Reflection +page.title.monitoring.view.reflection =View Reflection +button.close =Close +message.step.of =Step {0} of {1} +message.no.reflection.available =No notebook available +button.edit =Edit +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.attachment.executable =The uploaded file is executable, please zip it before uploading. +label.monitoring.heading.access =Participants list +message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information. + + +#======= End labels: Exported 156 labels for en AU ===== Index: lams_tool_spreadsheet/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_spreadsheet/conf/language/rams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_spreadsheet/conf/language/rams/ApplicationResources_en_AU.properties (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,167 @@ +appName = shareresources +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the RAMS Community by Ernie Ghiglione on Tue Mar 25 15:30:52 EST 2008 + +#=================== labels for ShareResources =================# + +appName =Share Resources +activity.title =Spreadsheet +activity.description =Sharing resource with others. +activity.helptext =Uploading your resources to share with others. +tool.display.name =Share Resources Tool +tool.description =Tool for sharing resources. +errorPage.title =Error page +errorPage.heading =Some error occurs when handling your request +label.authoring.heading =Share Resources +label.author.title =Share Resources Authoring +label.authoring.heading.basic =Basic +label.authoring.heading.advance =Advanced +label.authoring.heading.instructions =Instructions +label.authoring.heading.basic.desc =Basic input information for shared resources +label.authoring.heading.instructions.desc =Please input online and offline instructions +label.authoring.heading.advance.desc =Please input advance options for shared resources +label.authoring.basic.title =Title +label.authoring.basic.instruction =Instruction +label.authoring.basic.add.url =Add URL +label.authoring.basic.add.file =Add Single File +label.authoring.basic.add.website =Add Zipped Website +label.authoring.basic.add.learning.object =Add IMS Content Package +label.authoring.basic.resource.list.title =Resource List +label.authoring.basic.resource.url =URL +label.authoring.basic.resource.file =File +label.authoring.basic.resource.website =Website +label.authoring.basic.resource.learning.object =IMS CP +label.authoring.basic.resource.verify.url =Verify URL +label.authoring.basic.resource.preview =Preview +label.authoring.basic.resource.edit =Edit +label.authoring.basic.resource.delete =Delete +label.authoring.basic.resource.add.instruction =Add Instruction +label.authoring.basic.resource.instructions =Instructions +label.authoring.basic.resource.title.input =Title +label.authoring.basic.resource.url.input =URL +label.authoring.basic.resource.file.input =File +label.authoring.basic.resource.description.input =Description +label.authoring.basic.resource.zip.file.input =Zip file: +label.authoring.online.instruction =Online Instructions +label.authoring.offline.instruction =Offline Instructions +label.authoring.online.file =Upload online file +label.authoring.offline.file =Upload offline file +label.authoring.choosefile.button =Choose file +label.authoring.upload.online.button =Upload Online +label.authoring.upload.offline.button =Upload Offline +label.authoring.online.filelist =Online file list +label.authoring.offline.filelist =Offline file list +label.authoring.online.delete =Delete +label.authoring.offline.delete =Delete +label.authoring.advance.lock.on.finished =Lock when finished +label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource) +label.authoring.advance.mini.number.resources.view =Minimum number of resources to view +label.authoring.advance.allow.learner.add.urls =Allow participants to add URLs +label.authoring.advance.allow.learner.add.files =Allow participants to add Files +label.next.instruction =Next Instruction +label.authoring.save.button =Save +label.authoring.cancel.button =Cancel +label.description =Description: +authoring.exception =There is a problem in shared resources authoring page, the reason is {0} +error.resource.item.title.blank =Title can not be blank. +error.resource.item.url.blank =URL can not be blank. +error.resource.item.file.blank =File can not be blank. +error.resource.item.desc.blank =Comment/Instruction can not be blank +error.resource.item.invalid.url =Invalid URL format. +error.upload.failed =Upload file failed: {0} +error.msg.upload.file.not.found =Could not find upload file {0}. +error.msg.zip.file.exception =Could not handle zip file when uploading file. +error.msg.file.not.found =File not found exception occurs when uploading file. +error.msg.ims.package =Invalid IMS CP format. +error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file. +error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html). +error.msg.io.exception =IOException occurs when uploading file. +error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. +error.msg.repository =Repository occurs exception while trying to upload file. +error.msg.default.content.not.find =Could not retrieve default content record for this tool. +msg.no.instruction =No instruction available. +authoring.msg.cancel.save =Do you want to close this window without saving? +label.learning.title =Share Resource +label.learning.heading =Share Resources +label.resoruce.to.review =Resources to view +label.learning.minimum.review =You must view at least {0} of the resources. +lable.learning.minimum.view.number.less =You at least view another {0} of the resources. +label.check.for.new =Check for new +label.suggest.new =Suggest a new +label.learning.new.file =New file details: +label.learning.new.url =New URL details: +label.learning.comment.or.instruction =Comment/Instruction +monitoring.tab.summary =Summary +monitoring.tab.statistics =Statistic +monitoring.tab.instructions =Instruction +monitoring.tab.edit.activity =Edit Activity +monitoring.label.group =Group +monitoring.summary.note =Note: number of participants is the number of participants who have viewed the resource. +monitoring.label.type =Type +monitoring.label.title =Title +monitoring.label.suggest =Suggested By +monitoring.label.number.learners =Number of Participants +monitoring.label.hide =Hide +monitoring.label.show =Show +monitoring.label.user.loginname =Login name +monitoring.label.user.name =Name +monitoring.label.hidden =Hidden +label.monitoring.edit.activity.cancel =Cancel +label.monitoring.edit.activity.update =Update +label.monitoring.edit.activity.edit =Edit +message.monitoring.edit.activity.not.editable =This Activity is no longer editable +export.label.resource =Resource +export.label.no.learning.object =No offline package available +export.title =Export portfolio of Share Resource +export.init.resource =Initial Resources +errors.header = +errors.footer = +error.valueReqd =Value Required +error.inputFileTooLarge =Input File size is too large! +error.uploading =error uploading +error.title.empty =Title can not be blank +message.msg.maxFileSize =Max 250K +label.open =Open +label.delete =Delete +label.download =Download +label.view =View +label.edit =Edit +label.finished =Finished +label.completed =Completed +label.finish =Finish +button.upload =Upload +button.add =Add +button.cancel =Cancel +message.monitoring.summary.no.session =No Session Available +label.show =Show +label.hide =Hide +label.save =Save +label.cancel =Cancel +monitoring.label.access.time =Access time +define.later.message =Please wait for the researcher to complete the contents of this activity. +run.offline.message =This activity is not being done on the computer. Please see your instructor for details. +message.monitoring.summary.no.resource.for.group =No resource available for this group. +button.try.again =Try again +open.in.new.window =Open URL in pop-up +label.up =Move Up +label.down =Move down +label.authoring.advanced.reflectOnActivity =Add Notebook at end of Shared Resources with the following instructions: +error.reflection.emtpy =Please input reflection +title.reflection =Reflection +label.continue =Continue +monitoring.user.fullname =Name +monitoring.user.reflection =Reflection +page.title.monitoring.view.reflection =View Reflection +button.close =Close +message.step.of =Step {0} of {1} +message.no.reflection.available =No notebook available +button.edit =Edit +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.attachment.executable =The uploaded file is executable, please zip it before uploading. +label.monitoring.heading.access =Participants list +message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information. + + +#======= End labels: Exported 156 labels for en AU ===== Index: lams_tool_spreadsheet/conf/war/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_spreadsheet/conf/war/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_spreadsheet/conf/war/META-INF/MANIFEST.MF (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,4 @@ +Implementation-Title: LAMS - Spreadsheet Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: ./lams.jar ./lams-tool-lasprd10.jar ./lams-contentrepository.jar Index: lams_tool_spreadsheet/conf/xdoclet/global-exceptions.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/global-exceptions.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/global-exceptions.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,8 @@ + + + Index: lams_tool_spreadsheet/conf/xdoclet/global-forwards.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/global-forwards.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/global-forwards.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,6 @@ + + + + + + Index: lams_tool_spreadsheet/conf/xdoclet/struts-actions.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/struts-actions.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/struts-actions.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/conf/xdoclet/struts-forms.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/struts-forms.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/struts-forms.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ + Index: lams_tool_spreadsheet/conf/xdoclet/struts-message-resources.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/struts-message-resources.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/struts-message-resources.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ + Index: lams_tool_spreadsheet/conf/xdoclet/struts-plugins.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/struts-plugins.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/struts-plugins.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,15 @@ + + + + + + Index: lams_tool_spreadsheet/conf/xdoclet/validation-forms.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/validation-forms.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/validation-forms.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,29 @@ + Index: lams_tool_spreadsheet/conf/xdoclet/validation-global.xml =================================================================== diff -u --- lams_tool_spreadsheet/conf/xdoclet/validation-global.xml (revision 0) +++ lams_tool_spreadsheet/conf/xdoclet/validation-global.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,6 @@ + + + datePattern + yyyy-MM-dd + + Index: lams_tool_spreadsheet/db/model/spreadsheet.clay =================================================================== diff -u --- lams_tool_spreadsheet/db/model/spreadsheet.clay (revision 0) +++ lams_tool_spreadsheet/db/model/spreadsheet.clay (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,590 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
Index: lams_tool_spreadsheet/db/sql/activity_insert.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/activity_insert.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/activity_insert.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,82 @@ +# Connection: ROOT LOCAL +# Host: localhost +# Saved: 2005-04-07 11:08:32 +# +INSERT INTO lams_learning_activity +( +activity_ui_id +, description +, title +, help_text +, xcoord +, ycoord +, parent_activity_id +, parent_ui_id +, learning_activity_type_id +, grouping_support_type_id +, apply_grouping_flag +, grouping_id +, grouping_ui_id +, order_id +, define_later_flag +, learning_design_id +, learning_library_id +, create_date_time +, run_offline_flag +, max_number_of_options +, min_number_of_options +, options_instructions +, tool_id +, tool_content_id +, activity_category_id +, gate_activity_level_id +, gate_open_flag +, gate_start_time_offset +, gate_end_time_offset +, gate_start_date_time +, gate_end_date_time +, library_activity_ui_image +, create_grouping_id +, create_grouping_ui_id +, library_activity_id +, language_file +) +VALUES +( +NULL +, 'Spreadsheet' +, 'Spreadsheet' +, 'Put some help text here.' +, NULL +, NULL +, NULL +, NULL +, 1 +, 2 +, 0 +, NULL +, NULL +, NULL +, 0 +, NULL +, ${learning_library_id} +, NOW() +, 0 +, NULL +, NULL +, NULL +, ${tool_id} +, NULL +, 4 +, NULL +, NULL +, NULL +, NULL +, NULL +, NULL +, 'tool/lasprd10/images/icon_spreadsheet.swf' +, NULL +, NULL +, NULL +, 'org.lamsfoundation.lams.tool.spreadsheet.ApplicationResources' +) Index: lams_tool_spreadsheet/db/sql/create_lams_tool_spreadsheet.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/create_lams_tool_spreadsheet.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/create_lams_tool_spreadsheet.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,88 @@ +SET FOREIGN_KEY_CHECKS=0; +drop table if exists tl_lasprd10_attachment; +drop table if exists tl_lasprd10_spreadsheet; +drop table if exists tl_lasprd10_user_edited_spreadsheet; +drop table if exists tl_lasprd10_session; +drop table if exists tl_lasprd10_user; +create table tl_lasprd10_attachment ( + uid bigint not null auto_increment, + file_version_id bigint, + file_type varchar(255), + file_name varchar(255), + file_uuid bigint, + create_date datetime, + spreadsheet_uid bigint, + primary key (uid) +)type=innodb; +create table tl_lasprd10_spreadsheet ( + uid bigint not null auto_increment, + create_date datetime, + update_date datetime, + create_by bigint, + title varchar(255), + run_offline tinyint, + is_learner_allowed_to_save tinyint, + is_marking_enabled tinyint, + lock_on_finished tinyint, + instructions text, + code text, + online_instructions text, + offline_instructions text, + content_in_use tinyint, + define_later tinyint, + content_id bigint unique, + reflect_instructions varchar(255), + reflect_on_activity smallint, + primary key (uid) +)type=innodb; +create table tl_lasprd10_user_edited_spreadsheet ( + uid bigint not null auto_increment, + user_edited_spreadsheet text, + mark_id bigint, + primary key (uid) +)type=innodb; +create table tl_lasprd10_spreadsheet_mark ( + uid bigint not null auto_increment, + marks varchar(255), + comments text, + date_marks_released datetime, + primary key (uid) +)type=innodb; +create table tl_lasprd10_session ( + uid bigint not null auto_increment, + session_end_date datetime, + session_start_date datetime, + status integer, + spreadsheet_uid bigint, + session_id bigint, + session_name varchar(250), + primary key (uid) +)type=innodb; +create table tl_lasprd10_user ( + uid bigint not null auto_increment, + user_id bigint, + last_name varchar(255), + first_name varchar(255), + login_name varchar(255), + session_finished smallint, + session_uid bigint, + spreadsheet_uid bigint, + user_edited_spreadsheet_uid bigint, + primary key (uid) +)type=innodb; +alter table tl_lasprd10_attachment add index FK_NEW_2065267438_1E7009430E79035 (spreadsheet_uid), add constraint FK_NEW_2065267438_1E7009430E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_spreadsheet add index FK_NEW_2065267438_89093BF758092FB (create_by), add constraint FK_NEW_2065267438_89093BF758092FB foreign key (create_by) references tl_lasprd10_user (uid); +alter table tl_lasprd10_session add index FK_NEW_2065267438_24AA78C530E79035 (spreadsheet_uid), add constraint FK_NEW_2065267438_24AA78C530E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_user add index FK_NEW_2065267438_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_2065267438_30113BFCEC0D3147 foreign key (session_uid) references tl_lasprd10_session (uid); +alter table tl_lasprd10_user add index FK_NEW_2065267438_30113BFC309ED320 (spreadsheet_uid), add constraint FK_NEW_2065267438_30113BFC309ED320 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_user add index FK_NEW_2065267438_693580A441F9365D (user_edited_spreadsheet_uid), add constraint FK_NEW_2065267438_693580A441F9365D foreign key (user_edited_spreadsheet_uid) references tl_lasprd10_user_edited_spreadsheet (uid); +alter table tl_lasprd10_user_edited_spreadsheet add index FK_tl_lasprd10_user_edited_spreadsheet_1 (mark_id), add constraint FK_tl_lasprd10_user_edited_spreadsheet_1 foreign key (mark_id) references tl_lasprd10_spreadsheet_mark (uid); + + + +INSERT INTO `tl_lasprd10_spreadsheet` (`uid`, `create_date`, `update_date`, `create_by`, `title`, `run_offline`, `is_learner_allowed_to_save`, + `is_marking_enabled`, `lock_on_finished`, `instructions`, `code`, `online_instructions`, `offline_instructions`, `content_in_use`, `define_later`, + `content_id`, `reflect_on_activity`) VALUES + (1,NULL,NULL,NULL,'Spreadsheet','0','1','0','0','Instructions ','',null,null,0,0,${default_content_id},0); + +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_spreadsheet/db/sql/drop_lams_tool_spreadsheet.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/drop_lams_tool_spreadsheet.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/drop_lams_tool_spreadsheet.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,13 @@ +SET FOREIGN_KEY_CHECKS=0; +drop table if exists tl_lasprd10_attachment; +drop table if exists tl_lasprd10_spreadsheet; +drop table if exists tl_lasprd10_user_edited_spreadsheet; +drop table if exists tl_lasprd10_spreadsheet_mark; +drop table if exists tl_lasprd10_session; +drop table if exists tl_lasprd10_user; +SET FOREIGN_KEY_CHECKS=1; + + + + + Index: lams_tool_spreadsheet/db/sql/library_insert.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/library_insert.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/library_insert.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,18 @@ +# Connection: ROOT LOCAL +# Host: localhost +# Saved: 2005-04-07 10:50:55 +# +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'Spreadsheet Tool', +'Spreadsheet', +0, +NOW() +) Index: lams_tool_spreadsheet/db/sql/table-schema.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/table-schema.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/table-schema.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,26 @@ +alter table tl_lasprd10_attachment drop foreign key FK_NEW_2065267438_1E7009430E79035; +alter table tl_lasprd10_spreadsheet drop foreign key FK_NEW_2065267438_89093BF758092FB; +alter table tl_lasprd10_session drop foreign key FK_NEW_2065267438_24AA78C530E79035; +alter table tl_lasprd10_user drop foreign key FK_NEW_2065267438_30113BFC30E79035; +alter table tl_lasprd10_user drop foreign key FK_NEW_2065267438_30113BFCEC0D3147; +alter table tl_lasprd10_user drop foreign key FK_NEW_2065267438_63195BC941F9365D; +alter table tl_lasprd10_user_edited_spreadsheet drop foreign key FK_tl_lasprd10_user_edited_spreadsheet_1; +drop table if exists tl_lasprd10_attachment; +drop table if exists tl_lasprd10_user_edited_spreadsheet; +drop table if exists tl_lasprd10_spreadsheet_mark; +drop table if exists tl_lasprd10_spreadsheet; +drop table if exists tl_lasprd10_session; +drop table if exists tl_lasprd10_user; +create table tl_lasprd10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, spreadsheet_uid bigint, primary key (uid)); +create table tl_lasprd10_user_edited_spreadsheet (uid bigint, user_edited_spreadsheet text, mark_id bigint, primary key (uid)); +create table tl_lasprd10_spreadsheet_mark (uid bigint, marks varchar(255), comments text, date_marks_released datetime, primary key (uid)); +create table tl_lasprd10_spreadsheet (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), run_offline bit, is_learner_allowed_to_save bit, is_marking_enabled bit, lock_on_finished bit, instructions text, code text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, content_id bigint unique, reflect_instructions varchar(255), reflect_on_activity bit, primary key (uid)); +create table tl_lasprd10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, spreadsheet_uid bigint, session_id bigint, session_name varchar(250), primary key (uid)); +create table tl_lasprd10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), first_name varchar(255), login_name varchar(255), session_uid bigint, spreadsheet_uid bigint, session_finished bit, user_edited_spreadsheet_uid bigint, primary key (uid)); +alter table tl_lasprd10_attachment add index FK_NEW_2065267438_1E7009430E79035 (spreadsheet_uid), add constraint FK_NEW_2065267438_1E7009430E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_spreadsheet add index FK_NEW_2065267438_89093BF758092FB (create_by), add constraint FK_NEW_2065267438_89093BF758092FB foreign key (create_by) references tl_lasprd10_user (uid); +alter table tl_lasprd10_session add index FK_NEW_2065267438_24AA78C530E79035 (spreadsheet_uid), add constraint FK_NEW_2065267438_24AA78C530E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_user add index FK_NEW_2065267438_30113BFC30E79035 (spreadsheet_uid), add constraint FK_NEW_2065267438_30113BFC30E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_user add index FK_NEW_2065267438_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_2065267438_30113BFCEC0D3147 foreign key (session_uid) references tl_lasprd10_session (uid); +alter table tl_lasprd10_user add index FK_NEW_2065267438_63195BC941F9365D (user_edited_spreadsheet_uid), add constraint FK_NEW_2065267438_63195BC941F9365D foreign key (user_edited_spreadsheet_uid) references tl_lasprd10_user_edited_spreadsheet (uid); +alter table tl_lasprd10_user_edited_spreadsheet add index FK_tl_lasprd10_user_edited_spreadsheet_1 (mark_id), add constraint FK_tl_lasprd10_user_edited_spreadsheet_1 foreign key (mark_id) references tl_lasprd10_spreadsheet_mark (uid); \ No newline at end of file Index: lams_tool_spreadsheet/db/sql/tool_insert.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/tool_insert.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/tool_insert.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,64 @@ +# Connection: ROOT LOCAL +# Host: localhost +# Saved: 2005-04-07 10:42:43 +# +INSERT INTO lams_tool +( +tool_signature, +service_name, +tool_display_name, +description, +tool_identifier, +tool_version, +learning_library_id, +default_tool_content_id, +valid_flag, +grouping_support_type_id, +supports_run_offline_flag, +learner_url, +learner_preview_url, +learner_progress_url, +author_url, +monitor_url, +define_later_url, +export_pfolio_learner_url, +export_pfolio_class_url, +contribute_url, +moderation_url, +help_url, +language_file, +classpath_addition, +context_file, +create_date_time, +modified_date_time +) +VALUES +( +'lasprd10', +'spreadsheetService', +'Spreadsheet Tool', +'Spreadsheet Tool', +'spreadsheet', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/lasprd10/learning/start.do?mode=learner', +'tool/lasprd10/learning/start.do?mode=author', +'tool/lasprd10/learning/start.do?mode=teacher', +'tool/lasprd10/authoring/start.do', +'tool/lasprd10/monitoring/summary.do', +'tool/lasprd10/definelater.do', +'tool/lasprd10/exportPortfolio?mode=learner', +'tool/lasprd10/exportPortfolio?mode=teacher', +'tool/lasprd10/contribute.do', +'tool/lasprd10/moderate.do', +'http://wiki.lamsfoundation.org/display/lamsdocs/lasprd10', +'org.lamsfoundation.lams.tool.spreadsheet.ApplicationResources', +'lams-tool-lasprd10.jar', +'/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml', +NOW(), +NOW() +) Index: lams_tool_spreadsheet/db/sql/updatescripts/updateTo20070227.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/updatescripts/updateTo20070227.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/updatescripts/updateTo20070227.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,4 @@ +-- Update the Spreadsheet tables to 20070227 +-- This is for the LAMS 2.0.1 release. + +UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lasprd10.jar', context_file = '/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml' where tool_signature = 'lasprd10'; Index: lams_tool_spreadsheet/db/sql/updatescripts/updateTo20080229.sql =================================================================== diff -u --- lams_tool_spreadsheet/db/sql/updatescripts/updateTo20080229.sql (revision 0) +++ lams_tool_spreadsheet/db/sql/updatescripts/updateTo20080229.sql (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,23 @@ +-- LDEV1511 make tables InnoDB +ALTER TABLE tl_lasprd10_attachment ENGINE=InnoDB; +ALTER TABLE tl_lasprd10_item_instruction ENGINE=InnoDB; +ALTER TABLE tl_lasprd10_item_log ENGINE=InnoDB; +ALTER TABLE tl_lasprd10_spreadsheet ENGINE=InnoDB; +ALTER TABLE tl_lasprd10_spreadsheet_item ENGINE=InnoDB; +ALTER TABLE tl_lasprd10_session ENGINE=InnoDB; +ALTER TABLE tl_lasprd10_user ENGINE=InnoDB; + +alter table tl_lasprd10_attachment add constraint FK_NEW_2065267438_1E7009430E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_item_instruction add constraint FK_NEW_2065267438_A5665013980570ED foreign key (item_uid) references tl_lasprd10_spreadsheet_item (uid); +alter table tl_lasprd10_spreadsheet add constraint FK_NEW_2065267438_89093BF758092FB foreign key (create_by) references tl_lasprd10_user (uid); +alter table tl_lasprd10_spreadsheet_item add constraint FK_NEW_2065267438_F52D1F93758092FB foreign key (create_by) references tl_lasprd10_user (uid); +alter table tl_lasprd10_spreadsheet_item add constraint FK_NEW_2065267438_F52D1F9330E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_spreadsheet_item add constraint FK_NEW_2065267438_F52D1F93EC0D3147 foreign key (session_uid) references tl_lasprd10_session (uid); +alter table tl_lasprd10_item_log add constraint FK_NEW_2065267438_693580A438BF8DFE foreign key (spreadsheet_item_uid) references tl_lasprd10_spreadsheet_item (uid); +alter table tl_lasprd10_item_log add constraint FK_NEW_2065267438_693580A441F9365D foreign key (user_uid) references tl_lasprd10_user (uid); +alter table tl_lasprd10_session add constraint FK_NEW_2065267438_24AA78C530E79035 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); +alter table tl_lasprd10_user add constraint FK_NEW_2065267438_30113BFCEC0D3147 foreign key (session_uid) references tl_lasprd10_session (uid); +alter table tl_lasprd10_user add constraint FK_NEW_2065267438_30113BFC309ED320 foreign key (spreadsheet_uid) references tl_lasprd10_spreadsheet (uid); + +UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = "lasprd10"; +UPDATE lams_tool SET tool_version = "20080229" WHERE tool_signature = "lasprd10"; Index: lams_tool_spreadsheet/lib/jaxen/jaxen-full.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/jaxen/sax.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/jaxen/saxpath.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/castor-0.9.5.3-xml.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/jdom.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/moonunitsrc.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/reload-diva.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/reload-editor.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/reload-jdom.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/reload-moonunit.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/xercesImpl.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/lib/reload_2_0_1/xml-apis.jar =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/licenses/Jaxen LICENSE.txt =================================================================== diff -u --- lams_tool_spreadsheet/licenses/Jaxen LICENSE.txt (revision 0) +++ lams_tool_spreadsheet/licenses/Jaxen LICENSE.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,33 @@ +/* + $Id$ + + Copyright 2003-2006 The Werken Company. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Jaxen Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + */ Index: lams_tool_spreadsheet/licenses/castor license.txt =================================================================== diff -u --- lams_tool_spreadsheet/licenses/castor license.txt (revision 0) +++ lams_tool_spreadsheet/licenses/castor license.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,38 @@ +Copyright 2000-2002 (C) Intalio Inc. All Rights Reserved. + +Redistribution and use of this software and associated documentation +("Software"), with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions of source code must retain copyright statements + and notices. Redistributions must also contain a copy of this + document. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. The name "ExoLab" must not be used to endorse or promote products + derived from this Software without prior written permission of + Intalio Inc. For written permission, please contact info@exolab.org. + +4. Products derived from this Software may not be called "Castor" + nor may "Castor" appear in their names without prior written + permission of Intalio Inc. Exolab, Castor and Intalio are + trademarks of Intalio Inc. + +5. Due credit should be given to the ExoLab Project + (http://www.exolab.org/). + +THIS SOFTWARE IS PROVIDED BY INTALIO AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO OR ITS +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. Index: lams_tool_spreadsheet/licenses/jdom licence.txt =================================================================== diff -u --- lams_tool_spreadsheet/licenses/jdom licence.txt (revision 0) +++ lams_tool_spreadsheet/licenses/jdom licence.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,54 @@ +/*-- + + Copyright (C) 2000-2002 Brett McLaughlin & Jason Hunter. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact license@jdom.org. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management (pm@jdom.org). + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Brett McLaughlin and + Jason Hunter . For more information on the + JDOM Project, please see . + + */ + Index: lams_tool_spreadsheet/licenses/library_licenses.txt =================================================================== diff -u --- lams_tool_spreadsheet/licenses/library_licenses.txt (revision 0) +++ lams_tool_spreadsheet/licenses/library_licenses.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,28 @@ +Tigra Tree Javascript license description: +There is no license fee or royalty fee to be paid at any time for using the Tigra Tree Menu v1.x +You may include the source code or modified source code within your own projects for either personal or commercial use but excluding the restrictions outlined below. The following restrictions apply to all parts of the component, including all source code, samples and documentation. + + * Header block of script file (tree.js) CAN NOT be modified or removed. + * The above items CAN NOT be sold as are, either individually or together. + * The above items CAN NOT be modified and then sold as a library component, either individually or together. + + +For more detail, http://www.softcomplex.com/products/tigra_tree_menu/docs/ + +Library/Package License + +Used for the IMSCP functionality (Reload Project) +castor-0.9.5.3-xml.jar Castor License +jdom.jar Jdom Jar License +moonunitsrc.jar Reload License +reload-diva.jar Reload License +reload-editor.jar Reload License +reload-jdom.jar Reload License +reload-moonunit.jar Reload License +xercesImpl.jar Apache Software License 1.1 +xml-apis.jar Apache Software License 1.1 + +Other libraries +jaxen-full.jar Jaxen Jar License (The Werken Company) +sax.jar Public Domain +saxpath.jar Jaxen Jar License (The Werken Company) Index: lams_tool_spreadsheet/licenses/reload licence.txt =================================================================== diff -u --- lams_tool_spreadsheet/licenses/reload licence.txt (revision 0) +++ lams_tool_spreadsheet/licenses/reload licence.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,45 @@ +RELOAD Tools and Libraries + +Copyright (c) 2002-2004 Oleg Liber, Bill Olivier, Phillip Beauvoir + +This licence covers: + +The Reload "jdom" library +The Reload "diva" library +The Reload "dweezil" library +The Reload "jdom" library +The Reload "moonunit" library +The Reload "xindice" library +The Reload Editor +The Reload SCORM Player +The Reload Schema Viewer Eclipse Plugin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Project Management Contact: + +Oleg Liber +Bolton Institute of Higher Education +Deane Road +Bolton BL3 5AB +UK + +e-mail: o.liber@bolton.ac.uk + + +Technical Contact: + +Phillip Beauvoir +Bolton Institute of Higher Education +Deane Road +Bolton BL3 5AB +UK + +e-mail: p.beauvoir@bolton.ac.uk + + +Web: http://www.reload.ac.uk Index: lams_tool_spreadsheet/licenses/xerces licence.txt =================================================================== diff -u --- lams_tool_spreadsheet/licenses/xerces licence.txt (revision 0) +++ lams_tool_spreadsheet/licenses/xerces licence.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,56 @@ +/* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Xerces" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation and was + * originally based on software copyright (c) 1999, International + * Business Machines, Inc., http://www.ibm.com. For more + * information on the Apache Software Foundation, please see + * . + */ Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/SpreadsheetConstants.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/SpreadsheetConstants.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/SpreadsheetConstants.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,96 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet; + +public class SpreadsheetConstants { + public static final String TOOL_SIGNATURE = "lasprd10"; + public static final String RESOURCE_SERVICE = "spreadsheetService"; + public static final String TOOL_CONTENT_HANDLER_NAME = "spreadsheetToolContentHandler"; + + public static final int COMPLETED = 1; + + //for action forward name + public static final String SUCCESS = "success"; + public static final String ERROR = "error"; + public static final String DEFINE_LATER = "definelater"; + + //for parameters' name + public static final String PARAM_TOOL_CONTENT_ID = "toolContentID"; + public static final String PARAM_TOOL_SESSION_ID = "toolSessionID"; + public static final String PARAM_FILE_VERSION_ID = "fileVersionId"; + public static final String PARAM_FILE_UUID = "fileUuid"; + public static final String PARAM_ITEM_INDEX = "itemIndex"; + public static final String PARAM_RESOURCE_ITEM_UID = "itemUid"; + public static final String PARAM_RUN_OFFLINE = "runOffline"; + public static final String PARAM_OPEN_URL_POPUP = "popupUrl"; + public static final String PARAM_TITLE = "title"; + + //for request attribute name + public static final String ATTR_TOOL_CONTENT_ID = "toolContentID"; + public static final String ATTR_TOOL_SESSION_ID = "toolSessionID"; + public static final String ATTR_INSTRUCTION_LIST = "instructionList"; + public static final String ATTR_RESOURCE_ITEM_LIST = "spreadsheetList"; + public static final String ATT_ATTACHMENT_LIST = "instructionAttachmentList"; + public static final String ATTR_DELETED_RESOURCE_ITEM_LIST = "deleteSpreadsheetList"; + public static final String ATTR_DELETED_ATTACHMENT_LIST = "deletedAttachmmentList"; + public static final String ATTR_RESOURCE = "spreadsheet"; + public static final String ATTR_RESOURCE_ITEM_UID = "itemUid"; + public static final String ATTR_NEXT_ACTIVITY_URL = "nextActivityUrl"; + public static final String ATTR_SUMMARY_LIST = "summaryList"; + public static final String ATTR_STATISTIC_LIST = "statisticList"; + public static final String ATTR_USER_LIST = "userList"; + public static final String ATTR_RESOURCE_INSTRUCTION = "instructions"; + public static final String ATTR_FINISH_LOCK = "finishedLock"; + public static final String ATTR_LOCK_ON_FINISH = "lockOnFinish"; + public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; + public static final String ATTR_RESOURCE_FORM = "spreadsheetForm"; + public static final String ATTR_ADD_RESOURCE_TYPE = "addType"; + public static final String ATTR_FILE_TYPE_FLAG = "fileTypeFlag"; + public static final String ATTR_TITLE = "title"; + public static final String ATTR_INSTRUCTIONS = "instructions"; + public static final String ATTR_USER_FINISHED = "userFinished"; + + //error message keys + public static final String ERROR_MSG_TITLE_BLANK = "error.resource.item.title.blank"; + public static final String ERROR_MSG_URL_BLANK = "error.resource.item.url.blank"; + public static final String ERROR_MSG_DESC_BLANK = "error.resource.item.desc.blank"; + public static final String ERROR_MSG_FILE_BLANK = "error.resource.item.file.blank"; + public static final String ERROR_MSG_INVALID_URL = "error.resource.item.invalid.url"; + public static final String ERROR_MSG_UPLOAD_FAILED = "error.upload.failed"; + + + public static final String PAGE_EDITABLE = "isPageEditable"; + public static final String MODE_AUTHOR_SESSION = "author_session"; + public static final String ATTR_REFLECTION_ON = "reflectOn"; + public static final String ATTR_REFLECTION_INSTRUCTION = "reflectInstructions"; + public static final String ATTR_REFLECTION_ENTRY = "reflectEntry"; + + public static final String ATTR_REFLECT_LIST = "reflectList"; + public static final String ATTR_USER_UID = "userUid"; + public static final String ATTR_USER_NAME = "userName"; + public static final String ATTR_CODE = "code"; + + public static final String DEFUALT_PROTOCOL_REFIX = "http://"; + public static final String ALLOW_PROTOCOL_REFIX = new String("[http://|https://|ftp://|nntp://]"); +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/DAO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/DAO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/DAO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,70 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao; + +import java.io.Serializable; +import java.util.List; + + +/** + * Data Access Object (DAO) interface. This is an interface + * used to tag our DAO classes and to provide common methods to all DAOs. + * + * @author Andrey Balan + */ +public interface DAO { + + /** + * Generic method used to get all objects of a particular type. This + * is the same as lookup up all rows in a table. + * @param clazz the type of objects (a.k.a. while table) to get data from + * @return List of populated objects + */ + public List getObjects(Class clazz); + + /** + * Generic method to get an object based on class and identifier. An + * ObjectRetrievalFailureException Runtime Exception is thrown if + * nothing is found. + * + * @param clazz model class to lookup + * @param id the identifier (primary key) of the class + * @return a populated object + * @see org.springframework.orm.ObjectRetrievalFailureException + */ + public Object getObject(Class clazz, Serializable id); + + /** + * Generic method to save an object - handles both update and insert. + * @param o the object to save + */ + public void saveObject(Object o); + + /** + * Generic method to delete an object based on class and id + * @param clazz model class to lookup + * @param id the identifier (primary key) of the class + */ + public void removeObject(Class clazz, Serializable id); +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetAttachmentDAO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetAttachmentDAO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetAttachmentDAO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,28 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao; + +public interface SpreadsheetAttachmentDAO extends DAO { + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetDAO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetDAO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetDAO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,36 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao; + +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; + +public interface SpreadsheetDAO extends DAO { + + Spreadsheet getByContentId(Long contentId); + + Spreadsheet getByUid(Long spreadsheetUid); + + void delete(Spreadsheet spreadsheet); + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetSessionDAO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetSessionDAO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetSessionDAO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,41 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao; + +import java.util.List; + +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; + +public interface SpreadsheetSessionDAO extends DAO { + + SpreadsheetSession getSessionBySessionId(Long sessionId); + + List getByContentId(Long toolContentId); + + void delete(SpreadsheetSession session); + + void deleteBySessionId(Long toolSessionId); + + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetUserDAO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetUserDAO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/SpreadsheetUserDAO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,37 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao; + +import java.util.List; + +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; + +public interface SpreadsheetUserDAO extends DAO { + + SpreadsheetUser getUserByUserIDAndSessionID(Long userID, Long sessionId); + + SpreadsheetUser getUserByUserIDAndContentID(Long userId, Long contentId); + + List getBySessionID(Long sessionId); +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/UserEditedSpreadsheetDAO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/UserEditedSpreadsheetDAO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/UserEditedSpreadsheetDAO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,33 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao; + +import java.util.List; +import java.util.Map; + +import org.lamsfoundation.lams.tool.spreadsheet.dto.Summary; + +public interface UserEditedSpreadsheetDAO extends DAO { + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/BaseDAOHibernate.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/BaseDAOHibernate.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/BaseDAOHibernate.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,72 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao.hibernate; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.lamsfoundation.lams.tool.spreadsheet.dao.DAO; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + +/** + * This class serves as the Base class for all other DAOs - namely to hold + * common methods that they might all use. Can be used for standard CRUD + * operations.

+ * + * @author Dapeng.Ni + */ +public class BaseDAOHibernate extends HibernateDaoSupport implements DAO { + protected final Log log = LogFactory.getLog(getClass()); + + /** + * @see com.edgenius.paradise.dao.DAO#saveObject(java.lang.Object) + */ + public void saveObject(Object o) { + getHibernateTemplate().saveOrUpdate(o); + } + + /** + * @see com.edgenius.paradise.dao.DAO#getObject(java.lang.Class, java.io.Serializable) + */ + public Object getObject(Class clazz, Serializable id) { + Object o = getHibernateTemplate().get(clazz, id); + return o; + } + + /** + * @see com.edgenius.paradise.dao.DAO#getObjects(java.lang.Class) + */ + public List getObjects(Class clazz) { + return getHibernateTemplate().loadAll(clazz); + } + + /** + * @see com.edgenius.paradise.dao.DAO#removeObject(java.lang.Class, java.io.Serializable) + */ + public void removeObject(Class clazz, Serializable id) { + getHibernateTemplate().delete(getObject(clazz, id)); + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetAttachmentDAOHibernate.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetAttachmentDAOHibernate.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetAttachmentDAOHibernate.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,30 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao.hibernate; + +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetAttachmentDAO; + +public class SpreadsheetAttachmentDAOHibernate extends BaseDAOHibernate implements SpreadsheetAttachmentDAO{ + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetDAOHibernate.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetDAOHibernate.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetDAOHibernate.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,56 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetDAO; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; + +/** + * + * @author Steve.Ni + * + * @version $Revision$ + */ +public class SpreadsheetDAOHibernate extends BaseDAOHibernate implements SpreadsheetDAO{ + private static final String GET_RESOURCE_BY_CONTENTID = "from "+Spreadsheet.class.getName()+" as r where r.contentId=?"; + + public Spreadsheet getByContentId(Long contentId) { + List list = getHibernateTemplate().find(GET_RESOURCE_BY_CONTENTID,contentId); + if(list.size() > 0) + return (Spreadsheet) list.get(0); + else + return null; + } + + public Spreadsheet getByUid(Long spreadsheetUid) { + return (Spreadsheet) getObject(Spreadsheet.class,spreadsheetUid); + } + + public void delete(Spreadsheet spreadsheet) { + this.getHibernateTemplate().delete(spreadsheet); + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetSessionDAOHibernate.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetSessionDAOHibernate.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetSessionDAOHibernate.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,54 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetSessionDAO; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; + + +public class SpreadsheetSessionDAOHibernate extends BaseDAOHibernate implements SpreadsheetSessionDAO{ + + private static final String FIND_BY_SESSION_ID = "from " + SpreadsheetSession.class.getName() + " as p where p.sessionId=?"; + private static final String FIND_BY_CONTENT_ID = "from " + SpreadsheetSession.class.getName() + " as p where p.spreadsheet.contentId=?"; + + public SpreadsheetSession getSessionBySessionId(Long sessionId) { + List list = getHibernateTemplate().find(FIND_BY_SESSION_ID,sessionId); + if(list == null || list.size() == 0) + return null; + return (SpreadsheetSession) list.get(0); + } + public List getByContentId(Long toolContentId) { + return getHibernateTemplate().find(FIND_BY_CONTENT_ID,toolContentId); + } + + public void delete(SpreadsheetSession session) { + this.getHibernateTemplate().delete(session); + } + public void deleteBySessionId(Long toolSessionId) { + this.removeObject(SpreadsheetSession.class,toolSessionId); + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetUserDAOHibernate.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetUserDAOHibernate.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/SpreadsheetUserDAOHibernate.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,57 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetUserDAO; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; + + +public class SpreadsheetUserDAOHibernate extends BaseDAOHibernate implements SpreadsheetUserDAO{ + + private static final String FIND_BY_USER_ID_CONTENT_ID = "from " + SpreadsheetUser.class.getName() + " as u where u.userId =? and u.spreadsheet.contentId=?"; + private static final String FIND_BY_USER_ID_SESSION_ID = "from " + SpreadsheetUser.class.getName() + " as u where u.userId =? and u.session.sessionId=?"; + private static final String FIND_BY_SESSION_ID = "from " + SpreadsheetUser.class.getName() + " as u where u.session.sessionId=?"; + + public SpreadsheetUser getUserByUserIDAndSessionID(Long userID, Long sessionId) { + List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_SESSION_ID,new Object[]{userID,sessionId}); + if(list == null || list.size() == 0) + return null; + return (SpreadsheetUser) list.get(0); + } + + public SpreadsheetUser getUserByUserIDAndContentID(Long userId, Long contentId) { + List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_CONTENT_ID,new Object[]{userId,contentId}); + if(list == null || list.size() == 0) + return null; + return (SpreadsheetUser) list.get(0); + } + + public List getBySessionID(Long sessionId) { + return this.getHibernateTemplate().find(FIND_BY_SESSION_ID,sessionId); + } + + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/UserEditedSpreadsheetDAOHibernate.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/UserEditedSpreadsheetDAOHibernate.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dao/hibernate/UserEditedSpreadsheetDAOHibernate.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dao.hibernate; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.lamsfoundation.lams.tool.spreadsheet.dao.UserEditedSpreadsheetDAO; + +public class UserEditedSpreadsheetDAOHibernate extends BaseDAOHibernate implements UserEditedSpreadsheetDAO{ + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/ReflectDTO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/ReflectDTO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/ReflectDTO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,67 @@ +package org.lamsfoundation.lams.tool.spreadsheet.dto; + +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; + +/** + * + * @author Andrey Balan + * + */ +public class ReflectDTO { + private Long userUid; + private String fullName; + private String loginName; + private boolean hasRefection; + private String reflectInstrctions; + private boolean finishReflection; + private String reflect; + + public ReflectDTO(SpreadsheetUser user) { + this.setLoginName(user.getLoginName()); + this.setFullName(user.getFirstName()+" "+user.getLastName()); + this.setUserUid(user.getUid()); + } + + public boolean isFinishReflection() { + return finishReflection; + } + public void setFinishReflection(boolean finishReflection) { + this.finishReflection = finishReflection; + } + public String getFullName() { + return fullName; + } + public void setFullName(String fullName) { + this.fullName = fullName; + } + public boolean isHasRefection() { + return hasRefection; + } + public void setHasRefection(boolean hasRefection) { + this.hasRefection = hasRefection; + } + public String getLoginName() { + return loginName; + } + public void setLoginName(String loginName) { + this.loginName = loginName; + } + public String getReflect() { + return reflect; + } + public void setReflect(String reflect) { + this.reflect = reflect; + } + public String getReflectInstrctions() { + return reflectInstrctions; + } + public void setReflectInstrctions(String reflectInstrctions) { + this.reflectInstrctions = reflectInstrctions; + } + public Long getUserUid() { + return userUid; + } + public void setUserUid(Long userUid) { + this.userUid = userUid; + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/StatisticDTO.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/StatisticDTO.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/StatisticDTO.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,74 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dto; + +/** + * @author Andrey Balan + */ +public class StatisticDTO { + + private String sessionName; + private int markedCounter; + private int notMarkedCounter; + private int totalSpreadsheetsSentByLearners; + + public StatisticDTO() { + } + + public StatisticDTO(String sessionName, int notMarkedCounter, int markedCounter, int totalSpreadsheetsSentByLearners) { + this.sessionName = sessionName; + this.notMarkedCounter = notMarkedCounter; + this.markedCounter = markedCounter; + this.totalSpreadsheetsSentByLearners = totalSpreadsheetsSentByLearners; + } + + public String getSessionName() { + return sessionName; + } + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + public int getMarkedCounter() { + return markedCounter; + } + public void setMarkedCount(int markedCounter) { + this.markedCounter = markedCounter; + } + + public int getNotMarkedCounter() { + return notMarkedCounter; + } + public void setNotMarkedCounter(int notMarkedCounter) { + this.notMarkedCounter = notMarkedCounter; + } + + public int getTotalSpreadsheetsSentByLearners() { + return totalSpreadsheetsSentByLearners; + } + public void setTotalSpreadsheetsSentByLearners(int totalSpreadsheetsSentByLearners) { + this.totalSpreadsheetsSentByLearners = totalSpreadsheetsSentByLearners; + } +} + \ No newline at end of file Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/Summary.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/Summary.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/dto/Summary.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,130 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.dto; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.util.SpreadsheetWebUtils; + +/** + * List contains following element:
+ * + *
  • session_id
  • + *
  • session_name
  • + *
  • SpreadsheetItem.uid
  • + *
  • SpreadsheetItem.item_type
  • + *
  • SpreadsheetItem.create_by_author
  • + *
  • SpreadsheetItem.is_hide
  • + *
  • SpreadsheetItem.title
  • + *
  • User.login_name
  • + *
  • count(spreadsheet_item_uid)
  • + * + * @author Andrey Balan + */ +public class Summary { + + private Long sessionId; + private String sessionName; + private Spreadsheet spreadsheet; + private List users; + + public Summary(){} + /** + * Contruction method for monitoring summary function. + * + * Don't not set isInitGroup and viewNumber fields + * @param sessionName + * @param item + * @param isInitGroup + */ + public Summary(String sessionName, Spreadsheet spreadsheet, List users){ + this.sessionName = sessionName; + this.spreadsheet = spreadsheet; + if (users != null) { + this.users = users; + } else { + this.users = new ArrayList(); + } + } +// /** +// * Contruction method for export profolio function. +// * +// * Don't not set sessionId and viewNumber fields +// * @param sessionName +// * @param item +// * @param isInitGroup +// */ +// public Summary(Long sessionId, String sessionName, SpreadsheetItem item,boolean isInitGroup){ +// this.sessionId = sessionId; +// this.sessionName = sessionName; +// if(item != null){ +// this.itemUid = item.getUid(); +// this.itemType = item.getType(); +// this.itemCreateByAuthor = item.isCreateByAuthor(); +// this.itemHide = item.isHide(); +// this.itemTitle = item.getTitle(); +// this.username = item.getCreateBy() == null?"":item.getCreateBy().getLoginName(); +// this.url = SpreadsheetWebUtils.protocol(item.getUrl()); +// this.fileName = item.getFileName(); +// this.fileUuid = item.getFileUuid(); +// this.fileVersionId = item.getFileVersionId(); +// +// for (SpreadsheetItemInstruction instruction : (Set)item.getItemInstructions()) { +// itemInstructions.add(instruction.getDescription()); +// } +// }else +// this.itemUid = new Long(-1); +// this.isInitGroup = isInitGroup; +// } + + public Long getSessionId() { + return sessionId; + } + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + public String getSessionName() { + return sessionName; + } + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + public Spreadsheet getSpreadsheet() { + return spreadsheet; + } + public void setSpreadsheet(Spreadsheet spreadsheet) { + this.spreadsheet = spreadsheet; + } + public List getUsers() { + return users; + } + public void setUsers(List users) { + this.users = users; + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.hbm.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.hbm.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.hbm.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,512 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.ItemNotFoundException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.spreadsheet.util.SpreadsheetToolContentHandler; + +/** + * Spreadsheet + * @author Andrey Balan + * + * @hibernate.class table="tl_lasprd10_spreadsheet" + * + */ +public class Spreadsheet implements Cloneable { + + private static final Logger log = Logger.getLogger(Spreadsheet.class); + + //key + private Long uid; + //tool contentID + private Long contentId; + private String title; + private String instructions; + private String code; + + //advance + private boolean runOffline; + private boolean isLearnerAllowedToSave; + private boolean isMarkingEnabled; + + private boolean lockWhenFinished; + private boolean defineLater; + private boolean contentInUse; + //instructions + private String onlineInstructions; + private String offlineInstructions; + private Set attachments; + + //general infomation + private Date created; + private Date updated; + private SpreadsheetUser createdBy; + + private boolean reflectOnActivity; + private String reflectInstructions; + + //*************** NON Persist Fields ******************** + private IToolContentHandler toolContentHandler; + + private List onlineFileList; + private List offlineFileList; + /** + * Default contruction method. + * + */ + public Spreadsheet(){ + attachments = new HashSet(); + } +// ********************************************************** + // Function method for Spreadsheet +// ********************************************************** + public static Spreadsheet newInstance(Spreadsheet defaultContent, Long contentId, SpreadsheetToolContentHandler spreadsheetToolContentHandler) { + Spreadsheet toContent = new Spreadsheet(); + defaultContent.toolContentHandler = spreadsheetToolContentHandler; + toContent = (Spreadsheet) defaultContent.clone(); + toContent.setContentId(contentId); + + //reset user info as well + if(toContent.getCreatedBy() != null){ + toContent.getCreatedBy().setSpreadsheet(toContent); + } + return toContent; + } + public Object clone(){ + + Spreadsheet spreadsheet = null; + try{ + spreadsheet = (Spreadsheet) super.clone(); + spreadsheet.setUid(null); + //clone attachment + if(attachments != null){ + Iterator iter = attachments.iterator(); + Set set = new HashSet(); + while(iter.hasNext()){ + SpreadsheetAttachment file = (SpreadsheetAttachment)iter.next(); + SpreadsheetAttachment newFile = (SpreadsheetAttachment) file.clone(); + //just clone old file without duplicate it in repository + set.add(newFile); + } + spreadsheet.attachments = set; + } + //clone ReourceUser as well + if(this.createdBy != null){ + spreadsheet.setCreatedBy((SpreadsheetUser) this.createdBy.clone()); + } + } catch (CloneNotSupportedException e) { + log.error("When clone " + Spreadsheet.class + " failed"); + } + + return spreadsheet; + } + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof Spreadsheet)) + return false; + + final Spreadsheet genericEntity = (Spreadsheet) o; + + return new EqualsBuilder() + .append(this.uid,genericEntity.uid) + .append(this.title,genericEntity.title) + .append(this.instructions,genericEntity.instructions) + .append(this.code,genericEntity.code) + .append(this.onlineInstructions,genericEntity.onlineInstructions) + .append(this.offlineInstructions,genericEntity.offlineInstructions) + .append(this.created,genericEntity.created) + .append(this.updated,genericEntity.updated) + .append(this.createdBy,genericEntity.createdBy) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(title) + .append(instructions).append(onlineInstructions) + .append(code).append(code) + .append(offlineInstructions).append(created) + .append(updated).append(createdBy) + .toHashCode(); + } + + /** + * Updates the modification data for this entity. + */ + public void updateModificationData() { + + long now = System.currentTimeMillis(); + if (created == null) { + this.setCreated (new Date(now)); + } + this.setUpdated(new Date(now)); + } + + public void toDTO(){ + onlineFileList = new ArrayList(); + offlineFileList = new ArrayList(); + Set fileSet = this.getAttachments(); + if(fileSet != null){ + for(SpreadsheetAttachment file:fileSet){ + if(StringUtils.equalsIgnoreCase(file.getFileType(),IToolContentHandler.TYPE_OFFLINE)) + offlineFileList.add(file); + else + onlineFileList.add(file); + } + } + } + + //********************************************************** + // get/set methods + //********************************************************** + /** + * Returns the object's creation date + * + * @return date + * @hibernate.property column="create_date" + */ + public Date getCreated() { + return created; + } + /** + * Sets the object's creation date + * + * @param created + */ + public void setCreated(Date created) { + this.created = created; + } + + /** + * Returns the object's date of last update + * + * @return date updated + * @hibernate.property column="update_date" + */ + public Date getUpdated() { + return updated; + } + /** + * Sets the object's date of last update + * + * @param updated + */ + public void setUpdated(Date updated) { + this.updated = updated; + } + + /** + * @return Returns the userid of the user who created the Share spreadsheet. + * + * @hibernate.many-to-one + * cascade="save-update" + * column="create_by" + */ + public SpreadsheetUser getCreatedBy() { + return createdBy; + } + /** + * @param createdBy The userid of the user who created this Share spreadsheet. + */ + public void setCreatedBy(SpreadsheetUser createdBy) { + this.createdBy = createdBy; + } + + /** + * @hibernate.id column="uid" generator-class="native" + */ + public Long getUid() { + return uid; + } + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @return Returns the title. + * + * @hibernate.property + * column="title" + */ + public String getTitle() { + return title; + } + /** + * @param title The title to set. + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * @return Returns the runOffline. + * + * @hibernate.property + * column="run_offline" + */ + public boolean getRunOffline() { + return runOffline; + } + /** + * @param runOffline The forceOffLine to set. + */ + public void setRunOffline(boolean forceOffline) { + this.runOffline = forceOffline; + } + + /** + * @return Returns whether learner is allowed to save spreadsheet. + * + * @hibernate.property column="is_learner_allowed_to_save" + */ + public boolean isLearnerAllowedToSave() { + return isLearnerAllowedToSave; + } + /** + * @param isLearnerAllowedToSave boolean describing whether learner is allowed to save spreadsheet or not + */ + public void setLearnerAllowedToSave(boolean isLearnerAllowedToSave) { + this.isLearnerAllowedToSave = isLearnerAllowedToSave; + } + + /** + * @return Returns whether the marking is enabled. + * + * @hibernate.property column="is_marking_enabled" + */ + public boolean isMarkingEnabled() { + return isMarkingEnabled; + } + /** + * @param isMarkingEnabled boolean describing wwhether the marking is enabled + */ + public void setMarkingEnabled(boolean isMarkingEnabled) { + this.isMarkingEnabled = isMarkingEnabled; + } + + /** + * @return Returns the lockWhenFinish. + * + * @hibernate.property + * column="lock_on_finished" + */ + public boolean getLockWhenFinished() { + return lockWhenFinished; + } + /** + * @param lockWhenFinished Set to true to lock the spreadsheet for finished users. + */ + public void setLockWhenFinished(boolean lockWhenFinished) { + this.lockWhenFinished = lockWhenFinished; + } + + /** + * @return Returns the instructions set by the teacher. + * + * @hibernate.property + * column="instructions" + * type="text" + */ + public String getInstructions() { + return instructions; + } + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @return Returns spreadsheet code. + * + * @hibernate.property + * column="code" + * type="text" + */ + public String getCode() { + return code; + } + public void setCode(String code) { + this.code = code; +// this.code = javaScriptEscape(code);; + } + + /** + * @return Returns the onlineInstructions set by the teacher. + * + * @hibernate.property + * column="online_instructions" + * type="text" + */ + public String getOnlineInstructions() { + return onlineInstructions; + } + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + /** + * @return Returns the onlineInstructions set by the teacher. + * + * @hibernate.property + * column="offline_instructions" + * type="text" + */ + public String getOfflineInstructions() { + return offlineInstructions; + } + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + /** + * + * @hibernate.set lazy="true" + * cascade="all" + * inverse="false" + * order-by="create_date desc" + * @hibernate.collection-key column="spreadsheet_uid" + * @hibernate.collection-one-to-many + * class="org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetAttachment" + * + * @return a set of Attachments to this Message. + */ + public Set getAttachments() { + return attachments; + } + /** + * @param attachments The attachments to set. + */ + public void setAttachments(Set attachments) { + this.attachments = attachments; + } + + /** + * @hibernate.property column="content_in_use" + * @return + */ + public boolean isContentInUse() { + return contentInUse; + } + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @hibernate.property column="define_later" + * @return + */ + public boolean isDefineLater() { + return defineLater; + } + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + /** + * @hibernate.property column="content_id" unique="true" + * @return + */ + public Long getContentId() { + return contentId; + } + public void setContentId(Long contentId) { + this.contentId = contentId; + } + + public List getOfflineFileList() { + return offlineFileList; + } + public void setOfflineFileList(List offlineFileList) { + this.offlineFileList = offlineFileList; + } + + public List getOnlineFileList() { + return onlineFileList; + } + public void setOnlineFileList(List onlineFileList) { + this.onlineFileList = onlineFileList; + } + + public void setToolContentHandler(IToolContentHandler toolContentHandler) { + this.toolContentHandler = toolContentHandler; + } + + /** + * @hibernate.property column="reflect_instructions" + * @return + */ + public String getReflectInstructions() { + return reflectInstructions; + } + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + /** + * @hibernate.property column="reflect_on_activity" + * @return + */ + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + private static String javaScriptEscape(String input) { + StringBuffer filtered = new StringBuffer(); + + for ( char c : input.toCharArray() ) { + switch (c) { + case '\'': + filtered.append("\\'"); + break; + + case '"': + filtered.append("\\\""); + break; + + case '\n': case '\r': + break; + + default: + filtered.append(c); + } + } + return filtered.toString(); + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.hbm.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.hbm.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.hbm.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,163 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; + +/** + * @author Andrey Balan + * + * A Wrapper class for uploaded files. An Attachment cannot exist independently + * and must belong to a Spreadsheet. + * + * + * @hibernate.class table="tl_lasprd10_attachment" + * + */ +public class SpreadsheetAttachment implements Cloneable{ + private static final Logger log = Logger.getLogger(SpreadsheetAttachment.class); + + private Long uid; + private Long fileUuid; + private Long fileVersionId; + private String fileType; + private String fileName; + private Date created; + + //Default contruction method + public SpreadsheetAttachment(){ + + } +// ********************************************************** + // Function method for Attachment +// ********************************************************** + public Object clone(){ + Object obj = null; + try { + obj = super.clone(); + ((SpreadsheetAttachment)obj).setUid(null); + } catch (CloneNotSupportedException e) { + log.error("When clone " + SpreadsheetAttachment.class + " failed"); + } + + return obj; + } + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof SpreadsheetAttachment)) + return false; + + final SpreadsheetAttachment genericEntity = (SpreadsheetAttachment) o; + + return new EqualsBuilder() + .append(this.uid,genericEntity.uid) + .append(this.fileVersionId,genericEntity.fileVersionId) + .append(this.fileName,genericEntity.fileName) + .append(this.fileType,genericEntity.fileType) + .append(this.created,genericEntity.created) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(fileVersionId).append(fileName).append(fileType).append(created) + .toHashCode(); + } + +// ********************************************************** + // get/set methods +// ********************************************************** + /** + * @hibernate.id column="uid" generator-class="native" + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="file_version_id" + * + */ + public Long getFileVersionId() { + return fileVersionId; + } + + public void setFileVersionId(Long version) { + this.fileVersionId = version; + } + + /** + * @hibernate.property column="file_type" + */ + public String getFileType() { + return fileType; + } + + public void setFileType(String type) { + this.fileType = type; + } + + /** + * @hibernate.property column="file_name" + */ + public String getFileName() { + return fileName; + } + + public void setFileName(String name) { + this.fileName = name; + } + + + /** + * @hibernate.property column="file_uuid" + * @return + */ + public Long getFileUuid() { + return fileUuid; + } + + public void setFileUuid(Long uuid) { + this.fileUuid = uuid; + } + /** + * @hibernate.property column="create_date" + * @return + */ + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetMark.hbm.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetMark.hbm.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetMark.hbm.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetMark.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetMark.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetMark.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,152 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.log4j.Logger; + +/** + * SpreadsheetMark + * @author Andrey Balan + * + * @hibernate.class table="tl_lasprd10_spreadsheet_mark" + */ +public class SpreadsheetMark { + + private static final long serialVersionUID = -3415065437595925246L; + + private static Logger log = Logger.getLogger(SpreadsheetMark.class); + + /** identifier field */ + private Long uid; + + private Long marks; + private String comments; + private Date dateMarksReleased; + + /** default constructor */ + public SpreadsheetMark() { + } + + /** full constructor */ + public SpreadsheetMark(String comments, Long marks, Date dateMarksReleased) { + this.comments = comments; + this.marks = marks; + this.dateMarksReleased = dateMarksReleased; + } + + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + */ + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="marks" + */ + public Long getMarks() { + return this.marks; + } + + public void setMarks(Long marks) { + this.marks = marks; + } + + /** + * @hibernate.property column="comments" type="text" + */ + public String getComments() { + return this.comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + /** + * @hibernate.property column="date_marks_released" + */ + public Date getDateMarksReleased() { + return this.dateMarksReleased; + } + + public void setDateMarksReleased(Date dateMarksReleased) { + this.dateMarksReleased = dateMarksReleased; + } + public String toString() { + return new ToStringBuilder(this) + .append("reportID", getUid()) + .append("comments", getComments()) + .append("marks", getMarks()) + .append("dateMarksReleased", getDateMarksReleased()) + .toString(); + } + + /* (non-Javadoc) + * @see java.lang.Object#clone() + */ + public Object clone() { + + Object obj = null; + try { + obj = super.clone(); + //never clone key! + ((SpreadsheetMark)obj).setUid(null); + } catch (CloneNotSupportedException e) { + log.error("When clone " + SpreadsheetMark.class + " failed"); + } + return obj; + } + + public boolean equals(Object other) { + if ( (this == other ) ) return true; + if ( !(other instanceof SpreadsheetMark) ) return false; + SpreadsheetMark castOther = (SpreadsheetMark) other; + return new EqualsBuilder() + .append(this.getUid(), castOther.getUid()) + .append(this.getComments(), castOther.getComments()) + .append(this.getMarks(), castOther.getMarks()) + .append(this.getDateMarksReleased(), castOther.getDateMarksReleased()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder() + .append(getUid()) + .append(getComments()) + .append(getMarks()) + .append(getDateMarksReleased()) + .toHashCode(); + } +} + \ No newline at end of file Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.hbm.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.hbm.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.hbm.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,136 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.model; + +import java.util.Date; +import java.util.Set; + +import org.apache.log4j.Logger; + +/** + * Spreadsheet + * @author Andrey Balan + * + * @hibernate.class table="tl_lasprd10_session" + * + */ +public class SpreadsheetSession{ + + private static Logger log = Logger.getLogger(SpreadsheetSession.class); + + private Long uid; + private Long sessionId; + private String sessionName; + private Spreadsheet spreadsheet; + private Date sessionStartDate; + private Date sessionEndDate; + //finish or not + private int status; + + +// ********************************************************** + // Get/Set methods +// ********************************************************** + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the learnerID. + */ + public Long getUid() { + return uid; + } + public void setUid(Long uuid) { + this.uid = uuid; + } + + /** + * @hibernate.property column="session_end_date" + * @return + */ + public Date getSessionEndDate() { + return sessionEndDate; + } + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + /** + * @hibernate.property column="session_start_date" + * + * @return + */ + public Date getSessionStartDate() { + return sessionStartDate; + } + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + /** + * @hibernate.property + * @return + */ + public int getStatus() { + return status; + } + public void setStatus(int status) { + this.status = status; + } + + /** + * @hibernate.many-to-one column="spreadsheet_uid" + * cascade="none" + * @return + */ + public Spreadsheet getSpreadsheet() { + return spreadsheet; + } + public void setSpreadsheet(Spreadsheet spreadsheet) { + this.spreadsheet = spreadsheet; + } + /** + * @hibernate.property column="session_id" + * @return + */ + public Long getSessionId() { + return sessionId; + } + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + + /** + * @hibernate.property column="session_name" length="250" + * @return Returns the session name + */ + public String getSessionName() { + return sessionName; + } + + /** + * + * @param sessionName The session name to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.hbm.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.hbm.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.hbm.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,234 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.model; + +import java.io.Serializable; +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +/** + * Spreadsheet + * @author Andrey Balan + * + * @hibernate.class table="tl_lasprd10_user" + * + */ +public class SpreadsheetUser implements Cloneable, Serializable{ + private static final long serialVersionUID = -7043502180037866257L; + private static Logger log = Logger.getLogger(SpreadsheetUser.class); + + private Long uid; + private Long userId; + private String firstName; + private String lastName; + private String loginName; + private boolean sessionFinished; + + private SpreadsheetSession session; + private Spreadsheet spreadsheet; + private UserEditedSpreadsheet userEditedSpreadsheet; + + //=============== NON Persisit value: for display use =========== + //the user access some reousrce item date time. Use in monitoring summary page + private Date accessDate; + + public SpreadsheetUser(){ + } + public SpreadsheetUser(UserDTO user, SpreadsheetSession session){ + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = session; + this.spreadsheet = null; + this.sessionFinished = false; + } + public SpreadsheetUser(UserDTO user, Spreadsheet content){ + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = null; + this.spreadsheet = content; + this.sessionFinished = false; + } + /** + * Clone method from java.lang.Object + */ + public Object clone(){ + + SpreadsheetUser user = null; + try{ + user = (SpreadsheetUser) super.clone(); + user.setUid(null); + //never clone session + user.setSession(null); + } catch (CloneNotSupportedException e) { + log.error("When clone " + SpreadsheetUser.class + " failed"); + } + + return user; + } +// ********************************************************** + // Get/Set methods +// ********************************************************** + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the uid. + */ + public Long getUid() { + return uid; + } + /** + * @param uid The uid to set. + */ + public void setUid(Long userID) { + this.uid = userID; + } + + /** + * @hibernate.property column="user_id" length="20" + * @return Returns the userId. + */ + public Long getUserId() { + return userId; + } + /** + * @param userId + * The userId to set. + */ + public void setUserId(Long userID) { + this.userId = userID; + } + + /** + * @hibernate.property length="255" column="last_name" + * @return + */ + public String getLastName() { + return lastName; + } + public void setLastName(String lastName) { + this.lastName = lastName; + } + /** + * @hibernate.property length="255" column="first_name" + * @return + */ + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + /** + * @hibernate.property column="login_name" + * @return + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + /** + * @hibernate.many-to-one column="session_uid" + * cascade="none" + * @return + */ + public SpreadsheetSession getSession() { + return session; + } + + public void setSession(SpreadsheetSession session) { + this.session = session; + } + /** + * @hibernate.many-to-one column="spreadsheet_uid" + * cascade="none" + * @return + */ + public Spreadsheet getSpreadsheet() { + return spreadsheet; + } + public void setSpreadsheet(Spreadsheet spreadsheet) { + this.spreadsheet = spreadsheet; + } + /** + * @hibernate.many-to-one column="user_edited_spreadsheet_uid" + * cascade="all" + * + * @return + */ + public UserEditedSpreadsheet getUserEditedSpreadsheet() { + return userEditedSpreadsheet; + } + public void setUserEditedSpreadsheet(UserEditedSpreadsheet userEditedSpreadsheet) { + this.userEditedSpreadsheet = userEditedSpreadsheet; + } + /** + * @hibernate.property column="session_finished" + * @return + */ + public boolean isSessionFinished() { + return sessionFinished; + } + + public void setSessionFinished(boolean sessionFinished) { + this.sessionFinished = sessionFinished; + } + + public boolean equals(Object obj) { + if (this == obj) + return true; + if (!(obj instanceof SpreadsheetUser)) + return false; + + final SpreadsheetUser user = (SpreadsheetUser) obj; + + return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName) + .append(this.lastName,user.lastName).append(this.loginName, user.loginName).isEquals(); + + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(firstName) + .append(lastName).append(loginName) + .toHashCode(); + } + public Date getAccessDate() { + return accessDate; + } + public void setAccessDate(Date accessDate) { + this.accessDate = accessDate; + } + + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.hbm.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.hbm.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.hbm.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,74 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.model; + +import java.util.Date; +/** + * Spreadsheet + * @author Andrey Balan + * + * @hibernate.class table="tl_lasprd10_user_edited_spreadsheet" + * + */ +public class UserEditedSpreadsheet { + + private Long uid; + private String userEditedSpreadsheet; + private SpreadsheetMark mark; + + + /** + * @hibernate.id column="uid" generator-class="native" + */ + public Long getUid() { + return uid; + } + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="user_edited_spreadsheet" type="text" + * + * + * @return + */ + public String getUserEditedSpreadsheet() { + return userEditedSpreadsheet; + } + public void setUserEditedSpreadsheet(String userEditedSpreadsheet) { + this.userEditedSpreadsheet = userEditedSpreadsheet; + } + + /** + * @hibernate.id column="mark_id" + */ + public SpreadsheetMark getMark() { + return mark; + } + public void setMark(SpreadsheetMark mark) { + this.mark = mark; + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/ISpreadsheetService.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/ISpreadsheetService.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/ISpreadsheetService.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,214 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.service; + +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; + +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.IVersionedNode; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.spreadsheet.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.StatisticDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.Summary; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetAttachment; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; + +/** + * @author Andrey Balan + * + * Interface that defines the contract that all ShareSpreadsheet service provider must follow. + */ +public interface ISpreadsheetService{ + + /** + * Get Spreadsheet by toolContentID. + * @param contentId + * @return + */ + Spreadsheet getSpreadsheetByContentId(Long contentId); + /** + * Get a cloned copy of tool default tool content (Spreadsheet) and assign the toolContentId of that copy as the + * given contentId + * @param contentId + * @return + * @throws SpreadsheetApplicationException + */ + Spreadsheet getDefaultContent(Long contentId) throws SpreadsheetApplicationException; + + /** + * Upload instruciton file into repository. + * @param file + * @param type + * @return + * @throws UploadSpreadsheetFileException + */ + SpreadsheetAttachment uploadInstructionFile(FormFile file, String type) throws UploadSpreadsheetFileException; + + //********** user methods ************* + /** + * Save or update SpreadsheetUser in database, mostly for saving userEditedSpreadsheet. + * + * @param user user which did modifications to spreadsheet + */ + void saveOrUpdateUser(SpreadsheetUser spreadsheetUser); + + /** + * Get user by given userID and toolContentID. + * @param long1 + * @return + */ + SpreadsheetUser getUserByIDAndContent(Long userID, Long contentId); + + /** + * Get user by sessionID and UserID + * @param long1 + * @param sessionId + * @return + */ + SpreadsheetUser getUserByIDAndSession(Long long1, Long sessionId); + +// /** +// * Get user list by sessionId and itemUid +// * +// * @param sessionId +// * @param uid +// * @return +// */ +// List getUserListBySessionItem(Long sessionId, Long itemUid); + + //********** Repository methods *********************** + /** + * Delete file from repository. + */ + void deleteFromRepository(Long fileUuid, Long fileVersionId) throws SpreadsheetApplicationException ; + + /** + * Save or update spreadsheet into database. + * @param Spreadsheet + */ + void saveOrUpdateSpreadsheet(Spreadsheet Spreadsheet); + /** + * Delete reource attachment(i.e., offline/online instruction file) from database. This method does not + * delete the file from repository. + * + * @param attachmentUid + */ + void deleteSpreadsheetAttachment(Long attachmentUid); + + /** + * Get spreadsheet which is relative with the special toolSession. + * @param sessionId + * @return + */ + Spreadsheet getSpreadsheetBySessionId(Long sessionId); + /** + * Get spreadsheet toolSession by toolSessionId + * @param sessionId + * @return + */ + SpreadsheetSession getSpreadsheetSessionBySessionId(Long sessionId); + + /** + * Save or update spreadsheet session. + * @param resSession + */ + void saveOrUpdateSpreadsheetSession(SpreadsheetSession resSession); + + /** + * If success return next activity's url, otherwise return null. + * @param toolSessionId + * @param userId + * @return + */ + String finishToolSession(Long toolSessionId, Long userId) throws SpreadsheetApplicationException; + + /** + * Return monitoring summary list. The return value is list of spreadsheet summaries for each groups. + * @param contentId + * @return + */ + List getSummary(Long contentId); + + /** + * Return monitoring statistic list. The return value is list of statistics for each groups. + * @param contentId + * @return + */ + List getStatistics(Long contentId); + + /** + * Get spreadsheet item Summary list according to sessionId and skipHide flag. + * + * @param sessionId + * @param skipHide true, don't get spreadsheet item if its isHide flag is true. + * Otherwise, get all spreadsheet item + * @return + */ + public List exportBySessionId(Long sessionId, boolean skipHide); + public List> exportByContentId(Long contentId); + + /** + * Create refection entry into notebook tool. + * @param sessionId + * @param notebook_tool + * @param tool_signature + * @param userId + * @param entryText + */ + public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId, String entryText); + /** + * Get reflection entry from notebook tool. + * @param sessionId + * @param idType + * @param signature + * @param userID + * @return + */ + public NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID); + + /** + * @param notebookEntry + */ + public void updateEntry(NotebookEntry notebookEntry); + + /** + * Get Reflect DTO list grouped by sessionID. + * @param contentId + * @return + */ + Map> getReflectList(Long contentId, boolean setEntry); + + /** + * Get user by UID + * @param uid + * @return + */ + SpreadsheetUser getUser(Long uid); +} + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetApplicationException.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetApplicationException.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetApplicationException.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,48 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.service; + +public class SpreadsheetApplicationException extends Exception{ + + public SpreadsheetApplicationException() { + super(); + + } + + public SpreadsheetApplicationException(String message, Throwable cause) { + super(message, cause); + + } + + public SpreadsheetApplicationException(String message) { + super(message); + + } + + public SpreadsheetApplicationException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,866 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.service; +import java.io.File; +import java.io.FileFilter; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedMap; +import java.util.SortedSet; +import java.util.TreeMap; +import java.util.TreeSet; +import java.util.Vector; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.AccessDeniedException; +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.IVersionedNode; +import org.lamsfoundation.lams.contentrepository.InvalidParameterException; +import org.lamsfoundation.lams.contentrepository.LoginException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; +import org.lamsfoundation.lams.learning.service.ILearnerService; +import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; +import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; +import org.lamsfoundation.lams.tool.ToolContentImport102Manager; +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.ToolSessionExportOutputData; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetAttachmentDAO; +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetDAO; +import org.lamsfoundation.lams.tool.spreadsheet.dao.UserEditedSpreadsheetDAO; +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetSessionDAO; +import org.lamsfoundation.lams.tool.spreadsheet.dao.SpreadsheetUserDAO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.StatisticDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.Summary; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetAttachment; +import org.lamsfoundation.lams.tool.spreadsheet.model.UserEditedSpreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.util.ReflectDTOComparator; +import org.lamsfoundation.lams.tool.spreadsheet.util.SpreadsheetToolContentHandler; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.util.MessageService; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.util.audit.IAuditService; +import org.lamsfoundation.lams.util.wddx.WDDXProcessor; +import org.lamsfoundation.lams.util.wddx.WDDXProcessorConversionException; +import org.lamsfoundation.lams.util.zipfile.ZipFileUtil; +import org.lamsfoundation.lams.util.zipfile.ZipFileUtilException; + +/** + * + * @author Andrey Balan + * + */ +public class SpreadsheetServiceImpl implements ISpreadsheetService,ToolContentManager, ToolSessionManager, ToolContentImport102Manager { + static Logger log = Logger.getLogger(SpreadsheetServiceImpl.class.getName()); + private SpreadsheetDAO spreadsheetDao; + private SpreadsheetAttachmentDAO spreadsheetAttachmentDao; + private SpreadsheetUserDAO spreadsheetUserDao; + private SpreadsheetSessionDAO spreadsheetSessionDao; + private UserEditedSpreadsheetDAO userEditedSpreadsheetDao; + //tool service + private SpreadsheetToolContentHandler spreadsheetToolContentHandler; + private MessageService messageService; + //system services + private IRepositoryService repositoryService; + private ILamsToolService toolService; + private ILearnerService learnerService; + private IAuditService auditService; + private IUserManagementService userManagementService; + private IExportToolContentService exportContentService; + private ICoreNotebookService coreNotebookService; + + //******************************************************************************* + // Service method + //******************************************************************************* + /** Try to get the file. If forceLogin = false and an access denied exception occurs, call this method + * again to get a new ticket and retry file lookup. If forceLogin = true and it then fails + * then throw exception. + * @param uuid + * @param versionId + * @param relativePath + * @param attemptCount + * @return file node + * @throws ImscpApplicationException + */ + private IVersionedNode getFile(Long uuid, Long versionId, String relativePath) throws SpreadsheetApplicationException { + + ITicket tic = getRepositoryLoginTicket(); + + try { + + return repositoryService.getFileItem(tic, uuid, versionId, relativePath); + + } catch (AccessDeniedException e) { + + String error = "Unable to access repository to get file uuid "+uuid + +" version id "+versionId + +" path " + relativePath+"."; + + error = error+"AccessDeniedException: "+e.getMessage()+" Unable to retry further."; + log.error(error); + throw new SpreadsheetApplicationException(error,e); + + } catch (Exception e) { + + String error = "Unable to access repository to get file uuid "+uuid + +" version id "+versionId + +" path " + relativePath+"." + +" Exception: "+e.getMessage(); + log.error(error); + throw new SpreadsheetApplicationException(error,e); + + } + } + /** + * This method verifies the credentials of the Spreadsheet Tool and gives it + * the Ticket to login and access the Content Repository. + * + * A valid ticket is needed in order to access the content from the + * repository. This method would be called evertime the tool needs to + * upload/download files from the content repository. + * + * @return ITicket The ticket for repostory access + * @throws SpreadsheetApplicationException + */ + private ITicket getRepositoryLoginTicket() throws SpreadsheetApplicationException { + ICredentials credentials = new SimpleCredentials( + spreadsheetToolContentHandler.getRepositoryUser(), + spreadsheetToolContentHandler.getRepositoryId()); + try { + ITicket ticket = repositoryService.login(credentials, + spreadsheetToolContentHandler.getRepositoryWorkspaceName()); + return ticket; + } catch (AccessDeniedException ae) { + throw new SpreadsheetApplicationException("Access Denied to repository." + + ae.getMessage()); + } catch (WorkspaceNotFoundException we) { + throw new SpreadsheetApplicationException("Workspace not found." + + we.getMessage()); + } catch (LoginException e) { + throw new SpreadsheetApplicationException("Login failed." + e.getMessage()); + } + } + + + public Spreadsheet getSpreadsheetByContentId(Long contentId) { + Spreadsheet rs = spreadsheetDao.getByContentId(contentId); + if(rs == null){ + log.error("Could not find the content by given ID:"+contentId); + } + return rs; + } + + + public Spreadsheet getDefaultContent(Long contentId) throws SpreadsheetApplicationException { + if (contentId == null) + { + String error=messageService.getMessage("error.msg.default.content.not.find"); + log.error(error); + throw new SpreadsheetApplicationException(error); + } + + Spreadsheet defaultContent = getDefaultSpreadsheet(); + //save default content by given ID. + Spreadsheet content = new Spreadsheet(); + content = Spreadsheet.newInstance(defaultContent,contentId,spreadsheetToolContentHandler); + return content; + } + + public SpreadsheetAttachment uploadInstructionFile(FormFile uploadFile, String fileType) throws UploadSpreadsheetFileException { + if(uploadFile == null || StringUtils.isEmpty(uploadFile.getFileName())) + throw new UploadSpreadsheetFileException(messageService.getMessage("error.msg.upload.file.not.found",new Object[]{uploadFile})); + + //upload file to repository + NodeKey nodeKey = processFile(uploadFile,fileType); + + //create new attachement + SpreadsheetAttachment file = new SpreadsheetAttachment(); + file.setFileType(fileType); + file.setFileUuid(nodeKey.getUuid()); + file.setFileVersionId(nodeKey.getVersion()); + file.setFileName(uploadFile.getFileName()); + file.setCreated(new Date()); + + return file; + } + + public void saveOrUpdateUser(SpreadsheetUser spreadsheetUser) { + spreadsheetUserDao.saveObject(spreadsheetUser); + } + + public SpreadsheetUser getUserByIDAndContent(Long userId, Long contentId) { + return (SpreadsheetUser) spreadsheetUserDao.getUserByUserIDAndContentID(userId,contentId); + } + + public SpreadsheetUser getUserByIDAndSession(Long userId, Long sessionId) { + return (SpreadsheetUser) spreadsheetUserDao.getUserByUserIDAndSessionID(userId,sessionId); + } + +// public List getUserListBySessionItem(Long sessionId, Long itemUid) { +// List logList = taskListItemVisitDao.getTaskListItemLogBySession(sessionId,itemUid); +// List userList = new ArrayList(logList.size()); +// for(TaskListItemVisitLog visit : logList){ +// SpreadsheetUser user = visit.getUser(); +// user.setAccessDate(visit.getAccessDate()); +// userList.add(user); +// } +// return userList; +// } + + public void deleteFromRepository(Long fileUuid, Long fileVersionId) throws SpreadsheetApplicationException { + ITicket ticket = getRepositoryLoginTicket(); + try { + repositoryService.deleteVersion(ticket, fileUuid,fileVersionId); + } catch (Exception e) { + throw new SpreadsheetApplicationException( + "Exception occured while deleting files from" + + " the repository " + e.getMessage()); + } + } + + public void saveOrUpdateSpreadsheet(Spreadsheet spreadsheet) { + spreadsheetDao.saveObject(spreadsheet); + } + + public void deleteSpreadsheetAttachment(Long attachmentUid) { + spreadsheetAttachmentDao.removeObject(SpreadsheetAttachment.class, attachmentUid); + + } + + public List exportBySessionId(Long sessionId, boolean skipHide) { + SpreadsheetSession session = spreadsheetSessionDao.getSessionBySessionId(sessionId); + if(session == null){ + log.error("Failed get SpreadsheetSession by ID [" +sessionId + "]"); + return null; + } + //initial spreadsheet items list + List itemList = new ArrayList(); +// Set resList = session.getSpreadsheet().getSpreadsheetItems(); +// for(SpreadsheetItem item:resList){ +// if(skipHide && item.isHide()) +// continue; +// //if item is create by author +// if(item.isCreateByAuthor()){ +// Summary sum = new Summary(session.getSessionId(), session.getSessionName(),item,false); +// itemList.add(sum); +// } +// } +// +// //get this session's all spreadsheet items +// Set sessList =session.getSpreadsheetItems(); +// for(SpreadsheetItem item:sessList){ +// if(skipHide && item.isHide()) +// continue; +// +// //to skip all item create by author +// if(!item.isCreateByAuthor()){ +// Summary sum = new Summary(session.getSessionId(), session.getSessionName(),item,false); +// itemList.add(sum); +// } +// } + + return itemList; + } + + public List> exportByContentId(Long contentId) { + Spreadsheet spreadsheet = spreadsheetDao.getByContentId(contentId); + List> groupList = new ArrayList(); + +// //create init spreadsheet items list +// List initList = new ArrayList(); +// groupList.add(initList); +// Set resList = spreadsheet.getSpreadsheetItems(); +// for(SpreadsheetItem item:resList){ +// if(item.isCreateByAuthor()){ +// Summary sum = new Summary(null, null,item,true); +// initList.add(sum); +// } +// } +// +// //session by session +// List sessionList = spreadsheetSessionDao.getByContentId(contentId); +// for(SpreadsheetSession session:sessionList){ +// List group = new ArrayList(); +// //get this session's all spreadsheet items +// Set sessList =session.getSpreadsheetItems(); +// for(SpreadsheetItem item:sessList){ +// //to skip all item create by author +// if(!item.isCreateByAuthor()){ +// Summary sum = new Summary(session.getSessionId(), session.getSessionName(),item,false); +// group.add(sum); +// } +// } +// if(group.size() == 0){ +// group.add(new Summary(session.getSessionId(), session.getSessionName(),null,false)); +// } +// groupList.add(group); +// } + + return groupList; + } + public Spreadsheet getSpreadsheetBySessionId(Long sessionId){ + SpreadsheetSession session = spreadsheetSessionDao.getSessionBySessionId(sessionId); + //to skip CGLib problem + Long contentId = session.getSpreadsheet().getContentId(); + Spreadsheet res = spreadsheetDao.getByContentId(contentId); + return res; + } + public SpreadsheetSession getSpreadsheetSessionBySessionId(Long sessionId) { + return spreadsheetSessionDao.getSessionBySessionId(sessionId); + } + + + public void saveOrUpdateSpreadsheetSession(SpreadsheetSession resSession) { + spreadsheetSessionDao.saveObject(resSession); + } + + public String finishToolSession(Long toolSessionId, Long userId) throws SpreadsheetApplicationException { + SpreadsheetUser user = spreadsheetUserDao.getUserByUserIDAndSessionID(userId, toolSessionId); + user.setSessionFinished(true); + spreadsheetUserDao.saveObject(user); + +// SpreadsheetSession session = spreadsheetSessionDao.getSessionBySessionId(toolSessionId); +// session.setStatus(SpreadsheetConstants.COMPLETED); +// spreadsheetSessionDao.saveObject(session); + + String nextUrl = null; + try { + nextUrl = this.leaveToolSession(toolSessionId,userId); + } catch (DataMissingException e) { + throw new SpreadsheetApplicationException(e); + } catch (ToolException e) { + throw new SpreadsheetApplicationException(e); + } + return nextUrl; + } + + public List getSummary(Long contentId) { + Spreadsheet spreadsheet = spreadsheetDao.getByContentId(contentId); + List sessionList = spreadsheetSessionDao.getByContentId(contentId); + + List summaryList = new ArrayList(); + + //create the user list of all whom were started this task + for(SpreadsheetSession session:sessionList) { + List userList = spreadsheetUserDao.getBySessionID(session.getSessionId()); + + Summary summary = new Summary(session.getSessionName(), spreadsheet, userList); + summaryList.add(summary); + } + + return summaryList; + } + + public List getStatistics(Long contentId) { + List sessionList = spreadsheetSessionDao.getByContentId(contentId); + + List statisticList = new ArrayList(); + + for(SpreadsheetSession session:sessionList) { + List userList = spreadsheetUserDao.getBySessionID(session.getSessionId()); + int totalUserModifiedSpreadsheets = 0; + int totalMarkedSpreadsheets = 0; + for (SpreadsheetUser user:userList) { + if (user.getUserEditedSpreadsheet() != null) { + totalUserModifiedSpreadsheets++; + if (user.getUserEditedSpreadsheet().getMark() != null) + totalMarkedSpreadsheets++; + } + } + + StatisticDTO statistic = new StatisticDTO(session.getSessionName(), totalMarkedSpreadsheets, totalUserModifiedSpreadsheets - totalMarkedSpreadsheets, totalUserModifiedSpreadsheets); + statisticList.add(statistic); + } + + return statisticList; + } + + public Map> getReflectList(Long contentId, boolean setEntry){ + Map> map = new HashMap>(); + + List sessionList = spreadsheetSessionDao.getByContentId(contentId); + for(SpreadsheetSession session:sessionList){ + Long sessionId = session.getSessionId(); + boolean hasRefection = session.getSpreadsheet().isReflectOnActivity(); + Set list = new TreeSet(new ReflectDTOComparator()); + //get all users in this session + List users = spreadsheetUserDao.getBySessionID(sessionId); + for(SpreadsheetUser user : users){ + ReflectDTO ref = new ReflectDTO(user); + + if (setEntry) { + NotebookEntry entry = getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + SpreadsheetConstants.TOOL_SIGNATURE, user.getUserId().intValue()); + if (entry != null) { + ref.setReflect(entry.getEntry()); + } + } + + ref.setHasRefection(hasRefection); + list.add(ref); + } + map.put(sessionId, list); + } + + return map; + } + + public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId, String entryText) { + return coreNotebookService.createNotebookEntry(sessionId, notebookToolType, toolSignature, userId, "", entryText); + } + public NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID){ + List list = coreNotebookService.getEntry(sessionId, idType, signature, userID); + if (list == null || list.isEmpty()) { + return null; + } else { + return list.get(0); + } + } + + /** + * @param notebookEntry + */ + public void updateEntry(NotebookEntry notebookEntry) { + coreNotebookService.updateEntry(notebookEntry); + } + + public SpreadsheetUser getUser(Long uid){ + return (SpreadsheetUser) spreadsheetUserDao.getObject(SpreadsheetUser.class, uid); + } + //***************************************************************************** + // private methods + //***************************************************************************** + private Spreadsheet getDefaultSpreadsheet() throws SpreadsheetApplicationException { + Long defaultSpreadsheetId = getToolDefaultContentIdBySignature(SpreadsheetConstants.TOOL_SIGNATURE); + Spreadsheet defaultSpreadsheet = getSpreadsheetByContentId(defaultSpreadsheetId); + if(defaultSpreadsheet == null) + { + String error=messageService.getMessage("error.msg.default.content.not.find"); + log.error(error); + throw new SpreadsheetApplicationException(error); + } + + return defaultSpreadsheet; + } + private Long getToolDefaultContentIdBySignature(String toolSignature) throws SpreadsheetApplicationException + { + Long contentId = null; + contentId=new Long(toolService.getToolDefaultContentIdBySignature(toolSignature)); + if (contentId == null) + { + String error=messageService.getMessage("error.msg.default.content.not.find"); + log.error(error); + throw new SpreadsheetApplicationException(error); + } + return contentId; + } + /** + * Process an uploaded file. + * + * @throws SpreadsheetApplicationException + * @throws FileNotFoundException + * @throws IOException + * @throws RepositoryCheckedException + * @throws InvalidParameterException + */ + private NodeKey processFile(FormFile file, String fileType) throws UploadSpreadsheetFileException { + NodeKey node = null; + if (file!= null && !StringUtils.isEmpty(file.getFileName())) { + String fileName = file.getFileName(); + try { + node = spreadsheetToolContentHandler.uploadFile(file.getInputStream(), fileName, + file.getContentType(), fileType); + } catch (InvalidParameterException e) { + throw new UploadSpreadsheetFileException (messageService.getMessage("error.msg.invaid.param.upload")); + } catch (FileNotFoundException e) { + throw new UploadSpreadsheetFileException (messageService.getMessage("error.msg.file.not.found")); + } catch (RepositoryCheckedException e) { + throw new UploadSpreadsheetFileException (messageService.getMessage("error.msg.repository")); + } catch (IOException e) { + throw new UploadSpreadsheetFileException (messageService.getMessage("error.msg.io.exception")); + } + } + return node; + } + private NodeKey processPackage(String packageDirectory, String initFile) throws UploadSpreadsheetFileException { + NodeKey node = null; + try { + node = spreadsheetToolContentHandler.uploadPackage(packageDirectory, initFile); + } catch (InvalidParameterException e) { + throw new UploadSpreadsheetFileException (messageService.getMessage("error.msg.invaid.param.upload")); + } catch (RepositoryCheckedException e) { + throw new UploadSpreadsheetFileException (messageService.getMessage("error.msg.repository")); + } + return node; + } + + /** + * Find out default.htm/html or index.htm/html in the given directory folder + * @param packageDirectory + * @return + */ + private String findWebsiteInitialItem(String packageDirectory) { + File file = new File(packageDirectory); + if(!file.isDirectory()) + return null; + + File[] initFiles = file.listFiles(new FileFilter(){ + public boolean accept(File pathname) { + if(pathname == null || pathname.getName() == null) + return false; + String name = pathname.getName(); + if(name.endsWith("default.html") + ||name.endsWith("default.htm") + ||name.endsWith("index.html") + ||name.endsWith("index.htm")) + return true; + return false; + } + }); + if(initFiles != null && initFiles.length > 0) + return initFiles[0].getName(); + else + return null; + } + + + //***************************************************************************** + // set methods for Spring Bean + //***************************************************************************** + public void setAuditService(IAuditService auditService) { + this.auditService = auditService; + } + public void setLearnerService(ILearnerService learnerService) { + this.learnerService = learnerService; + } + public void setMessageService(MessageService messageService) { + this.messageService = messageService; + } + public void setRepositoryService(IRepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + public void setSpreadsheetAttachmentDao(SpreadsheetAttachmentDAO spreadsheetAttachmentDao) { + this.spreadsheetAttachmentDao = spreadsheetAttachmentDao; + } + public void setSpreadsheetDao(SpreadsheetDAO spreadsheetDao) { + this.spreadsheetDao = spreadsheetDao; + } + public void setSpreadsheetSessionDao(SpreadsheetSessionDAO spreadsheetSessionDao) { + this.spreadsheetSessionDao = spreadsheetSessionDao; + } + public void setSpreadsheetToolContentHandler(SpreadsheetToolContentHandler spreadsheetToolContentHandler) { + this.spreadsheetToolContentHandler = spreadsheetToolContentHandler; + } + public void setSpreadsheetUserDao(SpreadsheetUserDAO spreadsheetUserDao) { + this.spreadsheetUserDao = spreadsheetUserDao; + } + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + public void setUserEditedSpreadsheetDao(UserEditedSpreadsheetDAO userEditedSpreadsheetDao) { + this.userEditedSpreadsheetDao = userEditedSpreadsheetDao; + } + + //******************************************************************************* + //ToolContentManager, ToolSessionManager methods + //******************************************************************************* + + public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { + Spreadsheet toolContentObj = spreadsheetDao.getByContentId(toolContentId); + if(toolContentObj == null) { + try { + toolContentObj = getDefaultSpreadsheet(); + } catch (SpreadsheetApplicationException e) { + throw new DataMissingException(e.getMessage()); + } + } + if(toolContentObj == null) + throw new DataMissingException("Unable to find default content for the spreadsheet tool"); + + //set SpreadsheetToolContentHandler as null to avoid copy file node in repository again. + toolContentObj = Spreadsheet.newInstance(toolContentObj,toolContentId,null); + toolContentObj.setToolContentHandler(null); + toolContentObj.setOfflineFileList(null); + toolContentObj.setOnlineFileList(null); + try { + exportContentService.registerFileClassForExport(SpreadsheetAttachment.class.getName(),"fileUuid","fileVersionId"); + exportContentService.exportToolContent( toolContentId, toolContentObj,spreadsheetToolContentHandler, rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } + } + + public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath ,String fromVersion,String toVersion) throws ToolException { + + try { + exportContentService.registerFileClassForImport(SpreadsheetAttachment.class.getName() + ,"fileUuid","fileVersionId","fileName","fileType",null,null); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath,spreadsheetToolContentHandler,fromVersion,toVersion); + if(!(toolPOJO instanceof Spreadsheet)) + throw new ImportToolContentException("Import Share spreadsheet tool content failed. Deserialized object is " + toolPOJO); + Spreadsheet toolContentObj = (Spreadsheet) toolPOJO; + +// reset it to new toolContentId + toolContentObj.setContentId(toolContentId); + SpreadsheetUser user = spreadsheetUserDao.getUserByUserIDAndContentID(new Long(newUserUid.longValue()), toolContentId); + if(user == null){ + user = new SpreadsheetUser(); + UserDTO sysUser = ((User)userManagementService.findById(User.class,newUserUid)).getUserDTO(); + user.setFirstName(sysUser.getFirstName()); + user.setLastName(sysUser.getLastName()); + user.setLoginName(sysUser.getLogin()); + user.setUserId(new Long(newUserUid.longValue())); + user.setSpreadsheet(toolContentObj); + } + toolContentObj.setCreatedBy(user); + + spreadsheetDao.saveObject(toolContentObj); + } catch (ImportToolContentException e) { + throw new ToolException(e); + } + } + + /** Get the definitions for possible output for an activity, based on the toolContentId. These may be definitions that are always + * available for the tool (e.g. number of marks for Multiple Choice) or a custom definition created for a particular activity + * such as the answer to the third question contains the word Koala and hence the need for the toolContentId + * @return SortedMap of ToolOutputDefinitions with the key being the name of each definition + */ + public SortedMap getToolOutputDefinitions(Long toolContentId) throws ToolException { + return new TreeMap(); + } + + + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + if (toContentId == null) + throw new ToolException( + "Failed to create the SharedSpreadsheetFiles tool seession"); + + Spreadsheet spreadsheet = null; + if ( fromContentId != null ) { + spreadsheet = spreadsheetDao.getByContentId(fromContentId); + } + if ( spreadsheet == null ) { + try { + spreadsheet = getDefaultSpreadsheet(); + } catch (SpreadsheetApplicationException e) { + throw new ToolException(e); + } + } + + Spreadsheet toContent = Spreadsheet.newInstance(spreadsheet,toContentId,spreadsheetToolContentHandler); + spreadsheetDao.saveObject(toContent); + } + + + public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Spreadsheet spreadsheet = spreadsheetDao.getByContentId(toolContentId); + if(spreadsheet == null){ + throw new ToolException("No found tool content by given content ID:" + toolContentId); + } + spreadsheet.setDefineLater(value); + } + + + public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Spreadsheet spreadsheet = spreadsheetDao.getByContentId(toolContentId); + if(spreadsheet == null){ + throw new ToolException("No found tool content by given content ID:" + toolContentId); + } + spreadsheet.setRunOffline(value); + } + + + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException { + Spreadsheet spreadsheet = spreadsheetDao.getByContentId(toolContentId); + if(removeSessionData){ + List list = spreadsheetSessionDao.getByContentId(toolContentId); + Iterator iter = list.iterator(); + while(iter.hasNext()){ + SpreadsheetSession session = (SpreadsheetSession ) iter.next(); + spreadsheetSessionDao.delete(session); + } + } + spreadsheetDao.delete(spreadsheet); + } + + + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { + SpreadsheetSession session = new SpreadsheetSession(); + session.setSessionId(toolSessionId); + session.setSessionName(toolSessionName); + Spreadsheet spreadsheet = spreadsheetDao.getByContentId(toolContentId); + session.setSpreadsheet(spreadsheet); + spreadsheetSessionDao.saveObject(session); + } + + + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + if(toolSessionId == null){ + log.error("Fail to leave tool Session based on null tool session id."); + throw new ToolException("Fail to remove tool Session based on null tool session id."); + } + if(learnerId == null){ + log.error("Fail to leave tool Session based on null learner."); + throw new ToolException("Fail to remove tool Session based on null learner."); + } + + SpreadsheetSession session = spreadsheetSessionDao.getSessionBySessionId(toolSessionId); + if(session != null){ + session.setStatus(SpreadsheetConstants.COMPLETED); + spreadsheetSessionDao.saveObject(session); + }else{ + log.error("Fail to leave tool Session.Could not find shared spreadsheet " + + "session by given session id: "+toolSessionId); + throw new DataMissingException("Fail to leave tool Session." + + "Could not find shared spreadsheet session by given session id: "+toolSessionId); + } + return learnerService.completeToolSession(toolSessionId,learnerId); + } + + + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { + return null; + } + + + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, ToolException { + return null; + } + + + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { + spreadsheetSessionDao.deleteBySessionId(toolSessionId); + } + + /** + * Get the tool output for the given tool output names. + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.util.List, java.lang.Long, java.lang.Long) + */ + public SortedMap getToolOutput(List names, + Long toolSessionId, Long learnerId) { + return new TreeMap(); + } + + /** + * Get the tool output for the given tool output name. + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.lang.String, java.lang.Long, java.lang.Long) + */ + public ToolOutput getToolOutput(String name, Long toolSessionId, + Long learnerId) { + return null; + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + + /** + * Import the data for a 1.0.2 Noticeboard or HTMLNoticeboard + */ + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) { } + + /** Set the description, throws away the title value as this is not supported in 2.0 */ + public void setReflectiveData(Long toolContentId, String title, String description) + throws ToolException, DataMissingException { + + Spreadsheet toolContentObj = getSpreadsheetByContentId(toolContentId); + if ( toolContentObj == null ) { + throw new DataMissingException("Unable to set reflective data titled "+title + +" on activity toolContentId "+toolContentId + +" as the tool content does not exist."); + } + + toolContentObj.setReflectOnActivity(Boolean.TRUE); + toolContentObj.setReflectInstructions(description); + } + + + /* =================================================================================== */ + + public IExportToolContentService getExportContentService() { + return exportContentService; + } + + + public void setExportContentService(IExportToolContentService exportContentService) { + this.exportContentService = exportContentService; + } + + + public IUserManagementService getUserManagementService() { + return userManagementService; + } + + + public void setUserManagementService(IUserManagementService userManagementService) { + this.userManagementService = userManagementService; + } + + + public ICoreNotebookService getCoreNotebookService() { + return coreNotebookService; + } + + + public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { + this.coreNotebookService = coreNotebookService; + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceProxy.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceProxy.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceProxy.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,75 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + + + + +/** + * @author Andrey Balan + * + *

    This class act as the proxy between web layer and service layer. It is + * designed to decouple the presentation logic and business logic completely. + * In this way, the presentation tier will no longer be aware of the changes in + * service layer. Therefore we can feel free to switch the business logic + * implementation.

    + */ +public class SpreadsheetServiceProxy +{ + /** + * Return the domain service object. It will delegate to the Spring + * helper method to retrieve the proper bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return Shared spreadsheet service object. + */ + public static final ISpreadsheetService getSpreadsheetService(ServletContext servletContext) + { + return (ISpreadsheetService)getSpreadsheetDomainService(servletContext); + } + + public static final ToolSessionManager getSessionManager(ServletContext servletContext) + { + return (ToolSessionManager)getSpreadsheetDomainService(servletContext); + } + + public static final ToolContentManager getContentManager(ServletContext servletContext) + { + return (ToolContentManager)getSpreadsheetDomainService(servletContext); + } + + private static Object getSpreadsheetDomainService(ServletContext servletContext) + { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean(SpreadsheetConstants.RESOURCE_SERVICE); + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/UploadSpreadsheetFileException.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/UploadSpreadsheetFileException.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/UploadSpreadsheetFileException.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,48 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.service; + +public class UploadSpreadsheetFileException extends Exception{ + + public UploadSpreadsheetFileException() { + super(); + + } + + public UploadSpreadsheetFileException(String message, Throwable cause) { + super(message, cause); + + } + + public UploadSpreadsheetFileException(String message) { + super(message); + + } + + public UploadSpreadsheetFileException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,136 @@ + + + + + + + + + org.lamsfoundation.lams.tool.spreadsheet.ApplicationResources + + + + + + + + + + + + org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetUser.hbm.xml + org/lamsfoundation/lams/tool/spreadsheet/model/Spreadsheet.hbm.xml + org/lamsfoundation/lams/tool/spreadsheet/model/UserEditedSpreadsheet.hbm.xml + org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetAttachment.hbm.xml + org/lamsfoundation/lams/tool/spreadsheet/model/SpreadsheetSession.hbm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED, -java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/ReflectDTOComparator.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/ReflectDTOComparator.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/ReflectDTOComparator.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,38 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +package org.lamsfoundation.lams.tool.spreadsheet.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.spreadsheet.dto.ReflectDTO; + +public class ReflectDTOComparator implements Comparator { + public int compare(ReflectDTO o1, ReflectDTO o2) { + if (o1 != null && o2 != null) { + return o1.getFullName().compareTo(o2.getFullName()); + } else if (o1 != null) + return 1; + else + return -1; + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/SpreadsheetToolContentHandler.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/SpreadsheetToolContentHandler.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/SpreadsheetToolContentHandler.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,68 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + * + * @author Fiona Malikoff + */ +public class SpreadsheetToolContentHandler extends ToolContentHandler { + + private static String repositoryWorkspaceName = "sharedspreadsheetworkspace"; + private static String repositoryUser = "sharedspreadsheet"; + //sharedspreadsheet + private static char[] repositoryId = {'l','a','m','s','-','s','h','a','r','e','d','r','e','s','o','u','r','c','e','s'}; + + /** + * + */ + public SpreadsheetToolContentHandler() { + super(); + } + + /* (non-Javadoc) + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryWorkspaceName() + */ + public String getRepositoryWorkspaceName() { + return repositoryWorkspaceName; + } + + /* (non-Javadoc) + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryUser() + */ + public String getRepositoryUser() { + return repositoryUser; + } + + /* (non-Javadoc) + * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryId() + */ + public char[] getRepositoryId() { + return repositoryId; + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/SpreadsheetWebUtils.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/SpreadsheetWebUtils.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/util/SpreadsheetWebUtils.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,54 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.util; + +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; + +/** + * Contains helper methods used by the Action Servlets + * + * @author Anthony Sukkar + * + */ +public class SpreadsheetWebUtils { + + /** + * If there is not url prefix, such as http://, https:// or ftp:// etc, this + * method will add default url protocol. + * + * @param url + * @return + */ + public static String protocol(String url) { + if (url == null) + return ""; + + if (!url.matches("^" + SpreadsheetConstants.ALLOW_PROTOCOL_REFIX + ".*")) + url = SpreadsheetConstants.DEFUALT_PROTOCOL_REFIX + url; + + return url; + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/AuthoringAction.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/AuthoringAction.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/AuthoringAction.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,556 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.action; + +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.authoring.web.AuthoringConstants; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetAttachment; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.service.ISpreadsheetService; +import org.lamsfoundation.lams.tool.spreadsheet.service.SpreadsheetApplicationException; +import org.lamsfoundation.lams.tool.spreadsheet.service.UploadSpreadsheetFileException; +import org.lamsfoundation.lams.tool.spreadsheet.util.SpreadsheetWebUtils; +import org.lamsfoundation.lams.tool.spreadsheet.web.form.SpreadsheetForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.FileValidatorUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + + +/** + * @author Steve.Ni + * @version $Revision$ + */ +public class AuthoringAction extends Action { + + private static Logger log = Logger.getLogger(AuthoringAction.class); + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception{ + + String param = mapping.getParameter(); + //-----------------------Spreadsheet Author function --------------------------- + if(param.equals("start")){ + ToolAccessMode mode = getAccessMode(request); + //teacher mode "check for new" button enter. + if(mode != null) + request.setAttribute(AttributeNames.ATTR_MODE,mode.toString()); + else + request.setAttribute(AttributeNames.ATTR_MODE,ToolAccessMode.AUTHOR.toString()); + return start(mapping, form, request, response); + } + if (param.equals("definelater")) { + //update define later flag to true + Long contentId = new Long(WebUtil.readLongParam(request,AttributeNames.PARAM_TOOL_CONTENT_ID)); + ISpreadsheetService service = getSpreadsheetService(); + Spreadsheet spreadsheet = service.getSpreadsheetByContentId(contentId); + + spreadsheet.setDefineLater(true); + service.saveOrUpdateSpreadsheet(spreadsheet); + + request.setAttribute(AttributeNames.ATTR_MODE,ToolAccessMode.TEACHER.toString()); + return start(mapping, form, request, response); + } + if (param.equals("initPage")) { + return initPage(mapping, form, request, response); + } + + if (param.equals("updateContent")) { + return updateContent(mapping, form, request, response); + } + if (param.equals("uploadOnlineFile")) { + return uploadOnline(mapping, form, request, response); + } + if (param.equals("uploadOfflineFile")) { + return uploadOffline(mapping, form, request, response); + } + if (param.equals("deleteOnlineFile")) { + return deleteOnlineFile(mapping, form, request, response); + } + if (param.equals("deleteOfflineFile")) { + return deleteOfflineFile(mapping, form, request, response); + } + + return mapping.findForward(SpreadsheetConstants.ERROR); + } + + /** + * Read spreadsheet data from database and put them into HttpSession. It will redirect to init.do directly after this + * method run successfully. + * + * This method will avoid read database again and lost un-saved resouce item lost when user "refresh page", + * @throws ServletException + * + */ + private ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { + + //save toolContentID into HTTPSession + Long contentId = new Long(WebUtil.readLongParam(request,SpreadsheetConstants.PARAM_TOOL_CONTENT_ID)); + +// get back the spreadsheet and item list and display them on page + ISpreadsheetService service = getSpreadsheetService(); + + Spreadsheet spreadsheet = null; + SpreadsheetForm spreadsheetForm = (SpreadsheetForm)form; + + // Get contentFolderID and save to form. + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + spreadsheetForm.setContentFolderID(contentFolderID); + + //initial Session Map + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + spreadsheetForm.setSessionMapID(sessionMap.getSessionID()); + + try { + spreadsheet = service.getSpreadsheetByContentId(contentId); + //if spreadsheet does not exist, try to use default content instead. + if(spreadsheet == null){ + spreadsheet = service.getDefaultContent(contentId); + } + spreadsheetForm.setSpreadsheet(spreadsheet); + + //initialize instruction attachment list + List attachmentList = getAttachmentList(sessionMap); + attachmentList.clear(); + attachmentList.addAll(spreadsheet.getAttachments()); + } catch (Exception e) { + log.error(e); + throw new ServletException(e); + } + + sessionMap.put(SpreadsheetConstants.ATTR_RESOURCE_FORM, spreadsheetForm); + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + + + /** + * Display same entire authoring page content from HttpSession variable. + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws ServletException + */ + private ActionForward initPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws ServletException { + String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap)request.getSession().getAttribute(sessionMapID); + SpreadsheetForm existForm = (SpreadsheetForm) sessionMap.get(SpreadsheetConstants.ATTR_RESOURCE_FORM); + + SpreadsheetForm spreadsheetForm = (SpreadsheetForm )form; + try { + PropertyUtils.copyProperties(spreadsheetForm, existForm); + } catch (Exception e) { + throw new ServletException(e); + } + + ToolAccessMode mode = getAccessMode(request); + if(mode.isAuthor()) + return mapping.findForward(SpreadsheetConstants.SUCCESS); + else + return mapping.findForward(SpreadsheetConstants.DEFINE_LATER); + } + /** + * This method will persist all inforamtion in this authoring page, include all spreadsheet item, information etc. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws ServletException + */ + private ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { + SpreadsheetForm spreadsheetForm = (SpreadsheetForm)(form); + + //get back sessionMAP + SessionMap sessionMap = (SessionMap)request.getSession().getAttribute(spreadsheetForm.getSessionMapID()); + + ToolAccessMode mode = getAccessMode(request); + + ActionMessages errors = validate(spreadsheetForm, mapping, request); + if(!errors.isEmpty()){ + saveErrors(request, errors); + if(mode.isAuthor()) + return mapping.findForward("author"); + else + return mapping.findForward("monitor"); + } + + Spreadsheet spreadsheet = spreadsheetForm.getSpreadsheet(); + ISpreadsheetService service = getSpreadsheetService(); + + //**********************************Get Spreadsheet PO********************* + Spreadsheet spreadsheetPO = service.getSpreadsheetByContentId(spreadsheetForm.getSpreadsheet().getContentId()); + if(spreadsheetPO == null){ + //new Spreadsheet, create it. + spreadsheetPO = spreadsheet; + spreadsheetPO.setCreated(new Timestamp(new Date().getTime())); + spreadsheetPO.setUpdated(new Timestamp(new Date().getTime())); + }else{ + if(mode.isAuthor()){ + Long uid = spreadsheetPO.getUid(); + PropertyUtils.copyProperties(spreadsheetPO,spreadsheet); + //get back UID + spreadsheetPO.setUid(uid); + }else{ //if it is Teacher, then just update basic tab content (definelater) + spreadsheetPO.setInstructions(spreadsheet.getInstructions()); + spreadsheetPO.setCode(spreadsheet.getCode()); + spreadsheetPO.setTitle(spreadsheet.getTitle()); +// change define later status + spreadsheetPO.setDefineLater(false); + } + spreadsheetPO.setUpdated(new Timestamp(new Date().getTime())); + } + + //*******************************Handle user******************* + //try to get form system session + HttpSession ss = SessionManager.getSession(); + //get back login user DTO + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + SpreadsheetUser spreadsheetUser = service.getUserByIDAndContent(new Long(user.getUserID().intValue()) + ,spreadsheetForm.getSpreadsheet().getContentId()); + if(spreadsheetUser == null){ + spreadsheetUser = new SpreadsheetUser(user,spreadsheetPO); + } + + spreadsheetPO.setCreatedBy(spreadsheetUser); + + //**********************************Handle Authoring Instruction Attachement ********************* + //merge attachment info + //so far, attPOSet will be empty if content is existed. because PropertyUtils.copyProperties() is executed + Set attPOSet = spreadsheetPO.getAttachments(); + if(attPOSet == null) + attPOSet = new HashSet(); + List attachmentList = getAttachmentList(sessionMap); + List deleteAttachmentList = getDeletedAttachmentList(sessionMap); + + //current attachemnt in authoring instruction tab. + Iterator iter = attachmentList.iterator(); + while(iter.hasNext()){ + SpreadsheetAttachment newAtt = (SpreadsheetAttachment) iter.next(); + attPOSet.add(newAtt); + } + attachmentList.clear(); + + //deleted attachment. 2 possible types: one is persist another is non-persist before. + iter = deleteAttachmentList.iterator(); + while(iter.hasNext()){ + SpreadsheetAttachment delAtt = (SpreadsheetAttachment) iter.next(); + iter.remove(); + //it is an existed att, then delete it from current attachmentPO + if(delAtt.getUid() != null){ + Iterator attIter = attPOSet.iterator(); + while(attIter.hasNext()){ + SpreadsheetAttachment att = (SpreadsheetAttachment) attIter.next(); + if(delAtt.getUid().equals(att.getUid())){ + attIter.remove(); + break; + } + } + service.deleteSpreadsheetAttachment(delAtt.getUid()); + }//end remove from persist value + } + + //copy back + spreadsheetPO.setAttachments(attPOSet); + + //finally persist spreadsheetPO again + service.saveOrUpdateSpreadsheet(spreadsheetPO); + + //initialize attachmentList again + attachmentList = getAttachmentList(sessionMap); + attachmentList.addAll(spreadsheet.getAttachments()); + spreadsheetForm.setSpreadsheet(spreadsheetPO); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); + if(mode.isAuthor()) + return mapping.findForward("author"); + else + return mapping.findForward("monitor"); + } + + /** + * Handle upload online instruction files request. + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws UploadSpreadsheetFileException + */ + public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws UploadSpreadsheetFileException { + return uploadFile(mapping, form, IToolContentHandler.TYPE_ONLINE,request); + } + /** + * Handle upload offline instruction files request. + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws UploadSpreadsheetFileException + */ + public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws UploadSpreadsheetFileException { + return uploadFile(mapping, form, IToolContentHandler.TYPE_OFFLINE,request); + } + /** + * Common method to upload online or offline instruction files request. + * @param mapping + * @param form + * @param type + * @param request + * @return + * @throws UploadSpreadsheetFileException + */ + private ActionForward uploadFile(ActionMapping mapping, ActionForm form, + String type,HttpServletRequest request) throws UploadSpreadsheetFileException { + + SpreadsheetForm spreadsheetForm = (SpreadsheetForm) form; + //get back sessionMAP + SessionMap sessionMap = (SessionMap)request.getSession().getAttribute(spreadsheetForm.getSessionMapID()); + + FormFile file; + if(StringUtils.equals(IToolContentHandler.TYPE_OFFLINE,type)) + file = (FormFile) spreadsheetForm.getOfflineFile(); + else + file = (FormFile) spreadsheetForm.getOnlineFile(); + + if(file == null || StringUtils.isBlank(file.getFileName())) + return mapping.findForward(SpreadsheetConstants.SUCCESS); + + //validate file size + ActionMessages errors = new ActionMessages(); + FileValidatorUtil.validateFileSize(file, true, errors ); + if(!errors.isEmpty()){ + this.saveErrors(request, errors); + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + + ISpreadsheetService service = getSpreadsheetService(); + //upload to repository + SpreadsheetAttachment att = service.uploadInstructionFile(file, type); + //handle session value + List attachmentList = getAttachmentList(sessionMap); + List deleteAttachmentList = getDeletedAttachmentList(sessionMap); + //first check exist attachment and delete old one (if exist) to deletedAttachmentList + Iterator iter = attachmentList.iterator(); + SpreadsheetAttachment existAtt; + while(iter.hasNext()){ + existAtt = (SpreadsheetAttachment) iter.next(); + if (StringUtils.equals(existAtt.getFileName(), att.getFileName()) + && StringUtils.equals(existAtt.getFileType(), att.getFileType())) { + //if there is same name attachment, delete old one + deleteAttachmentList.add(existAtt); + iter.remove(); + break; + } + } + //add to attachmentList + attachmentList.add(att); + + return mapping.findForward(SpreadsheetConstants.SUCCESS); + + } + /** + * Delete offline instruction file from current Spreadsheet authoring page. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward deleteOfflineFile(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + return deleteFile(mapping,request, response,form, IToolContentHandler.TYPE_OFFLINE); + } + /** + * Delete online instruction file from current Spreadsheet authoring page. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward deleteOnlineFile(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + return deleteFile(mapping, request, response,form, IToolContentHandler.TYPE_ONLINE); + } + + /** + * General method to delete file (online or offline) + * @param mapping + * @param request + * @param response + * @param form + * @param type + * @return + */ + private ActionForward deleteFile(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response, ActionForm form, String type) { + Long versionID = new Long(WebUtil.readLongParam(request,SpreadsheetConstants.PARAM_FILE_VERSION_ID)); + Long uuID = new Long(WebUtil.readLongParam(request,SpreadsheetConstants.PARAM_FILE_UUID)); + + //get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap)request.getSession().getAttribute(sessionMapID); + + //handle session value + List attachmentList = getAttachmentList(sessionMap); + List deleteAttachmentList = getDeletedAttachmentList(sessionMap); + //first check exist attachment and delete old one (if exist) to deletedAttachmentList + Iterator iter = attachmentList.iterator(); + SpreadsheetAttachment existAtt; + while(iter.hasNext()){ + existAtt = (SpreadsheetAttachment) iter.next(); + if(existAtt.getFileUuid().equals(uuID) && existAtt.getFileVersionId().equals(versionID)){ + //if there is same name attachment, delete old one + deleteAttachmentList.add(existAtt); + iter.remove(); + } + } + + request.setAttribute(SpreadsheetConstants.ATTR_FILE_TYPE_FLAG, type); + request.setAttribute(SpreadsheetConstants.ATTR_SESSION_MAP_ID, sessionMapID); + return mapping.findForward(SpreadsheetConstants.SUCCESS); + + } + //************************************************************************************* + // Private method + //************************************************************************************* + /** + * Return SpreadsheetService bean. + */ + private ISpreadsheetService getSpreadsheetService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); + return (ISpreadsheetService) wac.getBean(SpreadsheetConstants.RESOURCE_SERVICE); + } + /** + * @param request + * @return + */ + private List getAttachmentList(SessionMap sessionMap) { + return getListFromSession(sessionMap,SpreadsheetConstants.ATT_ATTACHMENT_LIST); + } + /** + * @param request + * @return + */ + private List getDeletedAttachmentList(SessionMap sessionMap) { + return getListFromSession(sessionMap,SpreadsheetConstants.ATTR_DELETED_ATTACHMENT_LIST); + } + + /** + * Get java.util.List from HttpSession by given name. + * + * @param request + * @param name + * @return + */ + private List getListFromSession(SessionMap sessionMap,String name) { + List list = (List) sessionMap.get(name); + if(list == null){ + list = new ArrayList(); + sessionMap.put(name,list); + } + return list; + } + + /** + * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode. + * @param request + * @return + */ + private ToolAccessMode getAccessMode(HttpServletRequest request) { + ToolAccessMode mode; + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if(StringUtils.equalsIgnoreCase(modeStr,ToolAccessMode.TEACHER.toString())) + mode = ToolAccessMode.TEACHER; + else + mode = ToolAccessMode.AUTHOR; + return mode; + } + + + private ActionMessages validate(SpreadsheetForm spreadsheetForm, ActionMapping mapping, HttpServletRequest request) { + ActionMessages errors = new ActionMessages(); +// if (StringUtils.isBlank(spreadsheetForm.getSpreadsheet().getTitle())) { +// ActionMessage error = new ActionMessage("error.resource.item.title.blank"); +// errors.add(ActionMessages.GLOBAL_MESSAGE, error); +// } + + //define it later mode(TEACHER) skip below validation. + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if(StringUtils.equals(modeStr, ToolAccessMode.TEACHER.toString())){ + return errors; + } + + //Some other validation outside basic Tab. + + return errors; + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/ClearSessionAction.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/ClearSessionAction.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/ClearSessionAction.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,50 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.action; + +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** + * This class give a chance to clear HttpSession when user save/close authoring page. + * @author Steve.Ni + * + * @version $Revision$ + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) { + if(mode.isAuthor()){ + session.removeAttribute(customiseSessionID); + } + } + + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/LearningAction.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/LearningAction.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/LearningAction.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,453 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.action; + +import java.io.IOException; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.action.ActionRedirect; +import org.apache.struts.config.ForwardConfig; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetAttachment; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.model.UserEditedSpreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.service.ISpreadsheetService; +import org.lamsfoundation.lams.tool.spreadsheet.service.SpreadsheetApplicationException; +import org.lamsfoundation.lams.tool.spreadsheet.service.UploadSpreadsheetFileException; +import org.lamsfoundation.lams.tool.spreadsheet.web.form.ReflectionForm; +import org.lamsfoundation.lams.tool.spreadsheet.web.form.SpreadsheetForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.FileUtil; +import org.lamsfoundation.lams.util.FileValidatorUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; +/** + * + * @author Steve.Ni + * + * @version $Revision$ + */ +public class LearningAction extends Action { + + private static Logger log = Logger.getLogger(LearningAction.class); + + public ActionForward execute(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + + String param = mapping.getParameter(); + //-----------------------Spreadsheet Learner function --------------------------- + if(param.equals("start")){ + return start(mapping, form, request, response); + } + if (param.equals("initPage")) { + return initPage(mapping, form, request, response); + } + if (param.equals("saveUserSpreadsheet")) { + return saveUserSpreadsheet(mapping, form, request, response); + } + if(param.equals("finish")){ + return finish(mapping, form, request, response); + } + + //================ Reflection ======================= + if (param.equals("newReflection")) { + return newReflection(mapping, form, request, response); + } + if (param.equals("submitReflection")) { + return submitReflection(mapping, form, request, response); + } + + return mapping.findForward(SpreadsheetConstants.ERROR); + } + + /** + * Read spreadsheet data from database and put them into HttpSession. It will redirect to init.do directly after this + * method run successfully. + * + * This method will avoid read database again and lost un-saved resouce item lost when user "refresh page", + * + */ + private ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + + //initial Session Map + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + + //save toolContentID into HTTPSession + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request,AttributeNames.PARAM_MODE, true); + + Long sessionId = new Long(request.getParameter(SpreadsheetConstants.PARAM_TOOL_SESSION_ID)); + + request.setAttribute(SpreadsheetConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); + request.setAttribute(AttributeNames.ATTR_MODE,mode); + request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID,sessionId); + +// get back the spreadsheet and item list and display them on page + ISpreadsheetService service = getSpreadsheetService(); + SpreadsheetUser spreadsheetUser = null; + if ( mode != null && mode.isTeacher() ) { + // monitoring mode - user is specified in URL + // spreadsheetUser may be null if the user was force completed. + spreadsheetUser = getSpecifiedUser(service, sessionId, + WebUtil.readIntParam(request, AttributeNames.PARAM_USER_ID, false)); + } else { + spreadsheetUser = getCurrentUser(service,sessionId); + } + + Spreadsheet spreadsheet; + spreadsheet = service.getSpreadsheetBySessionId(sessionId); + + + +// SpreadsheetForm spreadsheetForm = (SpreadsheetForm)form; +// spreadsheetForm.setSessionMapID(sessionMap.getSessionID()); +// spreadsheetForm.setSpreadsheet(spreadsheet); +// sessionMap.put(SpreadsheetConstants.ATTR_RESOURCE_FORM, spreadsheetForm); +// request.setAttribute("spreadsheet.code", spreadsheet.getCode()); + + + + //check whehter finish lock is on/off + boolean lock = spreadsheet.getLockWhenFinished() && spreadsheetUser !=null && spreadsheetUser.isSessionFinished(); + + // get notebook entry + String entryText = new String(); + if ( spreadsheetUser != null ) { + NotebookEntry notebookEntry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + SpreadsheetConstants.TOOL_SIGNATURE, spreadsheetUser.getUserId().intValue()); + if (notebookEntry != null) { + entryText = notebookEntry.getEntry(); + } + } + + //basic information + sessionMap.put(SpreadsheetConstants.ATTR_TITLE,spreadsheet.getTitle()); + sessionMap.put(SpreadsheetConstants.ATTR_RESOURCE_INSTRUCTION,spreadsheet.getInstructions()); + sessionMap.put(SpreadsheetConstants.ATTR_FINISH_LOCK, lock); + sessionMap.put(SpreadsheetConstants.ATTR_LOCK_ON_FINISH, spreadsheet.getLockWhenFinished()); + sessionMap.put(SpreadsheetConstants.ATTR_USER_FINISHED, spreadsheetUser !=null && spreadsheetUser.isSessionFinished()); + + sessionMap.put(AttributeNames.PARAM_TOOL_SESSION_ID,sessionId); + sessionMap.put(AttributeNames.ATTR_MODE,mode); + //reflection information + sessionMap.put(SpreadsheetConstants.ATTR_REFLECTION_ON,spreadsheet.isReflectOnActivity()); + sessionMap.put(SpreadsheetConstants.ATTR_REFLECTION_INSTRUCTION,spreadsheet.getReflectInstructions()); + sessionMap.put(SpreadsheetConstants.ATTR_REFLECTION_ENTRY, entryText); + + //add define later support + if(spreadsheet.isDefineLater()){ + return mapping.findForward("defineLater"); + } + + //set contentInUse flag to true! + spreadsheet.setContentInUse(true); + spreadsheet.setDefineLater(false); + service.saveOrUpdateSpreadsheet(spreadsheet); + + //add run offline support + if(spreadsheet.getRunOffline()){ + sessionMap.put(SpreadsheetConstants.PARAM_RUN_OFFLINE, true); + return mapping.findForward("runOffline"); + }else + sessionMap.put(SpreadsheetConstants.PARAM_RUN_OFFLINE, false); + + sessionMap.put(SpreadsheetConstants.ATTR_RESOURCE,spreadsheet); + + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + + /** + * Display same entire authoring page content from HttpSession variable. + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws ServletException + */ + private ActionForward initPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { + String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap)request.getSession().getAttribute(sessionMapID); +// SpreadsheetForm existForm = (SpreadsheetForm) sessionMap.get(SpreadsheetConstants.ATTR_RESOURCE_FORM); + + //get mode and ToolSessionID from sessionMAP + ToolAccessMode mode = getAccessMode(request); + Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + //load up learner changes in spreadsheet if such option is activated in spreadsheet + ISpreadsheetService service = getSpreadsheetService(); + Spreadsheet spreadsheet = (Spreadsheet) sessionMap.get(SpreadsheetConstants.ATTR_RESOURCE); + if(spreadsheet.isLearnerAllowedToSave() && !mode.isTeacher()){ + SpreadsheetUser spreadsheetUser = getCurrentUser(service, sessionId); + if (spreadsheetUser.getUserEditedSpreadsheet() != null) { + spreadsheet.setCode(spreadsheetUser.getUserEditedSpreadsheet().getUserEditedSpreadsheet()); + } + } + + + +// request.setAttribute(SpreadsheetConstants.ATTR_CODE, spreadsheet.getCode()); +// SpreadsheetForm spreadsheetForm = (SpreadsheetForm )form; +// try { +// PropertyUtils.copyProperties(spreadsheetForm, existForm); +// } catch (Exception e) { +// throw new ServletException(e); +// } +// + SpreadsheetForm spreadsheetForm = (SpreadsheetForm)form; +// spreadsheetForm.setSessionMapID(sessionMap.getSessionID()); + spreadsheetForm.setSpreadsheet(spreadsheet); +// sessionMap.put(SpreadsheetConstants.ATTR_RESOURCE_FORM, spreadsheetForm); +// request.setAttribute("spreadsheet.code", spreadsheet.getCode()); + + + + + if(mode.isAuthor()) { + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } else { + return mapping.findForward(SpreadsheetConstants.DEFINE_LATER); + } + } + + /** + * Finish learning session. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward saveUserSpreadsheet(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + + //get back SessionMap + String sessionMapID = request.getParameter(SpreadsheetConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + //get mode and ToolSessionID from sessionMAP + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); + Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + + //save learner changes in spreadsheet if such option is activated in spreadsheet + ISpreadsheetService service = getSpreadsheetService(); + Spreadsheet spreadsheet = (Spreadsheet) sessionMap.get(SpreadsheetConstants.ATTR_RESOURCE); + Spreadsheet spreadsheetPO = service.getSpreadsheetByContentId(spreadsheet.getContentId()); + if(spreadsheetPO.isLearnerAllowedToSave() && !mode.isTeacher()){ + + SpreadsheetUser spreadsheetUser = getCurrentUser(service,sessionId); + UserEditedSpreadsheet userEditedSpreadsheet = new UserEditedSpreadsheet(); + String code = ((SpreadsheetForm)form).getSpreadsheet().getCode(); + userEditedSpreadsheet.setUserEditedSpreadsheet(code); + spreadsheetUser.setUserEditedSpreadsheet(userEditedSpreadsheet); + service.saveOrUpdateUser(spreadsheetUser); + } + + boolean finishSession = WebUtil.readBooleanParam(request, "finishSession"); + ForwardConfig conf = finishSession ? mapping.findForwardConfig("finishSession") : mapping.findForwardConfig("continueReflect"); + ActionRedirect redirect = new ActionRedirect(conf); + redirect.addParameter(SpreadsheetConstants.ATTR_SESSION_MAP_ID, sessionMapID); + redirect.addParameter(AttributeNames.PARAM_TOOL_SESSION_ID, sessionId); + return redirect; + } + + /** + * Finish learning session. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward finish(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + + //get back SessionMap + String sessionMapID = request.getParameter(SpreadsheetConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + //get mode and ToolSessionID from sessionMAP + Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + + ISpreadsheetService service = getSpreadsheetService(); + // get sessionId from HttpServletRequest + String nextActivityUrl = null ; + try { + HttpSession ss = SessionManager.getSession(); + UserDTO userDTO = (UserDTO) ss.getAttribute(AttributeNames.USER); + Long userID = new Long(userDTO.getUserID().longValue()); + + nextActivityUrl = service.finishToolSession(sessionId,userID); + request.setAttribute(SpreadsheetConstants.ATTR_NEXT_ACTIVITY_URL,nextActivityUrl); + } catch (SpreadsheetApplicationException e) { + log.error("Failed get next activity url:" + e.getMessage()); + } + + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + + /** + * Display empty reflection form. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward newReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + + //get session value + String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); + + ReflectionForm refForm = (ReflectionForm) form; + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + + refForm.setUserID(user.getUserID()); + refForm.setSessionMapID(sessionMapID); + +// get the existing reflection entry + ISpreadsheetService submitFilesService = getSpreadsheetService(); + + SessionMap map = (SessionMap)request.getSession().getAttribute(sessionMapID); + Long toolSessionID = (Long)map.get(AttributeNames.PARAM_TOOL_SESSION_ID); + NotebookEntry entry = submitFilesService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, SpreadsheetConstants.TOOL_SIGNATURE, user.getUserID()); + + if (entry != null) { + refForm.setEntryText(entry.getEntry()); + } + + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + /** + * Submit reflection form input database. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + ReflectionForm refForm = (ReflectionForm) form; + Integer userId = refForm.getUserID(); + + String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + Long sessionId = (Long) sessionMap.get(AttributeNames.PARAM_TOOL_SESSION_ID); + + ISpreadsheetService service = getSpreadsheetService(); + + // check for existing notebook entry + NotebookEntry entry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, SpreadsheetConstants.TOOL_SIGNATURE, userId); + + if (entry == null) { + // create new entry + service.createNotebookEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, SpreadsheetConstants.TOOL_SIGNATURE, userId, refForm.getEntryText()); + } else { + // update existing entry + entry.setEntry(refForm.getEntryText()); + entry.setLastModified(new Date()); + service.updateEntry(entry); + } + + return finish(mapping, form, request, response); + } + + //************************************************************************************* + // Private methods + //************************************************************************************* + + private ISpreadsheetService getSpreadsheetService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); + return (ISpreadsheetService) wac.getBean(SpreadsheetConstants.RESOURCE_SERVICE); + } + + private SpreadsheetUser getCurrentUser(ISpreadsheetService service, Long sessionId) { + //try to get form system session + HttpSession ss = SessionManager.getSession(); + //get back login user DTO + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + SpreadsheetUser spreadsheetUser = service.getUserByIDAndSession(new Long(user.getUserID().intValue()),sessionId); + + if(spreadsheetUser == null){ + SpreadsheetSession session = service.getSpreadsheetSessionBySessionId(sessionId); + spreadsheetUser = new SpreadsheetUser(user,session); + service.saveOrUpdateUser(spreadsheetUser); + } + return spreadsheetUser; + } + private SpreadsheetUser getSpecifiedUser(ISpreadsheetService service, Long sessionId, Integer userId) { + SpreadsheetUser spreadsheetUser = service.getUserByIDAndSession(new Long(userId.intValue()),sessionId); + if ( spreadsheetUser == null ) { + log.error("Unable to find specified user for spreadsheet activity. Screens are likely to fail. SessionId=" + +sessionId+" UserId="+userId); + } + return spreadsheetUser; + } + + /** + * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode. + * @param request + * @return + */ + private ToolAccessMode getAccessMode(HttpServletRequest request) { + ToolAccessMode mode; + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if(StringUtils.equalsIgnoreCase(modeStr,ToolAccessMode.TEACHER.toString())) + mode = ToolAccessMode.TEACHER; + else + mode = ToolAccessMode.AUTHOR; + return mode; + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/MonitoringAction.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/MonitoringAction.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/MonitoringAction.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,214 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.action; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.tool.spreadsheet.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.StatisticDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.Summary; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.service.ISpreadsheetService; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +public class MonitoringAction extends Action { + public static Logger log = Logger.getLogger(MonitoringAction.class); + + public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + String param = mapping.getParameter(); + + request.setAttribute("initialTabId",WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB,true)); + + if (param.equals("summary")) { + return summary(mapping, form, request, response); + } + if (param.equals("doStatistic")) { + return doStatistic(mapping, form, request, response); + } + if (param.equals("editMark")) { + return editMark(mapping, form, request, response); + } +// if (param.equals("listuser")) { +// return listuser(mapping, form, request, response); +// } + if (param.equals("viewReflection")) { + return viewReflection(mapping, form, request, response); + } + + return mapping.findForward(SpreadsheetConstants.ERROR); + } + + private ActionForward summary(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + //initial Session Map + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + request.setAttribute(SpreadsheetConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); +// save contentFolderID into session + sessionMap.put(AttributeNames.PARAM_CONTENT_FOLDER_ID,WebUtil.readStrParam(request,AttributeNames.PARAM_CONTENT_FOLDER_ID)); + + Long contentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + ISpreadsheetService service = getSpreadsheetService(); + List summaryList = service.getSummary(contentId); + + List statisticList = getSpreadsheetService().getStatistics(contentId); + request.setAttribute(SpreadsheetConstants.ATTR_STATISTIC_LIST, statisticList); + + Spreadsheet spreadsheet = service.getSpreadsheetByContentId(contentId); + spreadsheet.toDTO(); + + Map>reflectList = service.getReflectList(contentId, false); + + //cache into sessionMap + sessionMap.put(SpreadsheetConstants.ATTR_SUMMARY_LIST, summaryList); + sessionMap.put(SpreadsheetConstants.PAGE_EDITABLE, spreadsheet.isContentInUse()); + sessionMap.put(SpreadsheetConstants.ATTR_RESOURCE, spreadsheet); + sessionMap.put(SpreadsheetConstants.ATTR_TOOL_CONTENT_ID, contentId); + sessionMap.put(SpreadsheetConstants.ATTR_REFLECT_LIST, reflectList); + + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + + /** + * AJAX call to refresh statistic page. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward doStatistic(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + Long contentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + List statisticList = getSpreadsheetService().getStatistics(contentId); + request.setAttribute(SpreadsheetConstants.ATTR_STATISTIC_LIST, statisticList); + + return mapping.findForward("statistic"); + + } + + public ActionForward editMark(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + Long sessionID =new Long(WebUtil.readLongParam(request,AttributeNames.PARAM_TOOL_SESSION_ID)); + Long userId = WebUtil.readLongParam(request, "userID"); + + SpreadsheetUser user = getSpreadsheetService().getUser(userId); + +// user.getUserEditedSpreadsheet().getMark(). + +// submitFilesService = getSubmitFilesService(); +// //return FileDetailsDTO list according to the given userID and sessionID +// List files = submitFilesService.getFilesUploadedByUser(userID,sessionID); +// +// request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID,sessionID); +// request.setAttribute("report",files); + return mapping.findForward("success"); + } + +// private ActionForward listuser(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { +// Long sessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); +// Long itemUid = WebUtil.readLongParam(request, SpreadsheetConstants.PARAM_RESOURCE_ITEM_UID); +//// +//// //get user list by given item uid +// ISpreadsheetService service = getSpreadsheetService(); +// //TODO +// List list = null; +//// List list = service.getUserListBySessionItem(sessionId, itemUid); +// +// //set to request +// request.setAttribute(SpreadsheetConstants.ATTR_USER_LIST, list); +// return mapping.findForward(SpreadsheetConstants.SUCCESS); +// } + + private ActionForward viewReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + + Long uid = WebUtil.readLongParam(request, SpreadsheetConstants.ATTR_USER_UID); + + ISpreadsheetService service = getSpreadsheetService(); + SpreadsheetUser user = service.getUser(uid); + Long sessionID = user.getSession().getSessionId(); + NotebookEntry notebookEntry = service.getEntry(sessionID, + CoreNotebookConstants.NOTEBOOK_TOOL, + SpreadsheetConstants.TOOL_SIGNATURE, user.getUserId().intValue()); + + SpreadsheetSession session = service.getSpreadsheetSessionBySessionId(sessionID); + + ReflectDTO refDTO = new ReflectDTO(user); + if(notebookEntry == null){ + refDTO.setFinishReflection(false); + refDTO.setReflect(null); + }else{ + refDTO.setFinishReflection(true); + refDTO.setReflect(notebookEntry.getEntry()); + } + refDTO.setReflectInstrctions(session.getSpreadsheet().getReflectInstructions()); + + request.setAttribute("userDTO", refDTO); + return mapping.findForward("success"); + } + + // ************************************************************************************* + // Private method + // ************************************************************************************* + + /** + * Save statistic information into request + * @param request + * @param submitFilesSessionList + */ + private void statistic(HttpServletRequest request, List submitFilesSessionList) { + Long contentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + List statisticList = getSpreadsheetService().getStatistics(contentId); + + } + + private ISpreadsheetService getSpreadsheetService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() + .getServletContext()); + return (ISpreadsheetService) wac.getBean(SpreadsheetConstants.RESOURCE_SERVICE); + } +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/ViewItemAction.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/ViewItemAction.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/action/ViewItemAction.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,163 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.action; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.math.NumberUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.service.ISpreadsheetService; +import org.lamsfoundation.lams.tool.spreadsheet.util.SpreadsheetWebUtils; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +public class ViewItemAction extends Action { + + private static final Logger log = Logger.getLogger(ViewItemAction.class); + + public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + String param = mapping.getParameter(); + + if (param.equals("reviewItem")) { + return reviewItem(mapping, form, request, response); + } + + return mapping.findForward(SpreadsheetConstants.ERROR); + } +// /** +// * Open url in popup window page. +// * @param mapping +// * @param form +// * @param request +// * @param response +// * @return +// */ +// private ActionForward openUrlPopup(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { +// String url = request.getParameter(SpreadsheetConstants.PARAM_OPEN_URL_POPUP); +// String title = request.getParameter(SpreadsheetConstants.PARAM_TITLE); +// request.setAttribute(SpreadsheetConstants.PARAM_OPEN_URL_POPUP,url); +// request.setAttribute(SpreadsheetConstants.PARAM_TITLE,title); +// return mapping.findForward(SpreadsheetConstants.SUCCESS); +// } +// /** +// * Return next instrucion to page. It need four input parameters, mode, itemIndex or itemUid, and insIdx. +// * @param mapping +// * @param form +// * @param request +// * @param response +// * @return +// */ +// private ActionForward nextInstruction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { +// String mode = request.getParameter(AttributeNames.ATTR_MODE); +// +// String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); +// SessionMap sesionMap = (SessionMap)request.getSession().getAttribute(sessionMapID); +// +// int currIns = NumberUtils.stringToInt(request.getParameter(SpreadsheetConstants.PARAM_CURRENT_INSTRUCTION_INDEX),0); +// +// //For Learner upload item, its instruction will display description/comment fields in ReosourceItem. +// if(!item.isCreateByAuthor()){ +// List navItems = new ArrayList(1); +// //create a new instruction and put SpreadsheetItem description into it: just for display use. +// SpreadsheetItemInstruction ins = new SpreadsheetItemInstruction(); +// ins.setSequenceId(1); +// ins.setDescription(item.getDescription()); +// navItems.add(ins); +// navDto.setAllInstructions(navItems); +// instructions.add(ins); +// }else{ +// navDto.setAllInstructions(new ArrayList(instructions)); +// } +// +// request.setAttribute(SpreadsheetConstants.ATTR_SESSION_MAP_ID,sessionMapID); +// return mapping.findForward(SpreadsheetConstants.SUCCESS); +// } + + /** + * Display main frame to display instrcution and item content. + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward reviewItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { +// String mode = request.getParameter(AttributeNames.ATTR_MODE); +// +// String sessionMapID = WebUtil.readStrParam(request, SpreadsheetConstants.ATTR_SESSION_MAP_ID); +// SessionMap sessionMap = (SessionMap)request.getSession().getAttribute(sessionMapID); + + Long userId = WebUtil.readLongParam(request, SpreadsheetConstants.ATTR_USER_UID); + SpreadsheetUser user = getSpreadsheetService().getUser(userId); + request.setAttribute(SpreadsheetConstants.ATTR_USER_NAME, user.getLoginName()); + String code = null; + if (user.getUserEditedSpreadsheet() != null) { + code = user.getUserEditedSpreadsheet().getUserEditedSpreadsheet(); + } + request.setAttribute(SpreadsheetConstants.ATTR_CODE, code); + + + + + + return mapping.findForward(SpreadsheetConstants.SUCCESS); + } + + //************************************************************************************* + // Private method + //************************************************************************************* + + private ISpreadsheetService getSpreadsheetService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); + return (ISpreadsheetService) wac.getBean(SpreadsheetConstants.RESOURCE_SERVICE); + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/MarkForm.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/MarkForm.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/MarkForm.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,81 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.form; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; + +/** +* Mark Form. +* @struts.form name="markForm" +* +* User: Andrey Balan +*/ +public class MarkForm extends ActionForm { + + private static final long serialVersionUID = -6028705988278223361L; + + //Forum fields + private String sessionMapId; + private SpreadsheetUser user; + private String marks; + private String comments; + + public String getSessionMapId() { + return sessionMapId; + } + public void setSessionMapId(String sessionMapId) { + this.sessionMapId = sessionMapId; + } + + public SpreadsheetUser getUser() { + return user; + } + public void setUser(SpreadsheetUser user) { + this.user = user; + } + + public String getMarks() { + return marks; + } + public void setMarks(String marks) { + this.marks = marks; + } + + public String getComments() { + return comments; + } + public void setComments(String comments) { + this.comments = comments; + } +} + + \ No newline at end of file Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/ReflectionForm.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/ReflectionForm.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/ReflectionForm.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,73 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.form; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.validator.ValidatorForm; + +/** + * + * Reflection Form. + * @struts.form name="reflectionForm" + * + */ +public class ReflectionForm extends ValidatorForm { + private static final long serialVersionUID = -9054365604649146735L; + private static Logger logger = Logger.getLogger(ReflectionForm.class.getName()); + + private Integer userID; + private String sessionMapID; + private String entryText; + + public String getEntryText() { + return entryText; + } + + public void setEntryText(String entryText) { + this.entryText = entryText; + } + + public Integer getUserID() { + return userID; + } + + public void setUserID(Integer userUid) { + this.userID = userUid; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/SpreadsheetForm.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/SpreadsheetForm.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/form/SpreadsheetForm.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,141 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.spreadsheet.web.form; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetAttachment; + +/** + * + * Spreadsheet Form. + * @struts.form name="spreadsheetForm" + * + * User: Andrey Balan + */ +public class SpreadsheetForm extends ActionForm { + private static final long serialVersionUID = 3599879328307492312L; + + private static Logger logger = Logger.getLogger(SpreadsheetForm.class.getName()); + + //Forum fields + private String sessionMapID; + private String contentFolderID; + private int currentTab; + private FormFile offlineFile; + private FormFile onlineFile; + + private Spreadsheet spreadsheet; + + public SpreadsheetForm(){ + spreadsheet = new Spreadsheet(); + spreadsheet.setTitle("Shared Spreadsheet"); + currentTab = 1; + } + + public void setSpreadsheet(Spreadsheet spreadsheet) { + this.spreadsheet = spreadsheet; + //set Form special varaible from given forum + if(spreadsheet == null){ + logger.error("Initial SpreadsheetForum failed by null value of Spreadsheet."); + } + } + public void reset(ActionMapping mapping, HttpServletRequest request){ + String param = mapping.getParameter(); + //if it is start page, all data read out from database or current session + //so need not reset checkbox to refresh value! + if(!StringUtils.equals(param,"start") && !StringUtils.equals(param,"initPage")){ + spreadsheet.setLockWhenFinished(false); + spreadsheet.setDefineLater(false); + spreadsheet.setRunOffline(false); + spreadsheet.setLearnerAllowedToSave(true); + spreadsheet.setMarkingEnabled(false); + spreadsheet.setReflectOnActivity(false); + } + } + + public int getCurrentTab() { + return currentTab; + } + + + public void setCurrentTab(int currentTab) { + this.currentTab = currentTab; + } + + + public FormFile getOfflineFile() { + return offlineFile; + } + + + public void setOfflineFile(FormFile offlineFile) { + this.offlineFile = offlineFile; + } + + + public FormFile getOnlineFile() { + return onlineFile; + } + + + public void setOnlineFile(FormFile onlineFile) { + this.onlineFile = onlineFile; + } + + + public Spreadsheet getSpreadsheet() { + return spreadsheet; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + + public String getContentFolderID() { + return contentFolderID; + } + + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + +} Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/servlet/ExportServlet.java =================================================================== diff -u --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/servlet/ExportServlet.java (revision 0) +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/web/servlet/ExportServlet.java (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,278 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.spreadsheet.web.servlet; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; + +import javax.servlet.ServletException; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants; +import org.lamsfoundation.lams.tool.spreadsheet.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.spreadsheet.dto.Summary; +import org.lamsfoundation.lams.tool.spreadsheet.model.Spreadsheet; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetSession; +import org.lamsfoundation.lams.tool.spreadsheet.model.SpreadsheetUser; +import org.lamsfoundation.lams.tool.spreadsheet.service.ISpreadsheetService; +import org.lamsfoundation.lams.tool.spreadsheet.service.SpreadsheetApplicationException; +import org.lamsfoundation.lams.tool.spreadsheet.service.SpreadsheetServiceProxy; +import org.lamsfoundation.lams.tool.spreadsheet.util.ReflectDTOComparator; +import org.lamsfoundation.lams.tool.spreadsheet.util.SpreadsheetToolContentHandler; +import org.lamsfoundation.lams.util.FileUtil; +import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + * Export portfolio servlet to export all shared spreadsheet into offline HTML + * package. + * + * @author Steve.Ni + * + * @version $Revision$ + */ +public class ExportServlet extends AbstractExportPortfolioServlet { + private static final long serialVersionUID = -4529093489007108143L; + + private static Logger logger = Logger.getLogger(ExportServlet.class); + + private final String FILENAME = "shared_spreadsheet_main.html"; + + private SpreadsheetToolContentHandler handler; + + private ISpreadsheetService service; + + @Override + public void init() throws ServletException { + service = SpreadsheetServiceProxy.getSpreadsheetService(getServletContext()); + super.init(); + } + + public String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { + +// initial sessionMap + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + + try { + if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { + sessionMap.put(AttributeNames.ATTR_MODE,ToolAccessMode.LEARNER); + learner(request, response, directoryName, cookies,sessionMap); + } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) { + sessionMap.put(AttributeNames.ATTR_MODE,ToolAccessMode.TEACHER); + teacher(request, response, directoryName, cookies,sessionMap); + } + } catch (SpreadsheetApplicationException e) { + logger.error("Cannot perform export for spreadsheet tool."); + } + + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + request.getContextPath(); + writeResponseToFile(basePath + "/pages/export/exportportfolio.jsp?sessionMapID="+sessionMap.getSessionID() + , directoryName, FILENAME, cookies); + + return FILENAME; + } + + protected String doOfflineExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { + if (toolContentID == null && toolSessionID == null) { + logger.error("Tool content Id or and session Id are null. Unable to activity title"); + } else { + + Spreadsheet content = null; + if ( toolContentID != null ) { + content = service.getSpreadsheetByContentId(toolContentID); + } else { + SpreadsheetSession session=service.getSpreadsheetSessionBySessionId(toolSessionID); + if ( session != null ) + content = session.getSpreadsheet(); + } + if ( content != null ) { + activityTitle = content.getTitle(); + } + } + return super.doOfflineExport(request, response, directoryName, cookies); + } + + + + public void learner(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies, HashMap sessionMap) + throws SpreadsheetApplicationException { + + if (userID == null || toolSessionID == null) { + String error = "Tool session Id or user Id is null. Unable to continue"; + logger.error(error); + throw new SpreadsheetApplicationException(error); + } + + SpreadsheetUser learner = service.getUserByIDAndSession(userID,toolSessionID); + + if (learner == null) { + String error = "The user with user id " + userID + " does not exist."; + logger.error(error); + throw new SpreadsheetApplicationException(error); + } + + Spreadsheet content = service.getSpreadsheetBySessionId(toolSessionID); + + if (content == null) { + String error = "The content for this activity has not been defined yet."; + logger.error(error); + throw new SpreadsheetApplicationException(error); + } + + + List group = service.exportBySessionId(toolSessionID,true); + saveFileToLocal(group, directoryName); + + List groupList = new ArrayList(); + if(group.size() > 0) + groupList.add(group); + + // Add flag to indicate whether to render user notebook entries + sessionMap.put(SpreadsheetConstants.ATTR_REFLECTION_ON, content.isReflectOnActivity()); + + // Create reflectList if reflection is enabled. + if (content.isReflectOnActivity()) { + // Create reflectList, need to follow same structure used in teacher + // see service.getReflectList(); + Map> map = new HashMap>(); + Set reflectDTOSet = new TreeSet(new ReflectDTOComparator()); + reflectDTOSet.add(getReflectionEntry(learner)); + map.put(toolSessionID, reflectDTOSet); + + // Add reflectList to sessionMap + sessionMap.put(SpreadsheetConstants.ATTR_REFLECT_LIST, map); + } + + sessionMap.put(SpreadsheetConstants.ATTR_TITLE, content.getTitle()); + sessionMap.put(SpreadsheetConstants.ATTR_INSTRUCTIONS, content.getInstructions()); + sessionMap.put(SpreadsheetConstants.ATTR_SUMMARY_LIST, groupList); + } + + public void teacher(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies, HashMap sessionMap) + throws SpreadsheetApplicationException { + + // check if toolContentId exists in db or not + if (toolContentID == null) { + String error = "Tool Content Id is missing. Unable to continue"; + logger.error(error); + throw new SpreadsheetApplicationException(error); + } + + Spreadsheet content = service.getSpreadsheetByContentId(toolContentID); + + if (content == null) { + String error = "Data is missing from the database. Unable to Continue"; + logger.error(error); + throw new SpreadsheetApplicationException(error); + } + List> groupList = service.exportByContentId(toolContentID); + if(groupList != null) { + for (List list : groupList) { + saveFileToLocal(list, directoryName); + } + } + + // Add flag to indicate whether to render user notebook entries + sessionMap.put(SpreadsheetConstants.ATTR_REFLECTION_ON, content.isReflectOnActivity()); + + // Create reflectList if reflection is enabled. + if (content.isReflectOnActivity()) { + Map> reflectList = service.getReflectList(content.getContentId(), true); + // Add reflectList to sessionMap + sessionMap.put(SpreadsheetConstants.ATTR_REFLECT_LIST, reflectList); + } + + // put it into HTTPSession + sessionMap.put(SpreadsheetConstants.ATTR_TITLE, content.getTitle()); + sessionMap.put(SpreadsheetConstants.ATTR_INSTRUCTIONS, content.getInstructions()); + sessionMap.put(SpreadsheetConstants.ATTR_SUMMARY_LIST, groupList); + } + + private void saveFileToLocal(List list, String directoryName) { + handler = getToolContentHandler(); + for (Summary summary : list) { + + try{ + int idx= 1; + String userName =""; +// String userName = summary.getUsername(); + String localDir; + while(true){ + localDir = FileUtil.getFullPath(directoryName,userName + "/" + idx); + File local = new File(localDir); + if(!local.exists()){ + local.mkdirs(); + break; + } + idx++; + } +// summary.setAttachmentLocalUrl(userName + "/" + idx + "/" + summary.getFileUuid() + '.' + FileUtil.getFileExtension(summary.getFileName())); +// handler.saveFile(summary.getFileUuid(), FileUtil.getFullPath(directoryName, summary.getAttachmentLocalUrl())); + } catch (Exception e) { + logger.error("Export forum topic attachment failed: " + e.toString()); + } + } + + } + + private SpreadsheetToolContentHandler getToolContentHandler() { + if ( handler == null ) { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext()); + handler = (SpreadsheetToolContentHandler) wac.getBean(SpreadsheetConstants.TOOL_CONTENT_HANDLER_NAME); + } + return handler; + } + + private ReflectDTO getReflectionEntry(SpreadsheetUser spreadsheetUser) { + ReflectDTO reflectDTO = new ReflectDTO(spreadsheetUser); + NotebookEntry notebookEntry = service.getEntry(spreadsheetUser.getSession().getSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, + SpreadsheetConstants.TOOL_SIGNATURE, spreadsheetUser.getUserId().intValue()); + + // check notebookEntry is not null + if (notebookEntry != null) { + reflectDTO.setReflect(notebookEntry.getEntry()); + logger.debug("Could not find notebookEntry for SpreadsheetUser: " + spreadsheetUser.getUid()); + } + return reflectDTO; + } +} Index: lams_tool_spreadsheet/web/403.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/403.jsp (revision 0) +++ lams_tool_spreadsheet/web/403.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,6 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + Index: lams_tool_spreadsheet/web/404.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/404.jsp (revision 0) +++ lams_tool_spreadsheet/web/404.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/.cvsignore =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/.cvsignore (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/.cvsignore (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,4 @@ +lib +struts-config.xml +validation.xml +classes Index: lams_tool_spreadsheet/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/AuthoringButton.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,95 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * AuthoringButton.tag + * Author: Dapeng Ni + * Description: Creates the save/cancel button for authoring page + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> + +<%@ attribute name="formID" required="true" rtexprvalue="true" %> +<%@ attribute name="toolSignature" required="true" rtexprvalue="true" %> +<%@ attribute name="toolContentID" required="true" rtexprvalue="true" %> +<%@ attribute name="contentFolderID" required="true" rtexprvalue="true" %> +<%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %> + +<%-- Optional attribute --%> +<%@ attribute name="accessMode" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %> +<%@ attribute name="defineLater" required="false" rtexprvalue="true" %> +<%@ attribute name="customiseSessionID" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + +

    + + + + + + +

    + Index: lams_tool_spreadsheet/web/WEB-INF/tags/Date.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/Date.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Date.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,52 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Author: Fiona Malikoff + * Description: Format a date, using the locale, based on standard parameters. + * Need to use long for the date otherwise the AU locale comes out as 1/2/06 and + * full is needed to include the timezone. + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="value" required="true" rtexprvalue="true" type="java.util.Date" %> +<%@ attribute name="style" required="false" rtexprvalue="true"%> +<%@ attribute name="type" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/DefineLater.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/DefineLater.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/DefineLater.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,58 @@ + +<% + /**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * DefineLater.tag + * Author: Fiona Malikoff + * Description: Layout for "Define Later" screens - to be used in learning. + * A suggested layout - unless the tool has special requirements, this layout should be used. + * Expects to be used inside
    + */ +%> + +<%@ tag body-content="scriptless"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-core" prefix="c"%> + +<%@ attribute name="defineLaterMessageKey" required="false" + rtexprvalue="true"%> +<%@ attribute name="buttonTryAgainKey" required="false" + rtexprvalue="true"%> + +<%-- Default value for I18N keys --%> + + + + + + + +

    + +

    +
    + +
    Index: lams_tool_spreadsheet/web/WEB-INF/tags/ExportPortOutput.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/ExportPortOutput.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/ExportPortOutput.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,59 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Passon + * Author: Fiona Malikoff + * Description: Outputs the Activity details on the main page in export portfolio. Recursive tag. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="actport" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.learning.export.ActivityPortfolio" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +
  • + + + " target="_blank"/> + + + + + + + + +
      + + + +
    +
    +
    + +
  • + Index: lams_tool_spreadsheet/web/WEB-INF/tags/FCKEditor.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/FCKEditor.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/FCKEditor.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,57 @@ +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="fck-editor" prefix="fck"%> + +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="true" rtexprvalue="true"%> +<%@ attribute name="toolbarSet" required="false" rtexprvalue="true"%> +<%@ attribute name="contentFolderID" required="false" rtexprvalue="true"%> + + + + + + + + + +/fckeditor/ + + + + + ${value} + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/Head.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/Head.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Head.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,41 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Head.tag + * Author: Fiona Malikoff + * Description: Sets up the non-cache pragma statements and the UTF-8 + * encoding. Use in place of the normal head tag. + */ +%> + +<%@ tag body-content="scriptless"%> + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,37 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * ImgButtonWrapper.tag + * Author: Mitchell Seaton + * Description: Simple wrapper that will display buttons correctly when RTL page rendering is used. + */ + + %> +<%@ tag body-content="scriptless" %> +
    +
    + +
    +
    Index: lams_tool_spreadsheet/web/WEB-INF/tags/LearnerFlashEnabled.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,45 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Learner Flash Enabled + * Author: Fiona Malikoff + * Description: Is Flash enabled for learner? + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + true + false + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/Passon.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/Passon.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Passon.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,86 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Passon + * Author: Mitchell Seaton + * Description: Passes on progress data to the Flash Learner to update the progress bar. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="progress" required="true" rtexprvalue="true" type="java.lang.String" %> +<%@ attribute name="version" required="false" rtexprvalue="true" %> +<%@ attribute name="id" required="true" rtexprvalue="true" %> +<%@ attribute name="redirect" required="false" rtexprvalue="true" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/ProgressOutput.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/ProgressOutput.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/ProgressOutput.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,79 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Progress Output + * Author: Fiona Malikoff + * Description: Outputs the Activity details on the jsp progress page. Recursive tag + * + */ + + /** Need to add current ! */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="activity" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.learning.web.bean.ActivityURL" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +
  • + + + + + + + + + + + + + + + + + + + + + + + + ${activity.title} + + + + + +
      + + + +
    +
    +
    + +
  • + Index: lams_tool_spreadsheet/web/WEB-INF/tags/Tab.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/Tab.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Tab.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,85 @@ +<% + /**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * Tab.tag + * Author: Mitchell Seaton + * Description: Creates a tab element. + * Wiki: + */ +%> +<%@ tag body-content="empty"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="false" rtexprvalue="true"%> +<%@ attribute name="key" required="false" rtexprvalue="true"%> +<%@ attribute name="inactive" required="false" rtexprvalue="true"%> +<%@ attribute name="methodCall" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%-- Check if bundle is set --%> + + + + + + + + + + +<%-- + Usually methodCall is selectTab, but the calling code can override methodCall if desired. + this is handy if the page needs different logic on initialisation and user switching tabs +--%> + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/TabBody.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/TabBody.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,52 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * TabBody.tag + * Author: Mitchell Seaton + * Description: Creates the body container for a tab element + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="tabTitle" required="false" rtexprvalue="true"%> +<%@ attribute name="titleKey" required="false" rtexprvalue="true"%> +<%@ attribute name="page" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-bean" prefix="bean"%> + + +
    + + + + + + + + + +
    + Index: lams_tool_spreadsheet/web/WEB-INF/tags/TabName.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/TabName.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/TabName.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,60 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * TabName Tag + * Author: Mitchell Seaton + * Description: Shortens name that are too long to fit inside a tab + */ + + %> +<%@ tag body-content="scriptless" %> + +<%@ attribute name="url" required="true" rtexprvalue="true"%> +<%@ attribute name="highlight" required="false" rtexprvalue="true" %> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-function" prefix="fn"%> + +12 + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/Tabs.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/Tabs.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Tabs.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,69 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Tabs.tag + * Author: Mitchell Seaton + * Description: Create a tab list from a input collection or nested Tab tags. + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="collection" type="java.util.Collection" required="false" rtexprvalue="true"%> +<%@ attribute name="control" required="false" rtexprvalue="true"%> +<%@ attribute name="useKey" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tags/headItems.tag =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tags/headItems.tag (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tags/headItems.tag (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,52 @@ +<%/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Standard Head Items + * Author: Fiona Malikoff + * Description: Includes all the standard head items e.g. the + * lams css files, sets the content type, standard javascript files. + */ + + %> +<%@ tag body-content="empty"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tiles-defs.xml =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tiles-defs.xml (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tiles-defs.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/fckeditor/FCKeditor.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/fckeditor/FCKeditor.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/fckeditor/FCKeditor.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,215 @@ + + + + + 2.3 + 1.1 + FCKeditor + http://fckeditor.net/tags-fckeditor + FCKeditor taglib + + editor + com.fredck.FCKeditor.tags.FCKeditorTag + JSP + + id + true + true + + + basePath + false + true + + + toolbarSet + false + true + + + width + false + true + + + height + false + true + + + customConfigurationsPath + false + true + + + editorAreaCSS + false + true + + + baseHref + false + true + + + skinPath + false + true + + + pluginsPath + false + true + + + fullPage + false + true + + + debug + false + true + + + autoDetectLanguage + false + true + + + defaultLanguage + false + true + + + contentLangDirection + false + true + + + enableXHTML + false + true + + + enableSourceXHTML + false + true + + + fillEmptyBlocks + false + true + + + formatSource + false + true + + + formatOutput + false + true + + + formatIndentator + false + true + + + geckoUseSPAN + false + true + + + startupFocus + false + true + + + forcePasteAsPlainText + false + true + + + forceSimpleAmpersand + false + true + + + tabSpaces + false + true + + + useBROnCarriageReturn + false + true + + + toolbarStartExpanded + false + true + + + toolbarCanCollapse + false + true + + + fontColors + false + true + + + fontNames + false + true + + + fontSizes + false + true + + + fontFormats + false + true + + + stylesXmlPath + false + true + + + linkBrowserURL + false + true + + + imageBrowserURL + false + true + + + flashBrowserURL + false + true + + + linkUploadURL + false + true + + + imageUploadURL + false + true + + + flashUploadURL + false + true + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/c.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/c.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/c.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,563 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the spreadsheet to import. + + url + true + true + + + +Name of the exported scoped variable for the +spreadsheet's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +spreadsheet's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL spreadsheet that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +spreadsheet. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the spreadsheet to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +spreadsheet that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +spreadsheet that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/fmt.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/fmt.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/fmt.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,671 @@ + + + + + JSTL 1.1 i18n-capable formatting library + JSTL fmt + 1.1 + fmt + http://java.sun.com/jsp/jstl/fmt + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + + + + Sets the request character encoding + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + +Name of character encoding to be applied when +decoding request parameters. + + value + false + true + + + + + + Stores the given locale in the locale configuration variable + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + +A String value is interpreted as the +printable representation of a locale, which +must contain a two-letter (lower-case) +language code (as defined by ISO-639), +and may contain a two-letter (upper-case) +country code (as defined by ISO-3166). +Language and country codes must be +separated by hyphen (-) or underscore +(_). + + value + true + true + + + +Vendor- or browser-specific variant. +See the java.util.Locale javadocs for +more information on variants. + + variant + false + true + + + +Scope of the locale configuration variable. + + scope + false + false + + + + + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See +java.util.TimeZone for more information on +supported time zone formats. + + value + true + true + + + + + + Stores the given time zone in the time zone configuration variable + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See java.util.TimeZone for +more information on supported time zone +formats. + + value + true + true + + + +Name of the exported scoped variable which +stores the time zone of type +java.util.TimeZone. + + var + false + false + + + +Scope of var or the time zone configuration +variable. + + scope + false + false + + + + + + Loads a spreadsheet bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Spreadsheet bundle base name. This is the bundle's +fully-qualified spreadsheet name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Prefix to be prepended to the value of the message +key of any nested <fmt:message> action. + + prefix + false + true + + + + + + Loads a spreadsheet bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Spreadsheet bundle base name. This is the bundle's +fully-qualified spreadsheet name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Name of the exported scoped variable which stores +the i18n localization context of type +javax.servlet.jsp.jstl.fmt.LocalizationC +ontext. + + var + false + false + + + +Scope of var or the localization context +configuration variable. + + scope + false + false + + + + + + Maps key to localized message and performs parametric replacement + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + +Message key to be looked up. + + key + false + true + + + +Localization context in whose spreadsheet +bundle the message key is looked up. + + bundle + false + true + + + +Name of the exported scoped variable +which stores the localized message. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Supplies an argument for parametric replacement to a containing + <message> tag + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + +Argument used for parametric replacement. + + value + false + true + + + + + + Formats a numeric value as a number, currency, or percentage + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + +Numeric value to be formatted. + + value + false + true + + + +Specifies whether the value is to be +formatted as number, currency, or +percentage. + + type + false + true + + + +Custom formatting pattern. + + pattern + false + true + + + +ISO 4217 currency code. Applied only +when formatting currencies (i.e. if type is +equal to "currency"); ignored otherwise. + + currencyCode + false + true + + + +Currency symbol. Applied only when +formatting currencies (i.e. if type is equal +to "currency"); ignored otherwise. + + currencySymbol + false + true + + + +Specifies whether the formatted output +will contain any grouping separators. + + groupingUsed + false + true + + + +Maximum number of digits in the integer +portion of the formatted output. + + maxIntegerDigits + false + true + + + +Minimum number of digits in the integer +portion of the formatted output. + + minIntegerDigits + false + true + + + +Maximum number of digits in the +fractional portion of the formatted output. + + maxFractionDigits + false + true + + + +Minimum number of digits in the +fractional portion of the formatted output. + + minFractionDigits + false + true + + + +Name of the exported scoped variable +which stores the formatted result as a +String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a number, currency, or percentage + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + +String to be parsed. + + value + false + true + + + +Specifies whether the string in the value +attribute should be parsed as a number, +currency, or percentage. + + type + false + true + + + +Custom formatting pattern that determines +how the string in the value attribute is to be +parsed. + + pattern + false + true + + + +Locale whose default formatting pattern (for +numbers, currencies, or percentages, +respectively) is to be used during the parse +operation, or to which the pattern specified +via the pattern attribute (if present) is +applied. + + parseLocale + false + true + + + +Specifies whether just the integer portion of +the given value should be parsed. + + integerOnly + false + true + + + +Name of the exported scoped variable which +stores the parsed result (of type +java.lang.Number). + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Formats a date and/or time using the supplied styles and pattern + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + +Date and/or time to be formatted. + + value + true + true + + + +Specifies whether the time, the date, or both +the time and date components of the given +date are to be formatted. + + type + false + true + + + +Predefined formatting style for dates. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a date or both a date and +time (i.e. if type is missing or is equal to +"date" or "both"); ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting style for times. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a time or both a date and +time (i.e. if type is equal to "time" or "both"); +ignored otherwise. + + timeStyle + false + true + + + +Custom formatting style for dates and times. + + pattern + false + true + + + +Time zone in which to represent the formatted +time. + + timeZone + false + true + + + +Name of the exported scoped variable which +stores the formatted result as a String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a date and/or time + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + +Date string to be parsed. + + value + false + true + + + +Specifies whether the date string in the +value attribute is supposed to contain a +time, a date, or both. + + type + false + true + + + +Predefined formatting style for days +which determines how the date +component of the date string is to be +parsed. Applied only when formatting a +date or both a date and time (i.e. if type +is missing or is equal to "date" or "both"); +ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting styles for times +which determines how the time +component in the date string is to be +parsed. Applied only when formatting a +time or both a date and time (i.e. if type +is equal to "time" or "both"); ignored +otherwise. + + timeStyle + false + true + + + +Custom formatting pattern which +determines how the date string is to be +parsed. + + pattern + false + true + + + +Time zone in which to interpret any time +information in the date string. + + timeZone + false + true + + + +Locale whose predefined formatting styles +for dates and times are to be used during +the parse operation, or to which the +pattern specified via the pattern +attribute (if present) is applied. + + parseLocale + false + true + + + +Name of the exported scoped variable in +which the parsing result (of type +java.util.Date) is stored. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/fn.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/fn.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/fn.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,207 @@ + + + + + JSTL 1.1 functions library + JSTL functions + 1.1 + fn + http://java.sun.com/jsp/jstl/functions + + + + Tests if an input string contains the specified substring. + + contains + org.apache.taglibs.standard.functions.Functions + boolean contains(java.lang.String, java.lang.String) + + <c:if test="${fn:contains(name, searchString)}"> + + + + + + Tests if an input string contains the specified substring in a case insensitive way. + + containsIgnoreCase + org.apache.taglibs.standard.functions.Functions + boolean containsIgnoreCase(java.lang.String, java.lang.String) + + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> + + + + + + Tests if an input string ends with the specified suffix. + + endsWith + org.apache.taglibs.standard.functions.Functions + boolean endsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:endsWith(filename, ".txt")}"> + + + + + + Escapes characters that could be interpreted as XML markup. + + escapeXml + org.apache.taglibs.standard.functions.Functions + java.lang.String escapeXml(java.lang.String) + + ${fn:escapeXml(param:info)} + + + + + + Returns the index withing a string of the first occurrence of a specified substring. + + indexOf + org.apache.taglibs.standard.functions.Functions + int indexOf(java.lang.String, java.lang.String) + + ${fn:indexOf(name, "-")} + + + + + + Joins all elements of an array into a string. + + join + org.apache.taglibs.standard.functions.Functions + java.lang.String join(java.lang.String[], java.lang.String) + + ${fn:join(array, ";")} + + + + + + Returns the number of items in a collection, or the number of characters in a string. + + length + org.apache.taglibs.standard.functions.Functions + int length(java.lang.Object) + + You have ${fn:length(shoppingCart.products)} in your shopping cart. + + + + + + Returns a string resulting from replacing in an input string all occurrences + of a "before" string into an "after" substring. + + replace + org.apache.taglibs.standard.functions.Functions + java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) + + ${fn:replace(text, "-", "•")} + + + + + + Splits a string into an array of substrings. + + split + org.apache.taglibs.standard.functions.Functions + java.lang.String[] split(java.lang.String, java.lang.String) + + ${fn:split(customerNames, ";")} + + + + + + Tests if an input string starts with the specified prefix. + + startsWith + org.apache.taglibs.standard.functions.Functions + boolean startsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:startsWith(product.id, "100-")}"> + + + + + + Returns a subset of a string. + + substring + org.apache.taglibs.standard.functions.Functions + java.lang.String substring(java.lang.String, int, int) + + P.O. Box: ${fn:substring(zip, 6, -1)} + + + + + + Returns a subset of a string following a specific substring. + + substringAfter + org.apache.taglibs.standard.functions.Functions + java.lang.String substringAfter(java.lang.String, java.lang.String) + + P.O. Box: ${fn:substringAfter(zip, "-")} + + + + + + Returns a subset of a string before a specific substring. + + substringBefore + org.apache.taglibs.standard.functions.Functions + java.lang.String substringBefore(java.lang.String, java.lang.String) + + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} + + + + + + Converts all of the characters of a string to lower case. + + toLowerCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toLowerCase(java.lang.String) + + Product name: ${fn.toLowerCase(product.name)} + + + + + + Converts all of the characters of a string to upper case. + + toUpperCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toUpperCase(java.lang.String) + + Product name: ${fn.UpperCase(product.name)} + + + + + + Removes white spaces from both ends of a string. + + trim + org.apache.taglibs.standard.functions.Functions + java.lang.String trim(java.lang.String) + + Name: ${fn.trim(name)} + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/x.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/x.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/jstl/x.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,448 @@ + + + + + JSTL 1.1 XML library + JSTL XML + 1.1 + x + http://java.sun.com/jsp/jstl/xml + + + + Provides validation features for JSTL XML tags. + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Like <%= ... >, but for XPath expressions. + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + +XPath expression to be evaluated. + + select + true + false + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default +value is true. + + escapeXml + false + true + + + + + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + +The test condition that tells whether or not the +body content should be processed. + + select + true + false + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + XML iteration tag. + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + +Name of the exported scoped variable for the +current item of the iteration. This scoped variable +has nested visibility. Its type depends on the +result of the XPath expression in the select +attribute. + + var + false + false + + + +XPath expression to be evaluated. + + select + true + false + + + +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. + + begin + false + true + int + + + +Iteration ends at the item located at the specified +index (inclusive). + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility. + + varStatus + false + false + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'transform' tag's Transformer + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + +Name of the transformation parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Parses XML content from 'source' attribute or 'body' + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is implementation +dependent. + + var + false + false + + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is +org.w3c.dom.Document. + + varDom + false + false + + + +Scope for var. + + scope + false + false + + + +Scope for varDom. + + scopeDom + false + false + + + +Deprecated. Use attribute 'doc' instead. + + xml + false + true + + + +Source XML document to be parsed. + + doc + false + true + + + +The system identifier (URI) for parsing the +XML document. + + systemId + false + true + + + +Filter to be applied to the source +document. + + filter + false + true + + + + + + Saves the result of an XPath expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + +Name of the exported scoped variable to hold +the value specified in the action. The type of the +scoped variable is whatever type the select +expression evaluates to. + + var + true + false + + + +XPath expression to be evaluated. + + select + false + false + + + +Scope for var. + + scope + false + false + + + + + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + +Name of the exported +scoped variable for the +transformed XML +document. The type of the +scoped variable is +org.w3c.dom.Document. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Result +Object that captures or +processes the transformation +result. + + result + false + true + + + +Deprecated. Use attribute +'doc' instead. + + xml + false + true + + + +Source XML document to be +transformed. (If exported by +<x:set>, it must correspond +to a well-formed XML +document, not a partial +document.) + + doc + false + true + + + +Deprecated. Use attribute +'docSystemId' instead. + + xmlSystemId + false + true + + + +The system identifier (URI) +for parsing the XML +document. + + docSystemId + false + true + + + +javax.xml.transform.Source +Transformation stylesheet as +a String, Reader, or +Source object. + + xslt + false + true + + + +The system identifier (URI) +for parsing the XSLT +stylesheet. + + xsltSystemId + false + true + + + + + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + +The test condition that tells whether or +not the body content should be +processed + + select + true + false + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/lams/lams.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/lams/lams.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/lams/lams.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,508 @@ + + + + + 1.0 + lams + + LAMSTags + + + + + Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ + Base URL for the current web app + + + WebAppURL + org.lamsfoundation.lams.web.tag.WebAppURLTag + empty + + + + + Output a random number for the learner and passon flash movies to communicate directly. + generate unique ID + + + generateID + org.lamsfoundation.lams.web.tag.GenerateIDTag + empty + + + Output a random number for the learner and passon flash movies to communicate directly. + id + false + + true + + + + + + + Get the configuration value for the specified key + Configuration value + + + Configuration + org.lamsfoundation.lams.web.tag.ConfigurationTag + empty + + + Get the configuration value for the specified key + key + false + + true + + + + + + + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL + + + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag + empty + + + + + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + + Converts text from \n or \r\n to <BR> before rendering + Converts text from \n or \r\n to <BR> before rendering + + + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + empty + + + Converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + Converts text from \n or \r\n to <BR> before rendering + escapeHtml + false + + true + + + + + + + Help tag + Help tag + + + help + org.lamsfoundation.lams.web.tag.HelpTag + empty + + + Help tag + module + false + + true + + + + Help tag + toolSignature + false + + true + + + + Help tag + page + false + + true + + + + Help tag + style + false + + true + + + + + + + Converts role name into form usable as message spreadsheet key + Converts role name into form usable as message spreadsheet key + + + role + org.lamsfoundation.lams.web.tag.RoleTag + empty + + + Converts role name into form usable as message spreadsheet key + role + true + + true + + + + + + + Output stylesheet based on the user preferences. + User's chosen stylesheet + + + css + org.lamsfoundation.lams.web.tag.CssTag + empty + + + Output stylesheet based on the user preferences. + localLinkPath + false + + true + + + + Output stylesheet based on the user preferences. + style + false + + true + + + + + + + Output details from the shared session UserDTO object + user details + + + user + org.lamsfoundation.lams.web.tag.UserTag + empty + + + Output details from the shared session UserDTO object + property + true + + true + + + + + + + STRUTS-textarea + org.lamsfoundation.lams.web.tag.MultiLinesTextareaTag + empty + + accesskey + false + true + + + alt + false + true + + + altKey + false + true + + + bundle + false + true + + + cols + false + true + + + disabled + false + true + + + errorKey + false + true + + + errorStyle + false + true + + + errorStyleClass + false + true + + + errorStyleId + false + true + + + indexed + false + true + + + name + false + true + + + onblur + false + true + + + onchange + false + true + + + onclick + false + true + + + ondblclick + false + true + + + onfocus + false + true + + + onkeydown + false + true + + + onkeypress + false + true + + + onkeyup + false + true + + + onmousedown + false + true + + + onmousemove + false + true + + + onmouseout + false + true + + + onmouseover + false + true + + + onmouseup + false + true + + + property + true + true + + + readonly + false + true + + + rows + false + true + + + style + false + true + + + styleClass + false + true + + + styleId + false + true + + + tabindex + false + true + + + title + false + true + + + titleKey + false + true + + + value + false + true + + + + Tab + /WEB-INF/tags/Tab.tag + + + Tabs + /WEB-INF/tags/Tabs.tag + + + TabBody + /WEB-INF/tags/TabBody.tag + + + TabName + /WEB-INF/tags/TabName.tag + + + FCKEditor + /WEB-INF/tags/FCKEditor.tag + + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + + + headItems + /WEB-INF/tags/headItems.tag + + + Passon + /WEB-INF/tags/Passon.tag + + + ExportPortOutput + /WEB-INF/tags/ExportPortOutput.tag + + + Date + /WEB-INF/tags/Date.tag + + + DefineLater + /WEB-INF/tags/DefineLater.tag + + + ImgButtonWrapper + /WEB-INF/tags/ImgButtonWrapper.tag + + + textarea + org.lamsfoundation.lams.web.tag.LAMSMultiLinesTextareaTag + JSP + true + + Render text exactly same as original input, which even won't escape the input HTML tag. + + + + + name + true + true + + + + + id + false + true + + + + + onchange + false + true + + + + head + /WEB-INF/tags/Head.tag + + + ProgressOutput + /WEB-INF/tags/ProgressOutput.tag + + + LearnerFlashEnabled + /WEB-INF/tags/LearnerFlashEnabled.tag + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-bean.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-bean.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-bean.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-html.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-html.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-html.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-logic.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-logic.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-logic.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-nested.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-nested.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-nested.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-tiles.tld =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-tiles.tld (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/tlds/struts/struts-tiles.tld (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_tool_spreadsheet/web/WEB-INF/web.xml =================================================================== diff -u --- lams_tool_spreadsheet/web/WEB-INF/web.xml (revision 0) +++ lams_tool_spreadsheet/web/WEB-INF/web.xml (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,351 @@ + + + + Shared Spreadsheet + + Shared Spreadsheet tool + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.spreadsheet.ApplicationResources + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + classpath:/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml + + + + + + org.springframework.web.context.ContextLoaderListener + + + + + hibernateFilter + + org.springframework.orm.hibernate3.support.OpenSessionInViewFilter + + + sessionFactoryBeanName + spreadsheetSessionFactory + + + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + encoding + UTF-8 + + + + + hibernateFilter + /* + + + SystemSessionFilter + /* + + + LocaleFilter + /* + + + + + + exportPortfolio + org.lamsfoundation.lams.tool.spreadsheet.web.servlet.ExportServlet + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 999 + + + detail + 1 + + + validate + true + + 2 + + + + Connector + com.fredck.FCKeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Instructions Download + Instructions Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + spreadsheetToolContentHandler + + 3 + + + + action + *.do + + + + Connector + /editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + + + + + + + + tags-bean + /WEB-INF/tlds/struts/struts-bean.tld + + + tags-html + /WEB-INF/tlds/struts/struts-html.tld + + + tags-logic + /WEB-INF/tlds/struts/struts-logic.tld + + + tags-tiles + /WEB-INF/tlds/struts/struts-tiles.tld + + + + + + tags-fmt + /WEB-INF/tlds/jstl/fmt.tld + + + tags-core + /WEB-INF/tlds/jstl/c.tld + + + tags-function + /WEB-INF/tlds/jstl/fn.tld + + + tags-xml + /WEB-INF/tlds/jstl/x.tld + + + + + + fck-editor + /WEB-INF/tlds/fckeditor/FCKeditor.tld + + + + + + tags-lams + /WEB-INF/tlds/lams/lams.tld + + + + + + + + Secure Content + /* + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring/* + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + Staff Content + /definelater.do + + + MONITOR + TEACHER + + + + + + Adminstrator Content + /admin.do + + + ADMIN + + + + + LAMS System Adminstrator Content + /sysadmin.do + + + SYSADMIN + + + + + + Download Files + /download/ + + + LEARNER + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of users for sessions + SYSADMIN + + + + Can create/modify a learning design and edit default tool content + AUTHOR ADMIN + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + + Index: lams_tool_spreadsheet/web/common/fckeditorheader.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/common/fckeditorheader.jsp (revision 0) +++ lams_tool_spreadsheet/web/common/fckeditorheader.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,5 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + Index: lams_tool_spreadsheet/web/common/footer.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/common/footer.jsp (revision 0) +++ lams_tool_spreadsheet/web/common/footer.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ +
    Index: lams_tool_spreadsheet/web/common/header.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/common/header.jsp (revision 0) +++ lams_tool_spreadsheet/web/common/header.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,17 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/common/messages.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/common/messages.jsp (revision 0) +++ lams_tool_spreadsheet/web/common/messages.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,8 @@ +<%-- Error Messages --%> + +

    + +
    +
    +

    +
    Index: lams_tool_spreadsheet/web/common/tabbedheader.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/common/tabbedheader.jsp (revision 0) +++ lams_tool_spreadsheet/web/common/tabbedheader.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,17 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/common/taglibs.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/common/taglibs.jsp (revision 0) +++ lams_tool_spreadsheet/web/common/taglibs.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,12 @@ +<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-tiles" prefix="tiles" %> +<%@ taglib uri="tags-bean" prefix="bean" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-logic" prefix="logic" %> +<%@ taglib uri="tags-function" prefix="fn" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-xml" prefix="x" %> +<%@ taglib uri="tags-lams" prefix="lams" %> +<%@ taglib uri="fck-editor" prefix="FCK"%> + Index: lams_tool_spreadsheet/web/error.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/error.jsp (revision 0) +++ lams_tool_spreadsheet/web/error.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,69 @@ + + +<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + +<%-- Catch JSP Servlet Exception --%> +<% +if (exception != null) { +%> + + <%=exception.getMessage()%> + + + <%=exception.getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + exception.printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { +%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() + .getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} +%> + +
    + + + +
    + + + + Index: lams_tool_spreadsheet/web/images/icon_spreadsheet.swf =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/css/spreadsheet.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/css/spreadsheet.css (revision 0) +++ lams_tool_spreadsheet/web/includes/css/spreadsheet.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,33 @@ +.innerforms { + border: 0px; + font-size: small; + font-style: normal; + width:100%; +} + +div.error, div.message { + background-color: #ffffcc; + border: 1px solid #000; + color: #000000; + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; + margin: 10px auto; + padding: 3px; + text-align: left; + vertical-align: bottom; +} + +/* use a different color for the errors */ +div.error { + border: 2px solid red; +} + +img.validationWarning, div.errors img.icon, div.messages img.icon { + border: 0; + width: 14px; + height: 13px; + vertical-align: top; +} +div.message img.icon { + vertical-align: middle; +} Index: lams_tool_spreadsheet/web/includes/images/.cvsignore =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/images/.cvsignore (revision 0) +++ lams_tool_spreadsheet/web/includes/images/.cvsignore (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ +Thumbs.db Index: lams_tool_spreadsheet/web/includes/images/cross.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/downarrow.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/downarrow_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/edit.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/indicator.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/spacer.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/tick.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/uparrow.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/images/uparrow_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/rsrcspreadsheetitem.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/rsrcspreadsheetitem.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/rsrcspreadsheetitem.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,114 @@ + /* + This is Spreadsheet Item instrcution area. + */ + var instructionTargetDiv = "instructionArea"; + var itemAttachmentTargetDiv = "itemAttachmentArea"; +// Please set these 2 variables in JSP file for using tag reason: +// var removeInstructionUrl = ""; +// var addInstructionUrl = ""; + function removeInstruction(idx){ + //var id = "instructionItem" + idx; + //Element.remove(id); + var url= removeInstructionUrl; + var reqIDVar = new Date(); + + var param = $("instructionForm").serialize(true); // Form.serialize('instructionForm'); + // param('instructionItemDesc' + idx) = + param.removeIdx = idx; + param.reqID = reqIDVar.getTime(); + + removeInstructionLoading(); + var myAjax = new Ajax.Updater( + instructionTargetDiv, + url, + { + method:'post', + parameters:param, + onComplete:removeInstructionComplete, + evalScripts:true, + contentType: 'application/x-www-form-urlencoded; charset=UTF-8' + } + ); + } + function removeItemAttachment(idx){ + //var id = "instructionItem" + idx; + //Element.remove(id); + var url= removeItemAttachmentUrl; + var reqIDVar = new Date(); + var param = "reqID="+reqIDVar.getTime(); + removeItemAttachmentLoading(); + var myAjax = new Ajax.Updater( + itemAttachmentTargetDiv, + url, + { + method:'post', + parameters:param, + onComplete:removeItemAttachmentComplete, + evalScripts:true + } + ); + } + function addInstruction(){ + var url= addInstructionUrl; + var reqIDVar = new Date(); + var param = Form.serialize("instructionForm")+"&reqID="+reqIDVar.getTime(); + addInstructionLoading(); + var myAjax = new Ajax.Updater( + instructionTargetDiv, + url, + { + method:'post', + parameters:param, + onComplete:addInstructionComplete, + evalScripts:true + } + ); + } + function upItem(itemIdx){ + if(itemIdx == 0) + return; + var currId = "instructionItemDesc" + itemIdx; + var repId = "instructionItemDesc" + (--itemIdx); + switchValue(currId,repId); + } + function downItem(itemIdx,maxSize){ + if(itemIdx == (maxSize -1)) + return; + var currId = "instructionItemDesc" + itemIdx; + var repId = "instructionItemDesc" + (++itemIdx); + switchValue(currId,repId); + } + function switchValue(currId,repId){ + var temp = $(repId).value; + $(repId).value = $(currId).value; + $(currId).value= temp; + } + function removeInstructionLoading(){ + showBusy(instructionTargetDiv); + } + function removeInstructionComplete(){ + hideBusy(instructionTargetDiv); + } + function removeItemAttachmentLoading(){ + showBusy(itemAttachmentTargetDiv); + } + function removeItemAttachmentComplete(){ + hideBusy(itemAttachmentTargetDiv); + } + function addInstructionLoading(){ + showBusy(instructionTargetDiv); + } + function addInstructionComplete(){ + hideBusy(instructionTargetDiv); + + } + + function submitSpreadsheetItem(){ + $("instructionList").value = Form.serialize("instructionForm"); + $("spreadsheetItemForm").submit(); + //after submit, it direct to itemlist.jsp, + // then refresh "basic tab" spreadsheetlist and close this window. + } + function cancelSpreadsheetItem(){ + window.top.hideMessage(); + } Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/LICENSE.txt =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/LICENSE.txt (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/LICENSE.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,342 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. +. + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +. +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. +. + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. +. + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS +. + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/changelog.txt =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/changelog.txt (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/changelog.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,137 @@ +Version 0.9 (July 2, 2007) (tb) +------------------------------------------ + + * changed the chart library to Artichow + + * fixed problems with Safari 3.0 + + +Version 0.8 (June 7, 2007) (tb) +------------------------------------------ + + * added French translation from Ben + + * added the option to load a different stylesheet + + * added width and height parameters to graph functions + + * added copying a cell into several cells + + * changed save() function to split format conversion and layout + + * fixed setting dimensions in the GUI + + * fixed exporting empty rows to CSV + + +Version 0.7 (March 17, 2007) (tb) +------------------------------------------ + + * added the option to disable automatic recalculation (better performance) + + * added the option to jump to another page with the gotoCell function + + * added paging for cursor keys, page up, page down, home, end keys + + * changed "readonly" to affect only the value + + * fixed calculations after column AA + + +Version 0.6 (January 29, 2007) (tb) +------------------------------------------ + + * added load button to the top menu + + * added documentation for string functions + + * fixed loading CSV data in IE + + * fixed a problem with missing quotes in CSV data + + * fixed a problem with copy/pasting cells into each other + + +Version 0.5 (December 9, 2006) (tb) +------------------------------------------ + + * added Italian translation from Nicola Canepa + + * added Spanish translation from Cesar Reyes + + * added import for tab separated values (= copy/paste from Excel) + + * added styles to the manual + + * added accesskeys for new / save / close + + * added option to use HTML in a cell + + * added loading sheets from an URL + + * added multiline editor + + * added TinyMCE html editor + + * fixed a problem with displaying data formats + + * fixed layout problems on the start page with IE + + * add type-to-edit cell from Cesar Reyes for Firefox + + +Version 0.4 (November 30, 2006) (tb) +------------------------------------------ + + * added new start page for language selection + + * added index_offline.html for offline usage + + * fixed problem with saving the data in IE + + * fixed csv import + + +Version 0.4 (sl) +------------------------------------------ + + * added English / German translations + + +Version 0.3 (June 22, 2006) (tb) +------------------------------------------ + + * added sorting + + * added CSV import, export + + * added export to Simple Groupware + + +Version 0.2 (June 11, 2006) (tb) +------------------------------------------ + + * added date and currency formats + + * added column/row merging + + * added group bar graph, scatter graph, + accumulated bar graph and line graph + + * added live preview when typing + + * added selecting ranges + + * added cut/copy/paste with ranges + + * some fixes for saving data + + +Version 0.1 (June 7, 2006) (tb) +------------------------------------------ + + * first release + + +tb = Thomas Bley +sl = Sophie Lee Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/editor.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/editor.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/editor.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,32 @@ + + + + + + + +
    HTML
    + + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_de.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_de.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_de.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,143 @@ +// visible cols, optional +cols = 13; +// visible rows, optional +rows = 30; + +// Usage: [#col,#row,"value","style"], +dbCells = [ + // column headers + [1,-1,"Spalte1","","Spalte1 langer Name"], // B-ColTitle + [2,-1,"Spalte2","color: blue; width:100px;","Spalte2 langer Name"], // C-ColTitle + [3,-1,"Spalte3","width:100px;"], // D-ColTitle + + // column group headers + [0,-2,"Gruppe1","color:red;colspan:2;"], + [3,-2,"Gruppe2","colspan:2;"], + [5,-2,"Gruppe3","colspan:3;"], + [8,-2,"Gruppe4","colspan:2;"], + + // row headers + [-1,0,"Gruppe#1","color:blue;","Gruppe#1 langer Name"], // RowTitle 1 + [-1,1,"Zeile1",""], // RowTitle 2 + [-1,2,"Zeile2","height:50px;"], // RowTitle 3 + [-1,3,"Zeile3",""], // RowTitle 4 + [-1,4,"Gruppe2","color:blue;","Gruppe2 langer Name"], // RowTitle 5 + [-1,5,"Zeile1",""], // RowTitle 6 + [-1,6,"Zeile2",""], // RowTitle 7 + [-1,7,"Zeile3",""], // RowTitle 8 + + [1,-1,"Spalte1","","Spalte1 langer Name"], // B-ColTitle + [2,-1,"Spalte2","color: blue; width:100px;","Spalte2 langer Name"], // C-ColTitle + [3,-1,"Spalte3","width:100px;"], // D-ColTitle + + // cells + + [0,0,"=C3","font-weight:bold;","example cell description"], // A1 + [2,2,"Test2","font-weight:bold;"], // C3 + [5,3,"html:Dies ist ein html-Text !
    • Punkt 1
    • Punkt 2
    • Punkt 3
    ",""], // F4 + [5,5,"Dies ist ein mehrzeiliger Text !\\nZeile 2\\nZeile 3\\nEnde",""], // F6 + [1,2,"verbundene Zeilen","font-size:75%; rowspan:2;"], // B3 + [1,5,"verbundene Spalten","colspan:3;"], // B6 + + [1,4,"gesperrt","readonly:true;height:50px;"], // B5 + [3,1,"10","format:dollar;"], // D2 + [2,1,"-2000000.999","width:100px; format:euro;"], // C2 + [1,1,"0.44321","format:percent;"], // B2 + + [5,0,"=C3+'C\"3+C3'",""], // F1 + [5,1,"=C3+\"C'3-C3\"",""], // F2 + [5,2,"='C\"3-C3'+C3+\"C'3+C3\"",""], // F3 + [6,0,"=\"C'3+C3\"+C3+'C\"3-C3'",""], // G1 + [6,1,"='\"","color:blue;"], // G2 + + [4,0,"abc http://www.spiegel.de test http://www.heise.de",""], // E1 + [4,1,"http://www.spiegel.de","font-weight:bold;"], // E2 + [4,2,"firstname.lastname@invalid.local","font-weight:bold;"], // E3 + + [0,6,"02/26/2006","format:date;"], // A7 + [1,6,"03/27/2007 9:11:12","format:datetime;"], // B7 + [2,6,"14:11:12","format:time;"], // C7 + [3,6,"1.2.2004","format:date;"], // D7 + [4,6,"03/27/2007 9:11:12","format:datefulltime;"], // E7 + [5,6,"02/26/2006","format:datefull;"], // F7 + + [2,3,"=customCalc(D4+D5)+customCalc2(D4+D5)","color:blue;"], // C4 + [2,4,"=D2*D3","font-weight:bold;"], // C5 + [3,2,"20",""], // D3 + [3,3,"=D2+D3","font-weight:bold; text-decoration:underline;"], // D4 + [3,4,"=sum(D2:D4)","color:blue;"], // D5 + [4,4,"=E5","color:red; font-style:italic;"], // E5 + +// Usage: graph(type,title,data,keys) + [4,3,"=graph('bar',E11,F12:F15,E12:E15,'Quartal','Wert')",""], // E4 + [4,5,"=graph('pie',F11,F12:F15,E12:E15)",""], // E6 + + [4,16,"=graph('bar',E11,F12:F15,E12:E15,'Quartal','Wert')",""], // E17 + [4,18,"=graph('line',G11,F12:F15,E12:E15,'Quartal','Wert')",""], // E19 + + [4,19,"=graph('linesteps','Stufendiagramm',F12:F15,E12:E15,'Quartal','Wert')",""], // E20 + [4,20,"=graph('scatter','Streuungsdiagramm',F12:F15,G12:G15)",""], // E21 + + [5,16,"=graph2('bar','Balkendiagramm (2 Balken)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F17 + [5,17,"=graph2('baraccumulate','Balkendiagramm (kumuliert)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F18 + [5,18,"=graph2('line','Liniendiagramm (2 Linien)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F19 + [5,19,"=graph2('linesteps','Stufendiagramm (2 Linien)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F20 + + [4,10,"Balkendiagramm",""], // F11 + [5,10,"Kuchendiagramm",""], // G11 + [6,10,"Liniendiagramm",""], // H11 + + [4,11,"Q1",""], // E12 + [4,12,"Q2",""], // E13 + [4,13,"Q3",""], // E14 + [4,14,"Q4",""], // E15 + + [5,11,"11",""], // F12 + [5,12,"2",""], // F13 + [5,13,"16",""], // F14 + [5,14,"22",""], // F15 + + [6,11,"31",""], // G12 + [6,12,"37",""], // G13 + [6,13,"36",""], // G14 + [6,14,"43",""], // G15 + + [1,7,"1",""], // B8 + [2,7,"2",""], // C8 + [3,7,"3",""], // D8 + [1,8,"6",""], // B9 + [2,8,"5",""], // C9 + [3,8,"5",""], // D9 + + [1,10,"=\"sum(B8:D8)\"",""], // B11 + [2,10,"=sum(B8:D8)","readonly:true;"], // C11 + + [1,11,"=\"min(B8:D8)\"",""], // B12 + [2,11,"=min(B8:D8)",""], // C12 + + [1,12,"=\"max(B8:D8)\"",""], // B13 + [2,12,"=max(B8:D8)",""], // C13 + + [1,13,"=\"avg(B8:D8)\"",""], // B14 + [2,13,"=avg(B8:D8)",""], // C14 + + [1,14,"=\"count(B8:D8)\"",""], // B15 + [2,14,"=count(B8:D8)",""], // C15 + + [1,15,"=\"sum([B8,D8])\"",""], // B16 + [2,15,"=sum([B8,D8])",""] // C16 +]; + +// define a custom function to be used in the formulas, optional +registerFuncs = ["customCalc","customCalc2"]; + +function customCalc(num) { + return num*2.5; +} + +function customCalc2(num) { + return num*3.0*showCell(1,1); // num * 2.5 * B2 +} + +// forbid paging ? optional +// allowPaging = false; Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_de_offline.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_de_offline.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_de_offline.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,118 @@ +// visible cols, optional +cols = 13; +// visible rows, optional +rows = 30; + +// Usage: [#col,#row,"value","style"], +dbCells = [ + // column headers + [1,-1,"Spalte1","","Spalte1 langer Name"], // B-ColTitle + [2,-1,"Spalte2","color: blue; width:100px;","Spalte2 langer Name"], // C-ColTitle + [3,-1,"Spalte3","width:100px;"], // D-ColTitle + + // column group headers + [0,-2,"Gruppe1","color:red;colspan:2;"], + [3,-2,"Gruppe2","colspan:2;"], + [5,-2,"Gruppe3","colspan:3;"], + [8,-2,"Gruppe4","colspan:2;"], + + // row headers + [-1,0,"Gruppe#1","color:blue;","Gruppe#1 langer Name"], // RowTitle 1 + [-1,1,"Zeile1",""], // RowTitle 2 + [-1,2,"Zeile2","height:50px;"], // RowTitle 3 + [-1,3,"Zeile3",""], // RowTitle 4 + [-1,4,"Gruppe2","color:blue;","Gruppe2 langer Name"], // RowTitle 5 + [-1,5,"Zeile1",""], // RowTitle 6 + [-1,6,"Zeile2",""], // RowTitle 7 + [-1,7,"Zeile3",""], // RowTitle 8 + + [1,-1,"Spalte1","","Spalte1 langer Name"], // B-ColTitle + [2,-1,"Spalte2","color: blue; width:100px;","Spalte2 langer Name"], // C-ColTitle + [3,-1,"Spalte3","width:100px;"], // D-ColTitle + + // cells + + [0,0,"=C3","font-weight:bold;"], // A1 + [2,2,"Test2","font-weight:bold;"], // C3 + [1,2,"verbundene Zeilen","font-size:75%; rowspan:2;"], // B3 + [1,5,"verbundene Spalten","colspan:3;"], // B6 + + [1,4,"gesperrt","readonly:true;height:50px;"], // B5 + [3,1,"10","format:dollar;"], // D2 + [2,1,"-2000000.999","width:100px; format:euro;"], // C2 + [1,1,"0.44321","format:percent;"], // B2 + + [5,0,"=C3+'C\"3+C3'",""], // F1 + [5,1,"=C3+\"C'3-C3\"",""], // F2 + [5,2,"='C\"3-C3'+C3+\"C'3+C3\"",""], // F3 + [6,0,"=\"C'3+C3\"+C3+'C\"3-C3'",""], // G1 + [6,1,"='\"","color:blue;"], // G2 + + [4,0,"abc http://www.spiegel.de test http://www.heise.de",""], // E1 + [4,1,"http://www.spiegel.de","font-weight:bold;"], // E2 + [4,2,"firstname.lastname@invalid.local","font-weight:bold;"], // E3 + + [0,6,"02/26/2006","format:date;"], // A7 + [1,6,"03/27/2007 9:11:12","format:datetime;"], // B7 + [2,6,"14:11:12","format:time;"], // C7 + [3,6,"1.2.2004","format:date;"], // D7 + [4,6,"03/27/2007 9:11:12","format:datefulltime;"], // E7 + [5,6,"02/26/2006","format:datefull;"], // F7 + + [2,3,"=customCalc(D4+D5)+customCalc2(D4+D5)","color:blue;"], // C4 + [2,4,"=D2*D3","font-weight:bold;"], // C5 + [3,2,"20",""], // D3 + [3,3,"=D2+D3","font-weight:bold; text-decoration:underline;"], // D4 + [3,4,"=sum(D2:D4)","color:blue;"], // D5 + [4,4,"=E5","color:red; font-style:italic;"], // E5 + + [4,11,"Q1",""], // E12 + [4,12,"Q2",""], // E13 + [4,13,"Q3",""], // E14 + [4,14,"Q4",""], // E15 + + [5,11,"11",""], // F12 + [5,12,"2",""], // F13 + [5,13,"16",""], // F14 + [5,14,"22",""], // F15 + + [6,11,"31",""], // G12 + [6,12,"37",""], // G13 + [6,13,"36",""], // G14 + [6,14,"43",""], // G15 + + [1,7,"1",""], // B8 + [2,7,"2",""], // C8 + [3,7,"3",""], // D8 + [1,8,"6",""], // B9 + [2,8,"5",""], // C9 + [3,8,"5",""], // D9 + + [1,10,"=\"sum(B8:D8)\"",""], // B11 + [2,10,"=sum(B8:D8)","readonly:true;"], // C11 + + [1,11,"=\"min(B8:D8)\"",""], // B12 + [2,11,"=min(B8:D8)",""], // C12 + + [1,12,"=\"max(B8:D8)\"",""], // B13 + [2,12,"=max(B8:D8)",""], // C13 + + [1,13,"=\"avg(B8:D8)\"",""], // B14 + [2,13,"=avg(B8:D8)",""], // C14 + + [1,14,"=\"count(B8:D8)\"",""], // B15 + [2,14,"=count(B8:D8)",""], // C15 + + [1,15,"=\"sum([B8,D8])\"",""], // B16 + [2,15,"=sum([B8,D8])",""] // C16 +]; +// define a custom function to be used in the formulas, optional +registerFuncs = ["customCalc","customCalc2"]; + +function customCalc(num) { + return num*2.5; +} + +function customCalc2(num) { + return num*3.0*showCell(1,1); // num * 2.5 * B2 +} \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_en.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_en.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_en.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,164 @@ +// visible cols, optional +cols = 13; +// visible rows, optional +rows = 30; + +// Usage: [#col,#row,"value","style"], +dbCells = [ + // column headers + [1,-1,"Col1","","Col1 long name"], // B-ColTitle + [2,-1,"Col2","color: blue; width:100px;","Col2 long name"], // C-ColTitle + [3,-1,"Col3","width:100px;"], // D-ColTitle + + // column group headers + [0,-2,"Group1","color:red;colspan:2;"], + [3,-2,"Group2","colspan:2;"], + [5,-2,"Group3","colspan:3;"], + [8,-2,"Group4","colspan:2;"], + + // row headers + [-1,0,"Group#1","color:blue;","Group#1 long name"], // RowTitle 1 + [-1,1,"Row1",""], // RowTitle 2 + [-1,2,"Row2","height:50px;"], // RowTitle 3 + [-1,3,"Row3",""], // RowTitle 4 + [-1,4,"Group#2","color:blue;","Group#2 long name"], // RowTitle 5 + [-1,5,"Row1",""], // RowTitle 6 + [-1,6,"Row2",""], // RowTitle 7 + [-1,7,"Row3",""], // RowTitle 8 + + [1,-1,"Col1","","Col1 long name"], // B-ColTitle + [2,-1,"Col2","color: blue; width:100px;","Col2 long name"], // C-ColTitle + [3,-1,"Col3","width:100px;"], // D-ColTitle + + // cells + + [0,0,"=C3","font-weight:bold;"], // A1 + [2,2,"test2","font-weight:bold;"], // C3 + [5,3,"html:This is a html text !
    • bullet 1
    • bullet 2
    • bullet 3
    ",""], // F4 + [5,5,"This is a Multiline text !\\nline 2\\nline 3\\nend",""], // F6 + [1,2,"rowspan","font-size:150%; rowspan:2;"], // B3 + [1,5,"colspan","colspan:3;"], // B6 + + [1,4,"locked","readonly:true;height:50px;"], // B5 + [3,1,"10","format:dollar;"], // D2 + [2,1,"-2000000.999","width:100px; format:euro;"], // C2 + [1,1,"0.44321","format:percent;"], // B2 + + [5,0,"=C3+'C\"3+C3'",""], // F1 + [5,1,"=C3+\"C'3-C3\"",""], // F2 + [5,2,"='C\"3-C3'+C3+\"C'3+C3\"",""], // F3 + [6,0,"=\"C'3+C3\"+C3+'C\"3-C3'",""], // G1 + [6,1,"='\"","color:blue;"], // G2 + + [4,0,"abc http://www.cnn.com test http://www.heise.de",""], // E1 + [4,1,"http://www.cnn.com","font-weight:bold;"], // E2 + [4,2,"firstname.lastname@invalid.local","font-weight:bold;"], // E3 + + [0,6,"02/26/2006","format:date;"], // A7 + [1,6,"03/27/2007 9:11:12","format:datetime;"], // B7 + [2,6,"14:11:12","format:time;"], // C7 + [3,6,"1.2.2004","format:date;"], // D7 + [4,6,"03/27/2007 9:11:12","format:datefulltime;"], // E7 + [5,6,"02/26/2006","format:datefull;"], // F7 + + [2,3,"=customCalc(D4+D5)+customCalc2(D4+D5)","color:blue;"], // C4 + [2,4,"=D2*D3","font-weight:bold;"], // C5 + [3,2,"20",""], // D3 + [3,3,"=D2+D3","font-weight:bold; text-decoration:underline;"], // D4 + [3,4,"=sum(D2:D4)","color:blue;"], // D5 + [4,4,"=E5","color:red; font-style:italic;"], // E5 + +// Usage: graph(type,title,data,keys) + [4,3,"=graph('bar',E11,F12:F15,E12:E15,'quarter','value')",""], // E4 + [4,5,"=graph('pie',F11,F12:F15,E12:E15)",""], // E6 + + [4,16,"=graph('bar',E11,F12:F15,E12:E15,'quarter','value')",""], // E17 + [4,18,"=graph('line',G11,F12:F15,E12:E15,'quarter','value')",""], // E19 + + [4,19,"=graph('linesteps','Linesteps graph',F12:F15,E12:E15,'quarter','value')",""], // E20 + [4,20,"=graph('scatter','Scatter graph',F12:F15,G12:G15)",""], // E21 + + [5,16,"=graph2('bar','Bar graph (2 bars)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F17 + [5,17,"=graph2('baraccumulate','Baraccumulate graph',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F18 + [5,18,"=graph2('line','Line graph (2 lines)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F19 + [5,19,"=graph2('linesteps','Linesteps graph (2 lines)',F12:F15,G12:G15,E12:E15)","colspan:2;"], // F20 + + [4,10,"Bar graph",""], // F11 + [5,10,"Pie graph",""], // G11 + [6,10,"Line graph",""], // H11 + + [4,11,"Q1",""], // E12 + [4,12,"Q2",""], // E13 + [4,13,"Q3",""], // E14 + [4,14,"Q4",""], // E15 + + [5,11,"11",""], // F12 + [5,12,"2",""], // F13 + [5,13,"16",""], // F14 + [5,14,"22",""], // F15 + + [6,11,"31",""], // G12 + [6,12,"37",""], // G13 + [6,13,"36",""], // G14 + [6,14,"43",""], // G15 + + [1,7,"1",""], // B8 + [2,7,"2",""], // C8 + [3,7,"3",""], // D8 + [1,8,"6",""], // B9 + [2,8,"5",""], // C9 + [3,8,"5",""], // D9 + + [1,10,"=\"sum(B8:D8)\"",""], // B11 + [2,10,"=sum(B8:D8)","readonly:true;"], // C11 + + [1,11,"=\"min(B8:D8)\"",""], // B12 + [2,11,"=min(B8:D8)",""], // C12 + + [1,12,"=\"max(B8:D8)\"",""], // B13 + [2,12,"=max(B8:D8)",""], // C13 + + [1,13,"=\"avg(B8:D8)\"",""], // B14 + [2,13,"=avg(B8:D8)",""], // C14 + + [1,14,"=\"count(B8:D8)\"",""], // B15 + [2,14,"=count(B8:D8)",""], // C15 + + [1,15,"=\"sum([B8,D8])\"",""], // B16 + [2,15,"=sum([B8,D8])",""] // C16 +]; +// define a custom function to be used in the formulas, optional +registerFuncs = ["customCalc","customCalc2"]; + +function customCalc(num) { + return num*2.5; +} + +function customCalc2(num) { + return num*3.0*showCell(1,1); // num * 2.5 * B2 +} + +/* +dbCells = [ + [0,0,"1",""], + [1,0,"2",""], + [2,0,"31",""], + [3,0,"4",""], + + [0,1,"5",""], + [1,1,"6",""], + [2,1,"7",""], + [3,1,"8",""], + + [2,2,"a","",], + + [2,3,"A","",], + + [2,4,"b","",], + + [2,5,"B","",], +]; +*/ + +// forbid paging ? optional +// allowPaging = false; \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_en_offline.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_en_offline.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/features_en_offline.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,120 @@ +// visible cols, optional +cols = 13; +// visible rows, optional +rows = 30; + +// Usage: [#col,#row,"value","style"], +dbCells = [ + // column headers + [1,-1,"Col1","","Col1 long name"], // B-ColTitle + [2,-1,"Col2","color: blue; width:100px;","Col2 long name"], // C-ColTitle + [3,-1,"Col3","width:100px;"], // D-ColTitle + + // column group headers + [0,-2,"Group1","color:red;colspan:2;"], + [3,-2,"Group2","colspan:2;"], + [5,-2,"Group3","colspan:3;"], + [8,-2,"Group4","colspan:2;"], + + // row headers + [-1,0,"Group#1","color:blue;","Group#1 long name"], // RowTitle 1 + [-1,1,"Row1",""], // RowTitle 2 + [-1,2,"Row2","height:50px;"], // RowTitle 3 + [-1,3,"Row3",""], // RowTitle 4 + [-1,4,"Group#2","color:blue;","Group#2 long name"], // RowTitle 5 + [-1,5,"Row1",""], // RowTitle 6 + [-1,6,"Row2",""], // RowTitle 7 + [-1,7,"Row3",""], // RowTitle 8 + + [1,-1,"Col1","","Col1 long name"], // B-ColTitle + [2,-1,"Col2","color: blue; width:100px;","Col2 long name"], // C-ColTitle + [3,-1,"Col3","width:100px;"], // D-ColTitle + + // cells + + [0,0,"=C3","font-weight:bold;"], // A1 + [2,2,"test2","font-weight:bold;"], // C3 + [1,2,"rowspan","font-size:150%; rowspan:2;"], // B3 + [1,5,"colspan","colspan:3;"], // B6 + + [1,4,"locked","readonly:true;height:50px;"], // B5 + [3,1,"10","format:dollar;"], // D2 + [2,1,"-2000000.999","width:100px; format:euro;"], // C2 + [1,1,"0.44321","format:percent;"], // B2 + + [5,0,"=C3+'C\"3+C3'",""], // F1 + [5,1,"=C3+\"C'3-C3\"",""], // F2 + [5,2,"='C\"3-C3'+C3+\"C'3+C3\"",""], // F3 + [6,0,"=\"C'3+C3\"+C3+'C\"3-C3'",""], // G1 + [6,1,"='\"","color:blue;"], // G2 + + [4,0,"abc http://www.cnn.com test http://www.heise.de",""], // E1 + [4,1,"http://www.cnn.com","font-weight:bold;"], // E2 + [4,2,"firstname.lastname@invalid.local","font-weight:bold;"], // E3 + + [0,6,"02/26/2006","format:date;"], // A7 + [1,6,"03/27/2007 9:11:12","format:datetime;"], // B7 + [2,6,"14:11:12","format:time;"], // C7 + [3,6,"1.2.2004","format:date;"], // D7 + [4,6,"03/27/2007 9:11:12","format:datefulltime;"], // E7 + [5,6,"02/26/2006","format:datefull;"], // F7 + + [2,3,"=customCalc(D4+D5)+customCalc2(D4+D5)","color:blue;"], // C4 + [2,4,"=D2*D3","font-weight:bold;"], // C5 + [3,2,"20",""], // D3 + [3,3,"=D2+D3","font-weight:bold; text-decoration:underline;"], // D4 + [3,4,"=sum(D2:D4)","color:blue;"], // D5 + [4,4,"=E5","color:red; font-style:italic;"], // E5 + +// Usage: graph(type,title,data,keys) + + [4,11,"Q1",""], // E12 + [4,12,"Q2",""], // E13 + [4,13,"Q3",""], // E14 + [4,14,"Q4",""], // E15 + + [5,11,"11",""], // F12 + [5,12,"2",""], // F13 + [5,13,"16",""], // F14 + [5,14,"22",""], // F15 + + [6,11,"31",""], // G12 + [6,12,"37",""], // G13 + [6,13,"36",""], // G14 + [6,14,"43",""], // G15 + + [1,7,"1",""], // B8 + [2,7,"2",""], // C8 + [3,7,"3",""], // D8 + [1,8,"6",""], // B9 + [2,8,"5",""], // C9 + [3,8,"5",""], // D9 + + [1,10,"=\"sum(B8:D8)\"",""], // B11 + [2,10,"=sum(B8:D8)","readonly:true;"], // C11 + + [1,11,"=\"min(B8:D8)\"",""], // B12 + [2,11,"=min(B8:D8)",""], // C12 + + [1,12,"=\"max(B8:D8)\"",""], // B13 + [2,12,"=max(B8:D8)",""], // C13 + + [1,13,"=\"avg(B8:D8)\"",""], // B14 + [2,13,"=avg(B8:D8)",""], // C14 + + [1,14,"=\"count(B8:D8)\"",""], // B15 + [2,14,"=count(B8:D8)",""], // C15 + + [1,15,"=\"sum([B8,D8])\"",""], // B16 + [2,15,"=sum([B8,D8])",""] // C16 +]; +// define a custom function to be used in the formulas, optional +registerFuncs = ["customCalc","customCalc2"]; + +function customCalc(num) { + return num*2.5; +} + +function customCalc2(num) { + return num*3.0*showCell(1,1); // num * 2.5 * B2 +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/survey.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/survey.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/examples/survey.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,215 @@ +document.title = "Simple Groupware Survey Results"; + +loadStyleFile("styles_noline.css"); +printstyle = "print_noline.css"; +rows = 95; +isWriteable = false; +allowPaging = false; + +col_min_width = "50px"; + +dbCells = [ + [3,1,"Which browser do you use ?","colspan:3; font-weight:bold;"], // D2 + + [3,3,"Firefox 2","width:100px;"], // D4 + [4,3,"47",""], // E4 + [6,3,"=graph('pie',D2,E4:E11,D4:D11,'','',400,180)","rowspan:8;"], // G4 + + [3,4,"IE 7",""], // D5 + [4,4,"4",""], // E5 + + [3,5,"Opera 9.2",""], // D6 + [4,5,"3",""], // E6 + + [3,6,"Firefox 1.5",""], // D7 + [4,6,"3",""], // E7 + + [3,7,"IE 6",""], // D8 + [4,7,"3",""], // E8 + + [3,8,"Opera 9.1",""], // D9 + [4,8,"1",""], // E9 + + [3,9,"Konqueror\\n(3.5.6)",""], // D10 + [4,9,"1",""], // E10 + + [3,10,"Others",""], // D11 + [4,10,"0",""], // E11 + + [3,13,"Firefox",""], // D14 + [4,13,"50",""], // E14 + [6,13,"=graph('pie',D2,E14:E17,D14:D17,'','',400,130)","rowspan:4;"], // G14 + + [3,14,"IE",""], // D15 + [4,14,"7",""], // E15 + + [3,15,"Opera",""], // D16 + [4,15,"4",""], // E16 + + [3,16,"Konqueror",""], // D17 + [4,16,"1",""], // E17 + + [3,20,"Which database do you use ?","colspan:3; font-weight:bold;"], // D21 + + [3,22,"MySQL 5.1",""], // D23 + [4,22,"18",""], // E23 + [6,22,"=graph('pie',D21,E23:E31,D23:D31,'','',430,185)","rowspan:9;"], // G23 + + [3,23,"MySQL 5",""], // D24 + [4,23,"15",""], // E24 + [6,23,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G24 + + [3,24,"MySQL 4.1",""], // D25 + [4,24,"11",""], // E25 + [6,24,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G25 + + [3,25,"PostgreSQL 8.2",""], // D26 + [4,25,"10",""], // E26 + [6,25,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G26 + + [3,26,"MySQL 4",""], // D27 + [4,26,"3",""], // E27 + [6,26,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G27 + + [3,27,"PostgreSQL 8.1",""], // D28 + [4,27,"2",""], // E28 + [6,27,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G28 + + [3,28,"Oracle 9i",""], // D29 + [4,28,"1",""], // E29 + [6,28,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G29 + + [3,29,"PostgreSQL 8.0",""], // D30 + [4,29,"0",""], // E30 + [6,29,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G30 + + [3,30,"Oracle 10g",""], // D31 + [4,30,"0",""], // E31 + [6,30,"=graph('pie',D2,E14:E22,D14:D22,'','',400,185)","rowspan:9;"], // G31 + + [3,33,"MySQL",""], // D34 + [4,33,"=E27+E25+E24+E23",""], // E34 + [6,33,"=graph('pie',D21,E34:E36,D34:D36,'','',430,130)","rowspan:3;"], // G34 + + [3,34,"PostgreSQL",""], // D35 + [4,34,"12",""], // E35 + + [3,35,"Oracle",""], // D36 + [4,35,"1",""], // E36 + + [3,39,"Which operating system do you use on the server ?","font-weight:bold; colspan:4;"], // D40 + + [3,41,"Debian",""], // D42 + [4,41,"14",""], // E42 + [6,41,"=graph('pie',D40,E42:E54,D42:D54,'','',450,270)","rowspan:13;"], // G42 + + [3,42,"CentOS",""], // D43 + [4,42,"9",""], // E43 + + [3,43,"Ubuntu",""], // D44 + [4,43,"7",""], // E44 + + [3,44,"SuSE E",""], // D45 + [4,44,"6",""], // E45 + + [3,45,"Win2k3",""], // D46 + [4,45,"6",""], // E46 + + [3,46,"BSD",""], // D47 + [4,46,"5",""], // E47 + + [3,47,"WinXP",""], // D48 + [4,47,"5",""], // E48 + + [3,48,"RedHat",""], // D49 + [4,48,"2",""], // E49 + + [3,49,"SuSE",""], // D50 + [4,49,"2",""], // E50 + + [3,50,"Fedora",""], // D51 + [4,50,"1",""], // E51 + + [3,51,"Win2k",""], // D52 + [4,51,"1",""], // E52 + + [3,52,"Gentoo",""], // D53 + [4,52,"1",""], // E53 + + [3,53,"Solaris",""], // D54 + [4,53,"0",""], // E54 + + [3,55,"Debian",""], // D56 + [4,55,"21",""], // E56 + [6,55,"=graph('pie',D40,E56:E60,D56:D60,'','',450,140)","rowspan:5;"], // G56 + + [3,56,"RedHat",""], // D57 + [4,56,"12",""], // E57 + + [3,57,"Windows",""], // D58 + [4,57,"12",""], // E58 + + [3,58,"SuSE",""], // D59 + [4,58,"8",""], // E59 + + [3,59,"BSD",""], // D60 + [4,59,"5",""], // E60 + + [3,63,"Custom browser:",""], // D64 + [4,63,"IE 7 (1x), IE 6 (1x)","colspan:3;"], // E64 + + [3,65,"Custom OS:",""], // D66 + [4,65,"Slackware Linux (2x), Ubuntu & Nokia N80 (1x), hosted linux (1x), Windows 2003/Fedora Core 6 (1x), windows 2003 (1x), Netware 5.1 (1x)","colspan:3;"], // E66 + + [3,67,"New Features:",""], // D68 + [4,67,"Implemented",""], // E68 + [5,67,"document check in / check out","colspan:2;"], // F68 + + [5,68,"posibility to add info to files mounted via CIFS (meta data)","colspan:2;"], // F69 + + [5,69,"client with ssl certificates signed by CAcert.org root certificate","colspan:2;"], // F70 + + [5,70,"An option to use a WYSIWYG editor in the text area. (configurable with sgsML)","colspan:2;"], // F71 + + [4,72,"Roadmap",""], // E73 + [5,72,"short, simple URLs that refer to Companies, Contacts, Calendars, etc.","colspan:2;"], // F73 + + [5,73,"Administrative workflow with attendance and time management","colspan:2;"], // F74 + + [5,74,"support for other webservers like lighttpd","colspan:2;"], // F75 + + [5,75,"ERP Module","colspan:2;"], // F76 + + [5,76,"HR management module - leave management/application/approvals, employee records, etc.","colspan:2;"], // F77 + + [5,77,"Bookmark syncing with Firefox","colspan:2;"], // F78 + + [5,78,"iCalendar server via WebDAV for writing, CalDAV support","colspan:2;"], // F79 + + [5,79,"Drag and drop of e-mails and files","colspan:2;"], // F80 + + [4,81,"Rejected",""], // E82 + [5,81,"baum (not clear)","colspan:2;"], // F82 + + [5,82,"SLA integration (not enough details)","colspan:2;"], // F83 + + [5,83,"netmeeting portal (not enough details)","colspan:2;"], // F84 + + [5,84,"Voip and messaging (not enough details)","colspan:2;"], // F85 + + [5,85,"A \"nicer\" Frontend (not enough details)","colspan:2;"], // F86 + + [5,86,"Forms Designer (not clear)","colspan:2;"], // F87 + + [5,87,"Real integration of SyncML into Simple Groupware without Funambol Sync Server (why ?)","colspan:2;"], // F88 + + [5,88,"Document management with tagging that is similar to del.icio.us (documents <> bookmarks)\\n","colspan:2;"], // F89 + + [5,89,"a comprehensive implementation and customization guide (not enough details)","colspan:2;"], // F90 + + [5,90,"Visually setup paths in the modules mount point, being able to setup URL's visually, instead of having to type them in (not clear)","colspan:2;"], // F91 + + [5,91,"There is no mention on the website if and this application's API can be used to integrate into other applications (invalid)","colspan:2;"], // F92 + + [5,92,"A reports/Form module/Wrapper:\\nI know sometimes creating a report or a form can be very different from person to person, so that's the reason why having wrapper module would help. I create php forms and reports using the PEAR packages I use the XOOPS CMS to provide users with the links to the report. I also use a XOOPS module to wrap the content withing the XOOPS CMS. (not clear)","colspan:2;"], // F93 +]; Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/index_offline.html =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/index_offline.html (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/index_offline.html (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,98 @@ + + + +Simple Spreadsheet + + + + + +
    + +
    +
    +
    +Simple Spreadsheet
    +English - +Deutsch - +Italiano - +Espa�ol - +Nederlands - +Fran�ais - +Polski +  +
    +
    +
    + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/keycodes.html =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/keycodes.html (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/keycodes.html (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,84 @@ + + + +Key Events + + + + + + + + + + + + + + + + + + +
    onkeydownonkeyuponkeypress
    keycode   
    charCode   
    which   
    + + + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/manual.html =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/manual.html (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/manual.html (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,315 @@ + + +Simple Spreadsheet Function Reference + + +

    Simple Spreadsheet Function Reference

    +
    +
    +Simple Spreadsheet Online Manual
    +
    +
    +View modes
    +
    +Values: shows all calculated values on the screen (default)
    +  Auto-Calculate: All values are automatically calculated
    +  Manual: Disables automatic recalculation (gives better performance)
    +  Refresh: Recalculates all values if Auto-Refresh is disabled
    +
    +Formulas: shows all formulas on the screen
    +Styles: shows all styles on the screen
    +
    +Cell References
    +
    += A1      // gives A1
    += A2:A4   // gives array of A2,A3,A4
    += [A2,A4] // gives array of A2,A4
    += a1      // does not give A1
    +
    +Aggregate Functions
    +
    += sum(A2:A4) // gives A2+A3+A4
    += sum(A2:B3) // gives A2+A3+B2+B3
    += avg(2,3,4) // gives (2+3+4)/3 = 3
    += min(2,3,4) // gives 2
    += max(2,3,4) // gives 4
    += count(A2:A4) // gives 3
    +
    +Math Functions
    +
    +Math.abs(a)     // the absolute value of a
    +Math.acos(a)    // arc cosine of a
    +Math.asin(a)    // arc sine of a
    +Math.atan(a)    // arc tangent of a
    +Math.atan2(a,b) // arc tangent of a/b
    +Math.ceil(a)    // integer closest to a and not less than a
    +Math.cos(a)     // cosine of a
    +Math.exp(a)     // exponent of a
    +Math.floor(a)   // integer closest to and not greater than a
    +Math.log(a)     // log of a base e
    +Math.max(a,b)   // the maximum of a and b
    +Math.min(a,b)   // the minimum of a and b
    +Math.pow(a,b)   // a to the power b
    +Math.random()   // pseudorandom number in the range 0 to 1
    +Math.round(a)   // integer closest to a 
    +Math.sin(a)     // sine of a
    +Math.sqrt(a)    // square root of a
    +Math.tan(a)     // tangent of a
    +
    +Numbers
    +
    +conventional decimal numbers:        5, 137, 1.3
    +decimal numbers in exponential form: 6.67e-11, -1.127e20
    +
    +octal numbers, for example:          01234, -077, 0312
    +(Positive octal numbers must begin with 0 (zero) and negative octal numbers must begin with -0.)
    +
    +hexadecimal numbers, for example:    0xFF -0xCCFF 0xabcdef
    +(Positive hexadecimals must begin with 0x and negative hexadecimals must begin with -0x.)
    +	  
    +
    +Constants
    +
    +Math.PI      // pi = 3.14159265...
    +Math.E       // e = 2.71828182...
    +Math.LOG2E   // log of e base 2
    +Math.LOG10E  // log of e base 10
    +Math.LN2     // log of 2 base e
    +Math.LN10    // log of 10 base e
    +Math.SQRT2   // square root of 2
    +Math.SQRT1_2 // square root of 1/2
    +
    +Base conversion
    +
    += (32767).toString(16)  // this gives "7fff"
    += (255).toString(8)     // this gives "377"
    += (1295).toString(36)   // this gives "zz"
    += (127).toString(2)     // this gives "1111111"
    +
    +Arithmetic operations
    +
    +Unary operations have one argument (in the following examples, the argument is a):
    +
    +-a   // change the sign of a
    +~a   // bitwise NOT a
    +++a  // add 1 to a (before using a)
    +a++  // add 1 to a (after using a)
    +--a  // subtract 1 from a (before using a)
    +a--  // subtract 1 from a (after using a)
    +
    +Binary operations operations have two arguments (in the following examples, the arguments are a and b):
    +
    +a * b    // multiply a by b
    +a / b    // divide a by b
    +a % b    // find the remainder of division of a by b
    +a + b    // add a and b
    +a - b    // subtract b from a
    +a & b    // bitwise a AND b
    +a | b    // bitwise a OR b
    +a ^ b    // bitwise a XOR b
    +
    +Shifts are the following operations:
    +
    +a << b   // shift a by b bits to the left
    +         // (padding with zeros)
    +a >> b   // shift a by b bits to the right
    +         // (copying the sign bit)
    +a >>> b  // shift a by b bits to the right 
    +         // (padding with zeros)
    +
    +		 
    +Random Numbers
    +
    += Math.random()  // gives random, 0 to 1 
    +
    +If you need random floating-point numbers in the range from A to B, use this code:
    +
    += A + (B-A)*Math.random()  // gives random, from A to B 
    +
    +Rounding
    +
    +Math.round(10*X)/10;     // round to tenths
    +Math.round(100*X)/100;   // round to hundredths
    +Math.round(1000*X)/1000; // round to thousandths
    +
    +Substrings
    +
    +string.substring(start,end)
    +
    +Here
    +string 	is the string from which you want to extract a substring.
    +start 	is the number specifying the position of the character at which the substring begins. (The character at start itself will be included in the substring.)
    +end 	is the number specifying the position of the character at which the substring ends. (The character at end will not be included in the substring.)
    +
    +Note that the first character in the string corresponds to position 0, and the last character to position string.length-1.
    +
    +Examples:
    +
    +'Hello'.substring(0,2)  // 'He'
    +'Hello'.substring(0,4)  // 'Hell'
    +
    +String operations
    +
    +string.toUpperCase();          // Converts the string to upper case.
    +string.toLowerCase();          // Converts the string to lower case.
    +string.indexOf("B");           // Returns the index of the given character in a string.
    +string.lastIndexOf("B");       // Returns the last index of a given character in a string.
    +string.split(",");             // Splits a string into an array of substrings.
    +string.charAt(1);              // Returns the character at a given index.
    +string.charCodeAt(1);          // Converts the char at the given index to an ASCII value.
    +String.fromCharCode(65,66,67); // Return a string from a number of Unicode character values.
    +
    +string.replace(new RegExp("A","gi"),"B");
    +// Can be used to replace a string given as a regular expression with another string.
    +
    +string.match("A");
    +// Can be used to match a regular expression against a string. It returns an array of the matches.
    +
    +string.search(/^[a-z]*@[a-z]*$/i);
    +// Can be used to with a regular expression to search for a special format.
    +
    +String Quoting
    +
    += 'I\'m not a JavaScript hacker.'
    +
    +Conditions
    +
    += D2==10?"yes it is 10!":"other case"
    +		 
    +
    +Graph functions
    +
    +=graph(graph type,graph title,values y-axis,labels x-axis,caption x-axis,caption y-axis,width,height)
    +
    +The graph function creates an image with one graph inside.
    +
    +Graph types: bar, pie, line, linesteps, scatter
    +Optional: caption x-axis, caption y-axis, width, height
    +
    +Example: =graph('bar',E11,F12:F15,E12:E15,'quarter','value')
    +  
    +  
    +=graph2(graph type,graph title,values y-axis graph 1,values y-axis graph 2,labels x-axis,caption x-axis,caption y-axis,width,height)
    +
    +The graph2 function creates an image with two graphs inside.
    +
    +Graph2 types: bar, baraccumulate, line, linesteps
    +Optional: caption x-axis, caption y-axis, width, height
    +
    +Example: =graph2('bar','Bar graph (2 bars)',F12:F15,G12:G15,E12:E15)
    +
    +Multiline editing
    +
    +Use "\n" in the formula to force a line-break and open the multiline editor
    +
    +HTML editing
    +
    +Use "html:" at the beginning of the formula to force the interpretation as HTML code.
    +Using "html:" as prefix automatically opens the HTML editor.
    +
    +Styles: Font decoration / font effects  (use the style field next to the formula)
    +
    +bold:          font-weight:bold;
    +italic:        font-style:italic;
    +underlined:    text-decoration:underline;
    +strikethrough: text-decoration:line-through;
    +bold italic:   font-weight:bold;
    +
    +font-size "120%":   font-size:120%;
    +font-size "18px": font-size:18px;
    +
    +font-family "Helvetica":      font-family:Helvetica;
    +font-family "Verdana":    font-family:Verdana;
    +font-family "sans-serif":  font-family:sans-serif;
    +font-family "Courier": font-family:Courier;
    +
    +font color red:   color:red;
    +font color blue:  color:blue;
    +font color green: color:green;
    +
    +background color yellow:      background-color:yellow;
    +background color red:         background-color:red;
    +background color light-green; background-color:lightgreen;
    +
    +Styles: Text alignment
    +
    +Text align left:  text-align:left;
    +Text centered:    text-align:center;
    +Text align right: text-align:right;
    +Text justified:   text-align:justify;
    +
    +Override automatic line-break: white-space:nowrap;
    +
    +Cell width "250px": width:250px;
    +Cell height "100px": height:250px;
    +
    +Styles: Data formats
    +
    +Currency Euro   (10 => 10 �): format:euro;
    +Currency Dollar (10 => $10):  format:dollar;
    +Percent value   (10 => 10%):  format:percent;
    +
    +Time format (14:11:12 => 2:11:12 pm): format:time;
    +Date format (1.2.2004 => 2/1/2004): format:date;
    +
    +Full date format (02/26/2006 => Sunday, February 26 2006): format:datefull;
    +Datetime format (03/27/2007 9:11:12 => 3/27/2007 9:11:12 am): format:datetime;
    +Full datetime format (03/27/2007 9:11:12 => Tuesday, March 27 2007, 9:11:12 am): format:datefulltime;
    +
    +Styles: Cell protection
    +
    +Lock the value of a cell: readonly:true;
    +
    +Keyboard access keys [Alt+x or Alt+Shift+x]
    +
    +* g = switch to goto field
    +* x = cut cell
    +* c = copy cell
    +* v = paste cell
    +* e = empty cell
    +* p = print
    +
    +* n = create a new spreadsheet
    +* l = load a spreadsheet
    +* s = save spreadsheet (if run inside Simple Groupware)
    +* q = close Simple Spreadsheet (if run inside Simple Groupware)
    +* m = change auto-refresh
    +* r = refresh (if auto-refresh is off)
    +* h = function reference
    +
    +* 1 = values view
    +* 2 = formulas view
    +* 3 = styles view
    +
    +Keyboard shortcuts
    +
    +* enter / start typing = edit cell
    +* ctrl+x or shift+del = cut cell
    +* ctrl+c or ctrl+ins = copy cell
    +* ctrl+v or shift+ins = paste cell
    +* del = empty cell
    +* cursor up = go up
    +* cursor down = go down
    +* cursor left = go left
    +* cursor right = go right
    +* home = go to first cell in row or page left/up if already in first cell
    +* end = go to last cell in row or page right if already in last cell
    +* page up = go 10 rows down
    +* page down = go 10 rows up
    +
    +// TODO2 dates / date functions
    +// http://www.merlyn.demon.co.uk/js-dates.htm
    +// http://www.tizag.com/javascriptT/javascriptdate.php
    +
    +Sources:
    +- JavaScripter.net. Copyright � 1999-2000, Alexei Kourbatov
    +
    + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/print.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/print.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/print.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,38 @@ +/* +// GPL +*/ + +body,table,div { + font-family: Arial, Helvetica, Verdana, sans-serif; + font-size:13px; + font-weight:normal; +} +body,input,textarea,div,table { + margin:0px; + padding:0px; +} +#table { + border-left:1px solid #666666; + border-top:1px solid #666666; +} +th { + color:#666666; + background-color:#EFEFEF; + border-right:1px solid #666666; + border-bottom:1px solid #666666; +} +th div { + padding:1px; + font-size:11px; + font-weight:normal; +} +td { + border-right:1px solid #CCCCCC; + border-bottom:1px solid #CCCCCC; + height:18px; + padding-left:4px; + padding-right:4px; +} +#spacer { + display:none; +} \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/print_noline.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/print_noline.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/print_noline.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,37 @@ +/* +// GPL +*/ + +body,table,div { + font-family: Arial, Helvetica, Verdana, sans-serif; + font-size:13px; + font-weight:normal; +} +body,input,textarea,div,table { + margin:0px; + padding:0px; +} +#table { + border-left:1px solid #666666; + border-top:1px solid #666666; +} +th { + color:#666666; + background-color:#EFEFEF; + border-right:1px solid #666666; + border-bottom:1px solid #666666; +} +th div { + padding:1px; + font-size:11px; + font-weight:normal; +} +td { + border:0px; + height:18px; + padding-left:4px; + padding-right:4px; +} +#spacer { + display:none; +} \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/spreadsheet.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,1601 @@ +/**************************************************************************\ + * Simple Groupware 0.410 * + * http://www.simple-groupware.de * + * Copyright (C) 2002-2008 by Thomas Bley * + * ------------------------------------------------------------------------ * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License Version 2 * + * as published by the Free Software Foundation; only version 2 * + * of the License, no later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * Version 2 along with this program; if not, write to the Free Software * + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * + * MA 02111-1307, USA. * + \**************************************************************************/ + +// Translations implemented by Sophie Lee. + +var agent = navigator.userAgent.toLowerCase(); +if (agent.indexOf("konqueror")!=-1) agent = "konqueror"; + else if (agent.indexOf("safari")!=-1) agent = "safari"; + else if (agent.indexOf("opera")!=-1) agent = "opera"; + else if (agent.indexOf("firefox")!=-1) agent = "firefox"; + else if (agent.indexOf("msie")!=-1) agent = "msie"; + +window.onerror=handleErr; + +if (agent=="msie" || agent=="safari") { // cursor keys only in keydown + document.onkeydown = keypress; +} else document.onkeypress=keypress; + +var init_data = ""; +var auto_recalc = true; +var cols = 7; +var rows = 17; +var row0 = 0; +var col0 = 0; +var col_min_width = "87px"; + +/* format: cells[row][column][type] +type: +0 = formula +1 = styling +2 = cell description +3 = current value +*/ +var cells = new Array(); +var marks = new Array(); +var view = "values"; +var currRow = 0; +var currCol = 0; +var multiRange = new Array(); +var clipboard_row = 0; +var clipboard_col = 0; +var clipboard_range = new Array(); +var clipboard_mode = ""; +var active = ""; +var showColumnGroups = false; +var allowPaging = true; +var registerFuncs = ""; +var isMouseDown = 0; +var isShiftDown = 0; +var sgs_folder = 0; +var sgs_view = ""; +var saveMethod = "save('js')"; +var closeMethod = ""; +var isWriteable = true; +var tab = String.fromCharCode(9); +var printstyle = "print.css"; + +function trans(key) { + if (strings[key]) return strings[key]; else return "["+key+"]"; +} + +function keypress(event) { + if (!getObj("value") || active=="code") return true; + var event = (event)?event:window.event; + // TODO2 test safari change dimensions / positions + var keyCode = getmykey(event); + var ret = true; + if (active=="position") { + if (keyCode==13) { + gotoCell(getObj("field").value); + active="content"; + ret = false; + } + return ret; + } + if (active=="dimensions") { + if (keyCode==13) { + rows=parseInt(getObj("rows").value); + cols=parseInt(getObj("cols").value); + active="content"; + display(); + ret = false; + } + return ret; + } + if (getObj("styling").disabled) { + getObj("focus").focus(); // avoid window scrolling + active = "content"; + var shift = event.shiftKey; + var alt = event.altKey; + var ctrl = event.ctrlKey; + + if ((ctrl && (keyCode==88 || keyCode==120)) || (shift && keyCode==46)) { // ctrl-x = cut || shift-del = cut + cutcopy("cut","#FFDDDD"); + ret=false; + } else if ((ctrl && (keyCode==67 || keyCode==99)) || ctrl && keyCode==45) { // ctrl-c = copy || ctrl-ins = copy + cutcopy("copy","#DDDDFF"); + ret=false; + } else if (((ctrl && (keyCode==86 || keyCode==118)) || (shift && keyCode==45)) && clipboard_mode!="") { // ctrl-v = paste || shift-ins = paste + paste(); + ret=false; + } + + if (shift && !isShiftDown) { + highlightRange(multiRange,"cell"); + multiRange = new Array(currRow,currCol,currRow,currCol); + isShiftDown = 1; + } else if (!alt && !ctrl && !shift && multiRange.length>0 && keyCode!=46) { + highlightRange(multiRange,"cell"); + multiRange = new Array(); + isShiftDown=0; + isMouseDown=0; + } + + if (!alt && !ctrl && keyCode!=0) { + if (keyCode==33) { // page up + if (currRow-10 <= row0 && currRow > 10) { + row0 -= rows; + display(); + mouseoverCell(currRow-10,currCol); + scrollDown(); + } else { + mouseoverCell(currRow>=10?currRow-10:0,currCol); + scrollUp(); + } + ret=false; + } else if (keyCode==34) { // page down + if (currRow+10 >= row0+rows) { + row0 += rows; + display(); + mouseoverCell(currRow+10,currCol); + scrollUp(); + } else { + mouseoverCell(currRow+10,currCol); + scrollDown(); + } + ret=false; + } else if (keyCode==36) { // home + if (currCol!=col0) { + mouseoverCell(currRow,col0); + } else if (currCol+1 >= cols) { + col0 -= cols; + display(); + mouseoverCell(currRow,currCol-cols); + } else if (currRow > row0) { + mouseoverCell(row0,currCol); + } else if (currRow+1 > rows) { + row0 -= rows; + display(); + mouseoverCell(currRow-rows,currCol); + } + scrollLeft(); + ret=false; + } else if (keyCode==35) { // end + if (currCol!=(col0+cols-1)) { + mouseoverCell(currRow,col0+cols-1); + } else { + col0 += cols; + display(); + mouseoverCell(currRow,currCol+cols); + } + scrollRight(); + ret=false; + } else if (keyCode==39 || keyCode==9) { // right + goRight(); + ret=false; + } else if (keyCode==40) { // down + goDown(); + ret=false; + } else if (keyCode==38 && currRow>-2) { // up + goUp(); + ret=false; + } else if (keyCode==37 && currCol>-1) { // left + goLeft(); + ret=false; + } else if (!shift && keyCode==46 && isWriteable && confirm(trans("Really empty cell(s) ?"))) { + removeSelectedCell(); + ret=false; + } else if ((keyCode<33 || keyCode>40) && keyCode!=46 && keyCode!=45 && + keyCode!=16 && keyCode!=17 && keyCode!=18) { + editCell(currRow,currCol,keyCode); + if (keyCode==13) ret=false; + } + } + if (isShiftDown) { + highlightRange(multiRange,"cell"); + multiRange[2] = currRow; + multiRange[3] = currCol; + highlightRange(multiRange,"cell_highlight_over"); + } + } else { + if (keyCode==13) { + saveCell(); + ret=false; + } else if (keyCode==27) { + cancelCell(); + ret=false; + } + } + return ret; +} + +function goLeft() { + if (currCol <= col0 && currCol > 0) { + col0 -= cols; + display(); + mouseoverCell(currRow,currCol-1); + scrollRight(); + } else { + mouseoverCell(currRow,currCol-1); + scrollLeft(); + } +} + +function goUp() { + if (currRow <= row0 && currRow > 0) { + row0 -= rows; + display(); + mouseoverCell(currRow-1,currCol); + scrollDown(); + } else { + mouseoverCell(currRow-1,currCol); + scrollUp(); + } +} + +function goRight() { + if (currCol+1 >= col0+cols) { + col0 += cols; + display(); + mouseoverCell(currRow,currCol+1); + scrollLeft(); + } else { + mouseoverCell(currRow,currCol+1); + scrollRight(); + } +} + +function goDown() { + if (currRow+1 >= row0+rows) { + row0 += rows; + display(); + mouseoverCell(currRow+1,currCol); + scrollUp(); + } else { + mouseoverCell(currRow+1,currCol); + scrollDown(); + } +} + +function display() { + marks = new Array(); + isMouseDown=0; + var scrollX = 0; // keep scrolling states + var scrollY = 0; + if (getObj("content")) { + scrollX = getObj("content").scrollLeft; + scrollY = getObj("content").scrollTop; + } + var out = "
    "; + out += ""; + out += " "; + if (isWriteable) { + out += ""+trans("New")+" - "; + } + if (top.window!=window && closeMethod!="") out += ""+trans("Close")+" - "; + if (allowPaging) { + if (col0-cols>=0 || row0-rows>=0) { + out += ""+trans("Home")+" - "; + } + if (col0-cols>=0) { + out += ""+trans("<<")+" - "; + } else out += "<< - "; + out += ""+trans(">>")+" - "; + if (row0-rows>=0) { + out += ""+trans("Up")+" - "; + } else out += trans("Up")+" - "; + out += ""+trans("Down")+" - "; + out += ""; + out += " x "; + out += " - "; + } + out += " - "; + out += ""; + out += ""; + out += " "; + out += " "; + out += ""; + if (isWriteable) { + out += "   "; + out += " - "; + } else out += "  "; + if (view=="values") { + if (isWriteable) { + out += ""+(auto_recalc?trans("Auto")+"-"+trans("Refresh"):trans("Manual"))+""; + if (!auto_recalc) out += " "+trans("Refresh")+""; + } + out += " - "+trans("Values")+" - "; + } else if (view=="formulas") { + out += ""+trans("Formulas")+" - "; + } else { + out += ""+trans("Styles")+" - "; + } + out += ""; + out += ""; + out += ""; + out += ""+trans("Help")+" - "; + + // You are not allowed to remove or alter the About button and/or the copyright. + out += ""+trans("About")+" "; + out += "
    "; + var style = ""; + if (agent=="msie") style = "style='height:expression((document.body.clientHeight-40)+\"px\");'"; + out += "
    "; + out += ""; + if (showColumnGroups) { + out += ""; + for (var i=col0; i
    "+htmlEscape(colGroupTitle,true)+"
    "; + } else if ((!marks[-2] || !marks[-2][i])) { + out += "
    "; + } + } + } + out += ""; + out += ""; + for (var i=col0; i
    "+(colTitle?htmlEscape(colTitle,true)+" - ":"")+buildColName(i)+"
    "; + } + out += "
    "; + var lastIndex = -1; + var noRowTtitle = false; + for (var row=row0; row
    "+(rowTitle?htmlEscape(rowTitle,true)+"
    ":"")+(row+1)+"
    "; + for (var col=col0; col
    "+htmlEscape(value,true)+"
    "; + } + } else if (view=="formulas") { + out += "
    "; + } else { + out += ""; + } + } + out += ""; + } + out += ""; + for (var i=col0; i"; + out += ""; + out += "
    "+htmlEscape(showCell(-2,-1,0),true)+" 
    "+htmlEscape(showCell(-1,-1,0),true)+"
    "+htmlEscape(getCells(row,col,0),true)+""+htmlEscape(getCells(row,col,1),true)+"
    "; + out += ""; + out += "
    "; + getObj("data").innerHTML = out; + getObj("content").scrollLeft = scrollX; + getObj("content").scrollTop = scrollY; + + mouseoverCell(currRow,currCol); + if (clipboard_mode!="") { + var color = "#DDDDFF" + if (clipboard_mode=="cut") color = "#FFDDDD"; + if (clipboard_range.length>0) { + highlightRange(clipboard_range,"",color); + } else { + var obj = resolveCell(clipboard_row,clipboard_col); + if (obj) obj.style.backgroundColor = color; + } + } + getObj("focus").focus(); +} + +function previewValue() { + var value = getObj("value").value; + if (!getObj("value").disabled && + (value.length>25 || value.indexOf("\\n")!=-1 || value.indexOf("html:")==0)) { + getObj("multiline").style.display = "inline"; + //getObj("content").style.overflow = "hidden"; // needed for invisible cursor + if (value.indexOf("html:")==0 && getObj("multiline").src.indexOf("tinymce/index.html")==-1) { + getObj("multiline").src = "tinymce/index.html"; + } else if (value.indexOf("html:")!=0 && getObj("multiline").src.indexOf("editor.htm")==-1) { + getObj("multiline").src = "editor.htm"; + } else if (getObj("multiline").contentWindow.update) { + getObj("multiline").contentWindow.update(); + } + } + previewField(); +} +function previewField() { + var obj2 = resolveCell(currRow,currCol); + value = previewCell(getObj("value").value,0); + value = formatValue(value,getObj("styling").value); + var style = htmlEscape(formatStyle(getObj("styling").value,value),false); + if (currRow == -1) { + if (value!="") value += " - "; + value += buildColName(currCol); + } else if (currCol == -1) { + if (value!="") value += "\\n"; + value += currRow+1; + } + value = htmlEscape(value,true); + var val = "
    "+value+"
    "; + obj2.innerHTML = val; + if (val.indexOf(" col_num2 || row > row2) return new Array("error"); + for (var i_row=row; i_row<=row2; i_row++) { + for (var i_col=col_num; i_col<=col_num2; i_col++) { + var val_data = showCell(i_row-1,i_col,calls+1); + var val = parseFloat(val_data); + if (val == val_data) result[result.length] = val; else result[result.length] = val_data; + } + } + return result; +} +function getCellStyle(row,col,style) { + var span = getCells(row,col,1); + var re = new RegExp(style+":(.*?);","i"); + if (p = re.exec(span)) span = parseInt(p[1]); else span = 0; + return span; +} +function setCells(row,col,item,value) { + if (!cells[row]) cells[row] = new Array(); + if (!cells[row][col]) cells[row][col] = new Array("","","",""); + if (cells[row][col][item]!=value) { + cells[row][col][item] = value; + return true; + } else return false; +} +function setCellsR(row,col,item,value) { + var arr = resolveCellArray(row,col); + return setCells(arr[0],arr[1],item,value); +} + +function loadScriptFile(location){ + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = location; + document.getElementsByTagName("head").item(0).appendChild(script); +} +function loadStyleFile(location){ + var script = document.createElement("link"); + script.type = "text/css"; + script.rel = "stylesheet"; + script.href = location; + document.getElementsByTagName("head").item(0).appendChild(script); +} + +function load(code) { + if (code.indexOf("dbCells")==-1) { + if (code.indexOf(tab)==-1) cells = loadCSV(code); else cells = loadTSV(code); + if (!cells) return; + } else { + try { eval(code); } + catch (err) { + alert(trans("Error loading data:")+" "+err); + return; + } + window.registerFuncs = registerFuncs; + if (registerFuncs) { + for (var i=0; i0) out = out.substring(0,out.length-2)+"\n];\n"; else out += "];\n"; + if (registerFuncs) { + out += "\nvar registerFuncs = ["; + for (var i=0; i|<\/table>)/g,"$1\n"); + var obj = window.open("","print","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600"); + obj.document.write("\n"); + obj.document.write("\n"+out+"\n"); + obj.document.close(); + obj.window.print(); +} + +function insertRow() { + for (var i=cells.length-1; i>=currRow; i--) { + if (cells[i]) { + for (var i2=0; i20) { + var cRange = getMultiRange(multiRange); + row0 = cRange[0]; + row1 = cRange[2]; + } + for (var row=row0; row<=row1; row++) { + for (var i=row0; i=currCol; i2--) { + if (!cells[i][i2]) continue; + // TODO2 change formulas ? + cells[i][i2+1] = cells[i][i2]; + cells[i][i2] = ""; + } + } + } + display(); +} +function deleteColumn() { + var col0 = currCol; + var col1 = currCol; + if (multiRange.length>0) { + var cRange = getMultiRange(multiRange); + col0 = cRange[1]; + col1 = cRange[3]; + } + for (var col=col0; col<=col1; col++) { + for (var i=0; i (posY-100)) { + getObj("content").scrollTop = posY-100; + } + + var posX = findPosX(obj); + if (posX < getObj("content").scrollLeft+200 && getObj("content").scrollLeft > (posX-150)) { + getObj("content").scrollLeft = posX-150; + } +} +function scrollDown() { + var obj = resolveCell(currRow,currCol); + var posY = findPosY(obj); + var height = return_height(); + if (obj && (posY+obj.offsetHeight+100) > height) { + var newHeight = posY+obj.offsetHeight+100-height; + if (newHeight > getObj("content").scrollTop) getObj("content").scrollTop = newHeight; + } + + var posX = findPosX(obj); + var width = return_width(); + if (obj && (posX+obj.offsetWidth+100) > width) { + var newWidth = posX+obj.offsetWidth+100-width; + if (newWidth > getObj("content").scrollLeft) getObj("content").scrollLeft = newWidth; + } +} +function scrollLeft() { + scrollUp(); +} +function scrollRight() { + scrollDown(); +} + +function removeSelectedCell() { + if (multiRange.length>0) { + var cRange = getMultiRange(multiRange); + for (var row=cRange[0]; row<=cRange[2]; row++) { + for (var col=cRange[1]; col<=cRange[3]; col++) { + if (isWritable(getCellsR(row,col,1))) { + setCellsR(row,col,0,""); + setCellsR(row,col,1,""); + if (!auto_recalc) { + var obj2 = resolveCell(row,col); + obj2.innerHTML = "
     
    "; + } } } } } else { + removeCell(currRow,currCol); + if (!auto_recalc && isWritable(getCellsR(currRow,currCol,1))) { + var obj2 = resolveCell(currRow,currCol); + obj2.innerHTML = "
     
    "; + } + } + if (auto_recalc) display(); +} +function cutcopy(mode,color) { + if (!isWriteable) return; + if (clipboard_range.length>0) { + highlightRange(clipboard_range,"",""); + } else { + if (clipboard_mode) { + var obj = resolveCell(clipboard_row,clipboard_col); + if (obj) obj.style.backgroundColor = ""; + } + } + clipboard_mode = mode; + clipboard_row = currRow; + clipboard_col = currCol; + clipboard_range = getMultiRange(multiRange); + if (multiRange.length>0) { + highlightRange(multiRange,"",color); + } else { + var obj = resolveCell(currRow,currCol); + if (obj) obj.style.backgroundColor = color; + } +} +function paste() { + if (clipboard_range.length>0) { + var sRange = getMultiRange(clipboard_range); + var cRange = new Array(currRow,currCol,currRow+sRange[2]-sRange[0],currCol+sRange[3]-sRange[1]); + if (multiRange.length>0 && (multiRange[0]!=multiRange[2] || multiRange[1]!=multiRange[3])) { + cRange = getMultiRange(multiRange); + } + var rOffset = 0; + var cOffset = 0; + if ((cRange[0] >= sRange[0] && cRange[1] >= sRange[1]) || (cRange[0] > sRange[0] && cRange[1] < sRange[1])) { + for (var row=cRange[2]; row>=cRange[0]; row--) { + rOffset = (row - cRange[0]) % (sRange[2]-sRange[0]+1); + for (var col=cRange[3]; col>=cRange[1]; col--) { + cOffset = (col - cRange[1]) % (sRange[3]-sRange[1]+1); + copyCell(sRange[0] + rOffset, sRange[1] + cOffset, row, col); + var obj = resolveCell(sRange[0] + rOffset, sRange[1] + cOffset); + if (obj) obj.style.backgroundColor = ""; + } + } + } else { + for (var row=cRange[0]; row<=cRange[2]; row++) { + rOffset = (row - cRange[0]) % (sRange[2]-sRange[0]+1); + for (var col=cRange[1]; col<=cRange[3]; col++) { + cOffset = (col - cRange[1]) % (sRange[3]-sRange[1]+1); + copyCell(sRange[0] + rOffset, sRange[1] + cOffset, row, col); + var obj = resolveCell(sRange[0] + rOffset, sRange[1] + cOffset); + if (obj) obj.style.backgroundColor = ""; + } + } + } + if (clipboard_mode=="cut") { + for (var row=sRange[0]; row<=sRange[2]; row++) { + for (var col=sRange[1]; col<=sRange[3]; col++) { + if ((row < cRange[0] || row > cRange[2]) || + (col < cRange[1] || col > cRange[3])) removeCell(row,col); + } + } + clipboard_mode = ""; + } + } else { + if (multiRange.length>0 && (multiRange[0]!=multiRange[2] || multiRange[1]!=multiRange[3])) { + cRange = getMultiRange(multiRange); + for (var row=cRange[2]; row>=cRange[0]; row--) { + for (var col=cRange[3]; col>=cRange[1]; col--) { + copyCell(clipboard_row,clipboard_col,row,col); + } + } + if (clipboard_mode=="cut" && (clipboard_row < cRange[0] || clipboard_row > cRange[2] || + clipboard_col < cRange[1] || clipboard_col > cRange[3]) + ) { + removeCell(clipboard_row,clipboard_col); + } + } else { + copyCell(clipboard_row,clipboard_col,currRow,currCol); + if (clipboard_mode=="cut" && (clipboard_row!=currRow || clipboard_col!=currCol)) { + removeCell(clipboard_row,clipboard_col); + } + } + if (clipboard_mode=="cut") clipboard_mode = ""; + } + display(); +} +function sortNum(val) { + if (isNaN(val)) return val.charAt(0).toLowerCase().charCodeAt(0); + return parseFloat(val); +} +function sortCells(a,b) { + if (a[currCol] && b[currCol]) { + if (a[currCol][3]=="") return 1; + if (b[currCol][3]=="") return -1; + a = sortNum(a[currCol][3]); + b = sortNum(b[currCol][3]); + return a-b; + } + return (a[currCol]?1:-1); +} +function sort(asc) { + if (multiRange.length>0) { + var cRange = getMultiRange(multiRange); + var cCells = new Array(); + for (var row=cRange[0]; row<=cRange[2]; row++) { + for (var col=cRange[1]; col<=cRange[3]; col++) { + if (!cCells[row]) cCells[row] = new Array(); + if (cells[row] && cells[row][col]) cCells[row][col] = cells[row][col]; + } + } + if (asc) cCells = cCells.sort(sortCells); else cCells = cCells.sort(sortCells).reverse(); + for (var row=cRange[0]; row<=cRange[2]; row++) { + for (var col=cRange[1]; col<=cRange[3]; col++) { + if (!cells[row]) cells[row] = new Array(); + cells[row][col] = cCells[row][col]; + } + } + } else { + if (asc) cells = cells.sort(sortCells); else cells = cells.sort(sortCells).reverse(); + } + display(); +} + +function buildStatus(row,col) { + var status = ""; + var colTitle = getCellsR(-1,col,0); + var colGroupTitle = getCellsR(-2,col,0); + var cellTitle = getCellsR(row,col,2); + if (cellTitle && row != -1) status += cellTitle+" - "; + if (colTitle) { + var colTitleLong = getCellsR(-1,col,2); + if (colGroupTitle) status += colGroupTitle+": "; + status += (colTitleLong?colTitleLong:colTitle)+" - "; + } else if (colGroupTitle) { + status += colGroupTitle+" - "; + } + var rowTitle = getCellsR(row,-1,0); + if (rowTitle) { + var rowTitleLong = getCellsR(row,-1,2); + status += (rowTitleLong?rowTitleLong:rowTitle)+" - "; + } + getObj("status").innerHTML = status+buildColName(col)+(row+1); + + if (isMouseDown) { + markCell(row,col); + highlightRange(multiRange,"cell"); + multiRange[2] = row; + multiRange[3] = col; + highlightRange(multiRange,"cell_highlight_over"); + } +} +function highlightRange(multiRange,classname,att) { + if (multiRange.length==0) return false; + var cRange = getMultiRange(multiRange); + for (var row=cRange[0]; row<=cRange[2]; row++) { + for (var col=cRange[1]; col<=cRange[3]; col++) { + obj = resolveCell(row,col); + if (obj && classname) obj.className = classname; + else if (!classname && obj) obj.style.backgroundColor = att; + } + } +} +function getMultiRange(multiRange) { + if (multiRange.length==0) return new Array(); + var row1 = multiRange[0]>multiRange[2]?multiRange[2]:multiRange[0]; + var row2 = multiRange[0]>multiRange[2]?multiRange[0]:multiRange[2]; + var col1 = multiRange[1]>multiRange[3]?multiRange[3]:multiRange[1]; + var col2 = multiRange[1]>multiRange[3]?multiRange[1]:multiRange[3]; + return new Array(row1,col1,row2,col2); +} +function mousedown(row,col) { + if (getObj("styling").disabled) { + document.onmousedown=new Function("return false;"); + document.onselectstart=new Function("return false;"); + isMouseDown=1; + highlightRange(multiRange,"cell"); + multiRange = new Array(row,col,row,col); + highlightRange(multiRange,"cell_highlight_over"); + } +} +function mouseup() { + if (getObj("styling").disabled) { + document.onmousedown=""; + document.onselectstart=""; + isMouseDown=0; + } +} +function markCell(row,col) { + highlightCell(row,col,"cell_highlight_over"); + highlightCellHeader(row,col); + currRow = row; + currCol = col; + getObj("value").value = getCellsR(row,col,0); + getObj("styling").value = getCellsR(row,col,1); + getObj("field").value = buildColName(col)+(row+1); +} +function mouseoverCell(row,col) { + if (getObj("styling").disabled) { + if (row==currRow && col==currCol && getObj("field").value) { + editCell(row,col,0); + } else { + markCell(row,col); + buildStatus(row,col); + } + } else if (!getObj("value").disabled) { + var obj = getObj("value"); + var ins = buildColName(col)+(row+1); + if (obj.selectionStart) { + var tmp = obj.selectionStart; + obj.value = obj.value.substring(0,obj.selectionStart)+ins+obj.value.substring(obj.selectionStart); + obj.selectionStart = tmp+ins.length; + obj.selectionEnd = tmp+ins.length; + obj.focus(); + } else if (document.selection) { + obj.value += ins; + } + previewValue(); + } +} +function highlightCell(row,col,className) { + var obj = resolveCell(currRow,currCol); + if (obj) obj.className = "cell"; + obj = resolveCell(row,col); + if (obj) obj.className = className; +} +function highlightCellHeader(row,col) { + var obj = resolveCell(-1,currCol); + if (obj) obj.className = "border"; + obj = resolveCell(currRow,-1); + if (obj) obj.className = "border"; + var sRow = -1; + if (row<-1) sRow = -2; + obj = resolveCell(sRow,col); + if (obj) obj.className = "border_highlight"; + if (row>=-1) { + obj = resolveCell(row,-1); + if (obj) obj.className = "border_highlight"; + } +} +function showCell(row,col,calls) { + if (typeof calls == "undefined") calls = 0; + value = getCells(row,col,0); + if (calls>25) { // avoid endless recursion + value = "undefined"; + } else if (value!="" && value.charAt(0)=="=") { + var cmd = ""; + var token = ""; + var openToken = ""; + var sequence = ""; + for (var i=0; i25) return "undefined"; // avoid endless recursion + var cmd = ""; + var token = ""; + var openToken = ""; + var sequence = ""; + for (var i=0; i0) return nvalue; else return value; +} +function gotoCell(pos) { + var re = new RegExp("([@A-Z]+)([0-9]+)","g"); + if (p = re.exec(pos)) { + var col = colstrToColnum(p[1]); + var row = p[2]-1; + if (col>=-1 && row>=0) { + getObj("focus").focus(); + if (col!=currCol || row!=currRow) { + if (col >= cols || row <= rows) { + col0 = col - (col % cols); + row0 = row - (row % rows); + display(); + } + mouseoverCell(row,col); + scroll(); + } + return; + } + } + alert(trans("Invalid cell.")); +} +function editCell(row,col,keyCode) { + active = "content"; + if (!isWriteable) return; + if (!getObj("styling").disabled) cancelCell(); + + highlightCell(row,col,"cell_highlight"); + highlightCellHeader(row,col); + currRow = row; + currCol = col; + + if (isWritable(getCellsR(row,col,1))) { + getObj("value").disabled = false; + } + getObj("styling").disabled = false; + getObj("save").disabled = false; + getObj("cancel").disabled = false; + if (getObj("cols")) getObj("cols").disabled = true; + if (getObj("rows")) getObj("rows").disabled = true; + getObj("field").disabled = true; + getObj("styling").value = getCellsR(row,col,1); + if (keyCode > 32 && agent=="firefox" && !getObj("value").disabled) { + getObj("value").value = String.fromCharCode(keyCode); + } else { + getObj("value").value = getCellsR(row,col,0); + } + if (!getObj("value").disabled) { + getObj("value").focus(); + } else { + getObj("styling").focus(); + } +} +function copyCell(row,col,cRow,cCol) { + if (!isWritable(getCellsR(cRow,cCol,1))) { + alert(trans("Cannot edit: cell is marked as readonly.")); + return; + } + if (row!=cRow || col!=cCol) { + setCells(cRow,cCol,0,getCellsR(row,col,0)); + setCells(cRow,cCol,1,getCellsR(row,col,1)); + } +} +function saveCell() { + var changed = setCellsR(currRow,currCol,0,getObj("value").value); + var changed2 = setCellsR(currRow,currCol,1,getObj("styling").value); + if (changed || changed2) { + if (!auto_recalc) { + disableEdit(); + previewValue(); + } else display(); + } else cancelCell(); +} +function disableEdit() { + getObj("value").blur(); + highlightCell(currRow,currCol,"cell_highlight_over"); + getObj("value").disabled = true; + getObj("styling").disabled = true; + getObj("save").disabled = true; + getObj("cancel").disabled = true; + + if (getObj("cols")) getObj("cols").disabled = false; + if (getObj("rows")) getObj("rows").disabled = false; + getObj("field").disabled = false; + + getObj("multiline").style.display = "none"; + getObj("content").style.overflow = "auto"; // needed for invisible cursor +} +function cancelCell() { + disableEdit(); + getObj("value").value = getCellsR(currRow,currCol,0); + getObj("styling").value = getCellsR(currRow,currCol,1); + previewValue(); +} +function removeCell(row,col) { + if (!isWritable(getCellsR(row,col,1))) { + alert(trans("Cannot edit: cell is marked as readonly.")); + return; + } + setCellsR(row,col,0,""); + setCellsR(row,col,1,""); +} +function resolveCell(row,col) { + var obj = getObj(row+"_"+col); + if (!obj && marks[row] && marks[row][col]) { + obj=getObj(marks[row][col][0]+"_"+marks[row][col][1]); + } + return obj; +} +function resolveCellArray(row,col) { + var obj = getObj(row+"_"+col); + if (!obj && marks[row] && marks[row][col]) { + var arr = marks[row][col]; + row = arr[0]; + col = arr[1]; + } + return new Array(row,col); +} + +function getSize(width) { + var myWidth = 0, myHeight = 0; + if (typeof(window.innerWidth) == 'number') { + myWidth = window.innerWidth; + myHeight = window.innerHeight; + } else if( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { + //IE 6+ in 'standards compliant mode' + myWidth = window.document.documentElement.clientWidth; + myHeight = window.document.documentElement.clientHeight; + } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { + // IE 4 compatible + myWidth = document.body.clientWidth; + myHeight = document.body.clientHeight; + } else if (self.screen.height && self.screen.width) { + myWidth = self.screen.width; + myHeight = self.screen.height; + } + if (width) return myWidth; else return myHeight; +} +function return_height() { + return getSize(0); +} +function return_width() { + return getSize(1); +} +function getObj(id) { + return document.getElementById(id); +} +function getmykey(event) { + if (typeof(event)=="undefined") return window.event.keyCode; + if (event.keyCode==0 && event.charCode!=0) return event.charCode; + if (event.keyCode==0) return event.which; + return event.keyCode; +} +function findPosY(obj) { + if (!obj) return 0; + var curtop = 0; + if (obj.offsetParent) { + while (obj.offsetParent) { + curtop += obj.offsetTop; + obj = obj.offsetParent; + } + } else if (obj.y) curtop += obj.y; + return curtop; +} +function findPosX(obj) { + if (!obj) return 0; + var curtop = 0; + if (obj.offsetParent) { + while (obj.offsetParent) { + curtop += obj.offsetLeft; + obj = obj.offsetParent; + } + } else if (obj.x) curtop += obj.x; + return curtop; +} +function strescape(str) { + return str.replace(/\\/g,"\\\\").replace(/"/g,"\\\""); +} +function htmlEscape(str,fill) { + if (str==null || str.length == 0) return (fill?" ":""); + str = new String(str); + if (str.indexOf("html:")==0) { + str = str.substring(5); + } else { + str = str.replace(//g,">"); // escape special characters + str = str.replace(/'/g,"'").replace(/"/g,"""); + str = str.replace(/([^\s$]+@[^\s$]+)/g,"$1"); // make emails appear as a link + str = str.replace(/img:((http[s]?:\/\/[^\s$]+\.(gif|jpg|png))|(graphs\.php\?.*?$))/g,""); // display images + str = str.replace(/(^|[^'])(http[s]?:\/\/[^\s$]+)/g,"$1$2"); // make http(s)://... appear as link + str = str.replace(/\\n/g,"
    "); + } + return str; +} +function handleErr(msg,url,l) { + alert(trans("There was an error on this page.")+"\n\n"+trans("Error:")+" "+msg+"\n"+trans("Url")+": "+url+"\n"+trans("Line:")+" "+l); + return true; +} + +// convert 26 to AA, 0 to A +function buildColName(num) { + var val = ""; + var result = ""; + if (num>=702) { + val = (Math.floor(num/676)-1)%26; + result += String.fromCharCode(val+65); + } + if (num>=26) { + val = (Math.floor(num/26)-1)%26; + result += String.fromCharCode(val+65); + } + result += String.fromCharCode(num%26+65); + return result; +} +//convert AA to 26 +function colstrToColnum(col_str) { + var col_num = 0; + for (var i=0; i0 && !isNaN((value+"").replace(/[$%,]/g,"").replace("€",""))) { + style += "; text-align:right; white-space:nowrap;"; + if (value<0 && style.indexOf("color:")==-1) style += "color:#FF0000;"; + } + return style.replace(/(format|readonly|colspan|rowspan):.*?;/ig,""); +} +function formatValue(value,style) { + if (style.indexOf("format:")!=-1) { + if (style.indexOf("format:euro")!=-1) value = formatNumber(value)+" €"; + else if (style.indexOf("format:dollar")!=-1) value = "$"+formatNumber(value); + else if (style.indexOf("format:percent")!=-1) value = (value*100).toFixed(2)+"%"; + else if (style.indexOf("format:number")!=-1) value = formatNumber(value); + else if (style.indexOf("format:datefulltime")!=-1) value = formatDateFullTime(value); + else if (style.indexOf("format:datetime")!=-1) value = formatDateTime(value); + else if (style.indexOf("format:datefull")!=-1) value = formatDateFull(value); + else if (style.indexOf("format:date")!=-1) value = formatDate(value); + else if (style.indexOf("format:time")!=-1) value = formatTime(value); + } else if (!isNaN(value) && value!=0) { + value = formatNumber(value).replace(/\.00$/,""); + } + return value; +} +function formatDate(value) { + if (isNaN(new Date(value).getHours())) { + value = value.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/,"$2/$1/$3"); + } + var dateObj = new Date(value); + return (dateObj.getMonth()+1)+"/"+dateObj.getDate()+"/"+dateObj.getFullYear(); +} +function formatDateFull(value) { + if (isNaN(new Date(value).getHours())) { + value = value.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/,"$2/$1/$3"); + } + var dateObj = new Date(value); + var months = new Array(trans("January"),trans("February"),trans("March"),trans("April"),trans("May"),trans("June"),trans("July"),trans("August"),trans("September"),trans("October"),trans("November"),trans("December")); + var days = new Array(trans("Sunday"),trans("Monday"),trans("Tuesday"),trans("Wednesday"),trans("Thursday"),trans("Friday"),trans("Sunday")); + return days[dateObj.getDay()]+", "+months[dateObj.getMonth()]+" "+dateObj.getDate()+" "+dateObj.getFullYear(); +} +function formatTime(value) { + if (isNaN(new Date(value).getHours())) { + value = value.replace(/\d+\.\d+\.\d+/,"$2/$1/$3"); + if (value.length<12) value = "01/01/01 "+value; + } + var dateObj = new Date(value); + hour = dateObj.getHours(); + var a = "am"; + if (hour > 11) a = "pm"; + if (hour > 12) hour -= 12; + if (hour == 0) hour = 12; + return hour+":"+dateObj.getMinutes()+":"+dateObj.getSeconds()+" "+a; +} +function formatDateTime(value) { + return formatDate(value)+" "+formatTime(value); +} +function formatDateFullTime(value) { + return formatDateFull(value)+", "+formatTime(value); +} +function formatNumber(val) { + var output = ""; + var sign = ""; + if (val < 0) { + sign = "-"; + val *= -1; + } + number = Math.floor((val-0).toFixed(2))+""; + if (number.length > 3) { + var mod = number.length%3; + var output = (mod==0?"":(number.substring(0,mod))); + for (i=0; i0) result = arr[0]; + for (var i=0; i0) result = arr[0]; + for (var i=0; iresult) result = arr[i]; + return result; +} +function avg(arr) { + var result = 0; + if (arr.length==0) return 0; + for (var i=0; i + + + Simple Spreadsheet + + + + + + + + + + +
    +
    + +
    + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/styles.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/styles.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/styles.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,144 @@ +/* +// GPL +*/ +body { + overflow:hidden; + background-color:#FFFFFF; +} +body,table,div { + font-family: Arial, Helvetica, Verdana, sans-serif; + font-size:13px; + font-weight:normal; +} +body,input,textarea,div,table { + margin:0px; + padding:0px; +} +iframe { + border:0px; +} +input { + height:20px; + border:1px solid #999999; + padding-left:2px; + padding-right:2px; +} + +#content { + position:absolute; + top:23px; + left:0px; + right:0px; + bottom:18px; + width:100%; + overflow:auto; +} +#multiline { + display:none; + position:absolute; + width:425px; + top:22px; + height:250px; +} +#tconsole { + position:absolute; + width:400px; + top:20px; + left:600px; + height:250px; +} +.table { + border-left:1px solid #666666; + border-top:1px solid #666666; +} +th { + color:#666666; + background-color:#EFEFEF; + border-right:1px solid #666666; + border-bottom:1px solid #666666; + padding-left:5px; + padding-right:5px; +} +th div { + padding:1px; + font-size:11px; + font-weight:normal; + display:inline; +} +td { + border-right:1px solid #CCCCCC; + border-bottom:1px solid #CCCCCC; + height:18px; + padding-left:4px; + padding-right:4px; +} +.default_table td { + border:0px; +} +.header td { + padding:0px; + border:0px; +} +.header { + position:absolute; + background-color:#C0C0FF; + width:100%; + z-index:2; + padding-top:1px; + height:22px; + color:#333333; +} +.header a,.header,.footer a,.footer { + color:#333333; +} +.footer { + position:absolute; + border-top:1px solid #666666; + background-color:#C0C0FF; + width:100%; + z-index:2; + height:18px; + bottom:0px; +} +.status { + position:absolute; + border-top:1px solid #666666; + border-left:1px solid #666666; + background-color:#C0C0FF; + z-index:2; + height:18px; + bottom:0px; + right:3px; + padding-left:5px; +} +.empty { + padding:0px; + margin:0px; + border:0px; +} +.cell_highlight { + background-color:#FFFFC0; +} +.cell_highlight_over { + background-color:#EFEFEF; +} +.border_highlight { + background-color:#C0FFC0; +} +.data { + display:none; +} +#code { + width:100%; + height:85%; + overflow:auto; +} +#source { + width:100%; + height:95%; +} +#focus { + height:0px; + position:absolute; + top:-30px; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/styles_noline.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/styles_noline.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/styles_noline.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,144 @@ +/* +// GPL +*/ +body { + overflow:hidden; + background-color:#FFFFFF; +} +body,table,div { + font-family: Arial, Helvetica, Verdana, sans-serif; + font-size:13px; + font-weight:normal; +} +body,input,textarea,div,table { + margin:0px; + padding:0px; +} +iframe { + border:0px; +} +input { + height:20px; + border:1px solid #999999; + padding-left:2px; + padding-right:2px; +} + +#content { + position:absolute; + top:23px; + left:0px; + right:0px; + bottom:18px; + width:100%; + overflow:auto; +} +#multiline { + display:none; + position:absolute; + width:425px; + top:22px; + height:250px; +} +#tconsole { + position:absolute; + width:400px; + top:20px; + left:600px; + height:250px; +} +.table { + border-left:1px solid #666666; + border-top:1px solid #666666; +} +th { + color:#666666; + background-color:#EFEFEF; + border-right:1px solid #666666; + border-bottom:1px solid #666666; + padding-left:5px; + padding-right:5px; +} +th div { + padding:1px; + font-size:11px; + font-weight:normal; + display:inline; +} +td { + border-right:0px solid #CCCCCC; + border-bottom:0px solid #CCCCCC; + height:18px; + padding-left:4px; + padding-right:4px; +} +.default_table td { + border:0px; +} +.header td { + padding:0px; + border:0px; +} +.header { + position:absolute; + background-color:#C0C0FF; + width:100%; + z-index:2; + padding-top:1px; + height:22px; + color:#333333; +} +.header a,.header,.footer a,.footer { + color:#333333; +} +.footer { + position:absolute; + border-top:1px solid #666666; + background-color:#C0C0FF; + width:100%; + z-index:2; + height:18px; + bottom:0px; +} +.status { + position:absolute; + border-top:1px solid #666666; + border-left:1px solid #666666; + background-color:#C0C0FF; + z-index:2; + height:18px; + bottom:0px; + right:3px; + padding-left:5px; +} +.empty { + padding:0px; + margin:0px; + border:0px; +} +.cell_highlight { + background-color:#FFFFC0; +} +.cell_highlight_over { + background-color:#EFEFEF; +} +.border_highlight { + background-color:#C0FFC0; +} +.data { + display:none; +} +#code { + width:100%; + height:85%; + overflow:auto; +} +#source { + width:100%; + height:95%; +} +#focus { + height:0px; + position:absolute; + top:-30px; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/blank.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/blank.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/blank.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,9 @@ + + +blank_page + + + + + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/index.html =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/index.html (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/index.html (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,65 @@ + + + + + + + + +
    + +
    + + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/langs/en.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/langs/en.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/langs/en.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,41 @@ +// UK lang variables + +tinyMCE.addToLang('',{ +bold_desc : 'Bold (Ctrl+B)', +italic_desc : 'Italic (Ctrl+I)', +underline_desc : 'Underline (Ctrl+U)', +striketrough_desc : 'Strikethrough', +justifyleft_desc : 'Align left', +justifycenter_desc : 'Align center', +justifyright_desc : 'Align right', +justifyfull_desc : 'Align full', +bullist_desc : 'Unordered list', +numlist_desc : 'Ordered list', +outdent_desc : 'Outdent', +indent_desc : 'Indent', +undo_desc : 'Undo (Ctrl+Z)', +redo_desc : 'Redo (Ctrl+Y)', +link_desc : 'Insert/edit link', +unlink_desc : 'Unlink', +image_desc : 'Insert/edit image', +cleanup_desc : 'Cleanup messy code', +focus_alert : 'A editor instance must be focused before using this command.', +edit_confirm : 'Do you want to use the WYSIWYG mode for this textarea?', +insert_link_title : 'Insert/edit link', +insert : 'Insert', +update : 'Update', +cancel : 'Cancel', +insert_link_url : 'Link URL', +insert_link_target : 'Target', +insert_link_target_same : 'Open link in the same window', +insert_link_target_blank : 'Open link in a new window', +insert_image_title : 'Insert/edit image', +insert_image_src : 'Image URL', +insert_image_alt : 'Image description', +help_desc : 'Help', +bold_img : "bold.gif", +italic_img : "italic.gif", +underline_img : "underline.gif", +clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?', +popup_blocked : 'Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.' +}); Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/license.txt =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/license.txt (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/license.txt (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/blank.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/blank.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/blank.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,19 @@ + + + blank_page + + + + + + + + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/css/blank.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/css/blank.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/css/blank.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,13 @@ +body { + background-color: #FFFFFF; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/css/pasteword.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/css/pasteword.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/css/pasteword.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,3 @@ +.sourceIframe { + border: 1px solid #808080; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/editor_plugin.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/editor_plugin.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/editor_plugin.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ +tinyMCE.importPluginLanguagePack('paste');var TinyMCE_PastePlugin={getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_paste.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion}},initInstance:function(inst){if(tinyMCE.isMSIE&&tinyMCE.getParam("paste_auto_cleanup_on_paste",false))tinyMCE.addEvent(inst.getBody(),"paste",TinyMCE_PastePlugin._handlePasteEvent)},getControlHTML:function(cn){switch(cn){case"pastetext":return tinyMCE.getButtonHTML(cn,'lang_paste_text_desc','{$pluginurl}/images/pastetext.gif','mcePasteText',true);case"pasteword":return tinyMCE.getButtonHTML(cn,'lang_paste_word_desc','{$pluginurl}/images/pasteword.gif','mcePasteWord',true);case"selectall":return tinyMCE.getButtonHTML(cn,'lang_selectall_desc','{$pluginurl}/images/selectall.gif','mceSelectAll',true)}return''},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mcePasteText":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false))TinyMCE_PastePlugin._insertText(clipboardData.getData("Text"),true);else{var template=new Array();template['file']='../../plugins/paste/pastetext.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'})}}else TinyMCE_PastePlugin._insertText(value['html'],value['linebreaks']);return true;case"mcePasteWord":if(user_interface){if((tinyMCE.isMSIE&&!tinyMCE.isOpera)&&!tinyMCE.getParam('paste_use_dialog',false)){TinyMCE_PastePlugin._insertWordContent(TinyMCE_PastePlugin._clipboardHTML())}else{var template=new Array();template['file']='../../plugins/paste/pasteword.htm';template['width']=450;template['height']=400;var plain_text="";tinyMCE.openWindow(template,{editor_id:editor_id,plain_text:plain_text,resizable:"yes",scrollbars:"no",inline:"yes",mceDo:'insert'})}}else TinyMCE_PastePlugin._insertWordContent(value);return true;case"mceSelectAll":tinyMCE.execInstanceCommand(editor_id,'selectall');return true}return false},_handlePasteEvent:function(e){switch(e.type){case"paste":var html=TinyMCE_PastePlugin._clipboardHTML();var r,inst=tinyMCE.selectedInstance;if(inst&&(r=inst.getRng())&&r.text.length>0)tinyMCE.execCommand('delete');if(html&&html.length>0)tinyMCE.execCommand('mcePasteWord',false,html);tinyMCE.cancelEvent(e);return false}return true},_insertText:function(content,bLinebreaks){if(content&&content.length>0){if(bLinebreaks){if(tinyMCE.getParam("paste_create_paragraphs",true)){var rl=tinyMCE.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i

    ","gi");content=tinyMCE.regexpReplace(content,"\r\r","

    ","gi");content=tinyMCE.regexpReplace(content,"\n\n","

    ","gi");if((pos=content.indexOf('

    '))!=-1){tinyMCE.execCommand("Delete");var node=tinyMCE.selectedInstance.getFocusElement();var breakElms=new Array();do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node}}while(node=node.parentNode);var before="",after="

    ";before+=content.substring(0,pos);for(var i=0;i";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">"}before+="

    ";content=before+content.substring(pos+7)+after}}if(tinyMCE.getParam("paste_create_linebreaks",true)){content=tinyMCE.regexpReplace(content,"\r\n","
    ","gi");content=tinyMCE.regexpReplace(content,"\r","
    ","gi");content=tinyMCE.regexpReplace(content,"\n","
    ","gi")}}tinyMCE.execCommand("mceInsertRawHTML",false,content)}},_insertWordContent:function(content){if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);var cb;if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('before', content)");var rl=tinyMCE.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i(.*?)<\/p>','gi'),'

    $1

    ')}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)
    ","gi"),"

    "+middot+"$1

    ");content=content.replace(new RegExp('','gi'),""+bull);content=content.replace(/<\/o:p>/gi,"");content=content.replace(new RegExp('
    ]*>/gi,"");if(tinyMCE.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(tinyMCE.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break}content=content.replace(new RegExp('href="?'+TinyMCE_PastePlugin._reEscape(""+document.location)+'','gi'),'href="'+tinyMCE.settings['document_base_url']);content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*

     <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!tinyMCE.settings['force_p_newlines']){content=content.replace('','','gi');content=content.replace('

    ','

    ','gi')}if(!tinyMCE.isMSIE&&!tinyMCE.settings['force_p_newlines']){content=content.replace(/<\/?p[^>]*>/gi,"")}content=content.replace(/<\/?div[^>]*>/gi,"");if(tinyMCE.getParam("paste_convert_middot_lists",true)){var div=document.createElement("div");div.innerHTML=content;var className=tinyMCE.getParam("paste_unindented_list_class","unIndentedList");while(TinyMCE_PastePlugin._convertMiddots(div,"--list--"));while(TinyMCE_PastePlugin._convertMiddots(div,middot,className));while(TinyMCE_PastePlugin._convertMiddots(div,bull));content=div.innerHTML}if(tinyMCE.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/ <\/h[1-6]>/gi,'

      

    ');content=content.replace(//gi,'

    ');content=content.replace(/<\/h[1-6]>/gi,'

    ');content=content.replace(/ <\/b>/gi,'  ');content=content.replace(/^( )*/gi,'')}content=content.replace(/--list--/gi,"");if((cb=tinyMCE.getParam("paste_insert_word_content_callback",""))!="")content=eval(cb+"('after', content)");tinyMCE.execCommand("mceInsertContent",false,content);if(tinyMCE.getParam('paste_force_cleanup_wordpaste',true))window.setTimeout('tinyMCE.execCommand("mceCleanup");',1);}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i + + {$lang_paste_text_desc} + + + + + + +
    +
    {$lang_paste_text_desc}
    + +
    + +
    + +
    + +
    {$lang_paste_text_title}
    + + + +
    +
    + +
    + +
    + +
    +
    +
    + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/pasteword.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/pasteword.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/plugins/paste/pasteword.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,29 @@ + + + + {$lang_paste_word_desc} + + + + + + +
    +
    {$lang_paste_word_desc}
    + +
    {$lang_paste_word_title}
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/test.html =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/test.html (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/test.html (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,44 @@ + + + + + + + +
    + +
    + + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/about.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/about.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/about.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,52 @@ + + + {$lang_about_title} + + + + + + + + +
    +
    +

    {$lang_about_title}

    +

    Version: {$tinymce_version} ({$tinymce_releasedate})

    +

    TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

    +

    Copyright © 2003-2006, Moxiecode Systems AB, All rights reserved.

    +

    For more information about this software visit the TinyMCE website.

    + +
    +
    + +
    +
    +

    {$lang_loaded_plugins}

    + +
    +
    + +

     

    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/anchor.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/anchor.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/anchor.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,33 @@ + + + {$lang_insert_anchor_title} + + + + + +
    + + + + + + + + + +
    {$lang_insert_anchor_title}
    {$lang_insert_anchor_name}:
    + +
    +
    + +
    + +
    + +
    +
    + +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/charmap.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/charmap.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/charmap.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,53 @@ + + + {$lang_theme_charmap_title} + + + + + + + + + + + + + + + + + +
    {$lang_theme_charmap_title}
    + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
    HTML-Code
     
     
    NUM-Code
     
    +
    + + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/color_picker.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/color_picker.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/color_picker.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,13 @@ + + + {$lang_theme_colorpicker_title} + + + + + +
    + +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_content.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_content.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_content.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,68 @@ +/* This file contains the CSS data for the editable area(iframe) of TinyMCE */ +/* You can extend this CSS by adding your own CSS file with the the content_css option */ + +body { +/* TB */ + font-family: Arial, Helvetica, Verdana, sans-serif; + font-size:14px; + font-weight:normal; + padding:2px; + background-color:#FFFFFF; +} + +td { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +pre { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +.mceVisualAid { + border: 1px dashed #BBBBBB !important; +} + +div.mceVisualAid { + background-image:url('../images/spacer.gif'); + visibility: visible !important; +} + +.mceItemAnchor { + width: 12px; + line-height: 6px; + overflow: hidden; + padding-left: 12px; + background-image: url('../images/anchor_symbol.gif'); + background-position: bottom; + background-repeat: no-repeat; +} + +/* Important is needed in Gecko browsers inorder to style links */ +/* +a { + color: green !important; +} +*/ + +/* Style selection range colors in Gecko browsers */ +/* +::-moz-selection { + background-color: red; + color: green; +} +*/ + +/* MSIE specific */ + +* html body { + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_popup.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_popup.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_popup.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,331 @@ +/* This file contains the CSS data for all popups in TinyMCE */ + +body { + background-color: #F0F0EE; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; + margin: 8px; +} + +td { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} + +input { + background: #FFFFFF; + border: 1px solid #cccccc; +} + +td, input, select, textarea { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +input, select, textarea { + border: 1px solid #808080; +} + +.input_noborder { + border: 0; +} + +#insert, .updateButton { + font-weight: bold; + width: 90px; + height: 21px; + border: 0; + background-image: url('../images/insert_button_bg.gif'); + cursor: pointer; +} + +#cancel { + font-weight: bold; + width: 90px; + height: 21px; + border: 0; + background-image: url('../images/cancel_button_bg.gif'); + cursor: pointer; +} + +/* Mozilla only style */ +html>body #insert, html>body #cancel { + padding-bottom: 2px; +} + +.title { + font-size: 12px; + font-weight: bold; + color: #2B6FB6; +} + +table.charmap { + border-style: solid; + border-width: 1px; + border-color: #AAAAAA; +} + +td.charmap, td.charmapOver { + color: #000000; + border-color: #AAAAAA; + border-style: solid; + border-width: 1px; + text-align: center; + font-size: 12px; +} + +td.charmapOver { + background-color: #CCCCCC; + cursor: default; +} + +a.charmap { + color: #000000; + text-decoration: none +} + +.wordWrapCode { + vertical-align: middle; + border: 1px none #000000; + background-color: transparent; +} + +input.radio { + border: 1px none #000000; + background-color: transparent; + vertical-align: middle; +} + +input.checkbox { + border: 1px none #000000; + background-color: transparent; + vertical-align: middle; +} + +.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { + margin-left: 1px; +} + +.mceButtonNormal { + border-top: 1px solid; + border-left: 1px solid; + border-bottom: 1px solid; + border-right: 1px solid; + border-color: #F0F0EE; + cursor: default; +} + +.mceButtonOver { + border: 1px solid #0A246A; + cursor: default; + background-color: #B6BDD2; +} + +.mceButtonDown { + cursor: default; + border: 1px solid #0A246A; + background-color: #8592B5; +} + +.mceButtonDisabled { + filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); + -moz-opacity:0.3; + opacity: 0.3; + border-top: 1px solid; + border-left: 1px solid; + border-bottom: 1px solid; + border-right: 1px solid; + border-color: #F0F0EE; + cursor: default; +} + +.mceActionPanel { + margin-top: 5px; +} + +/* Tabs classes */ + +.tabs { + float: left; + width: 100%; + line-height: normal; + background-image: url("../images/xp/tabs_bg.gif"); +} + +.tabs ul { + margin: 0; + padding: 0 0 0; + list-style: none; +} + +.tabs li { + float: left; + background: url("../images/xp/tab_bg.gif") no-repeat left top; + margin: 0; + margin-left: 0; + margin-right: 2px; + padding: 0 0 0 10px; + line-height: 18px; +} + +.tabs li.current { + background: url("../images/xp/tab_sel_bg.gif") no-repeat left top; + margin-right: 2px; +} + +.tabs span { + float: left; + display: block; + background: url("../images/xp/tab_end.gif") no-repeat right top; + padding: 0px 10px 0 0; +} + +.tabs .current span { + background: url("../images/xp/tab_sel_end.gif") no-repeat right top; +} + +.tabs a { + text-decoration: none; + font-family: Verdana, Arial; + font-size: 10px; +} + +.tabs a:link, .tabs a:visited, .tabs a:hover { + color: black; +} + +.tabs a:hover { +} + +.tabs .current { +} + +.tabs .current a, .tabs .current a:link, .tabs .current a:visited { +} + +.panel_wrapper div.panel { + display: none; +} + +.panel_wrapper div.current { + display: block; + width: 100%; + height: 300px; + overflow: visible; /* Should be auto but that breaks Safari */ +} + +.panel_wrapper { + border: 1px solid #919B9C; + border-top: 0px; + padding: 10px; + padding-top: 5px; + clear: both; + background-color: white; +} + +fieldset { + border: 1px solid #919B9C; + font-family: Verdana, Arial; + font-size: 10px; + padding: 0; + margin: 0; + padding: 4px; +} + +legend { + color: #2B6FB6; + font-weight: bold; +} + +.properties { + width: 100%; +} + +.properties .column1 { +} + +.properties .column2 { + text-align: left; +} + +a:link, a:visited { + color: black; +} + +a:hover { + color: #2B6FB6; +} + +#plugintable thead { + font-weight: bold; + background-color: #DDDDDD; +} + +#plugintable, #about #plugintable td { + border: 1px solid #919B9C; +} + +#plugintable { + width: 99%; + margin-top: 10px; +} + +#pluginscontainer { + height: 290px; + overflow: auto; +} + +/* MSIE Specific styles */ + +* html .panel_wrapper { + width: 100%; +} + +.column { + float: left; +} + +h1, h2, h3, h4 { + color: #2B6FB6; + margin: 0; + padding: 0; + padding-top: 5px; +} + +h3 { + font-size: 14px; +} + +#link .panel_wrapper, #link div.current { + height: 125px; +} + +#image .panel_wrapper, #image div.current { + height: 190px; +} + +label.msg { display: none; } +label.invalid { color: #EE0000; display: inline; } +input.invalid { border: 1px solid #EE0000; } + +/* Disables the advanced tab in the table plugin. */ +/* +#table #advanced_tab { + display: none; +} +*/ + +/* Disables the border input field and label in the table plugin. */ +/* +#table #border, #table #borderlabel { + display: none; +} +*/ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_ui.css =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_ui.css (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/css/editor_ui.css (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,101 @@ +/* This file contains the CSS data for the editor UI of TinyMCE instances */ + +.mceToolbarTop a, .mceToolbarTop a:visited, .mceToolbarTop a:hover, .mceToolbarBottom a, .mceToolbarBottom a:visited, .mceToolbarBottom a:hover {border: 0; margin: 0; padding: 0; background: transparent;} +.mceSeparatorLine {border: 0; padding: 0; margin-left: 4px; margin-right: 2px;} + +/* tb */ +.mceSelectList {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 7pt !important; font-weight: normal; margin-top: 3px; padding: 0; display: inline; vertical-align: top; background-color: #F0F0EE; color: #0000FF;} +.mceLabel, .mceLabelDisabled {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt;} +.mceLabel {color: #000000;} +.mceLabelDisabled {cursor: text; color: #999999;} + +/* tb */ +.mceEditor {background-color: #F5F5F5; border: 1px solid #cccccc; padding: 0; margin: 0;} +.mceEditorArea { font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; background: #FFFFFF; padding: 0; margin: 0; } +.mceToolbarTop, .mceToolbarBottom {background: #F0F0EE; line-height: 1px; font-size: 1px;} +.mceToolbarTop {border-bottom: 1px solid #cccccc; padding-bottom: 1px;} +.mceToolbarBottom {border-top: 1px solid #cccccc;} +.mceToolbarContainer {position: relative; left: 0; top: 0; display: block;} +.mceStatusbarTop, .mceStatusbarBottom, .mceStatusbar {height: 20px;} +.mceStatusbarTop .mceStatusbarPathText, .mceStatusbarBottom .mceStatusbarPathText, .mceStatusbar .mceStatusbarPathText {font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; padding: 2px; line-height: 16px; overflow: visible;} +.mceStatusbarTop {border-bottom: 1px solid #cccccc;} +.mceStatusbarBottom {border-top: 1px solid #cccccc;} +.mceStatusbar {border-bottom: 1px solid #cccccc;} +.mcePathItem, .mcePathItem:link, .mcePathItem:visited, .mcePathItem:hover {text-decoration: none; font-family: 'MS Sans Serif', sans-serif, Verdana, Arial; font-size: 9pt; color: #000000;} +.mcePathItem:hover {text-decoration: underline;} +.mceStatusbarPathText {float: left;} +.mceStatusbarResize {float: right; background-image: url('../images/statusbar_resize.gif'); background-repeat: no-repeat; width: 11px; height: 20px; cursor: se-resize;} +.mceResizeBox {width: 10px; height: 10px; display: none; border: 1px dotted gray; margin: 0; padding: 0;} +.mceEditorIframe {border: 0;} + +/* Button CSS rules */ + +a.mceButtonDisabled img, a.mceButtonNormal img, a.mceButtonSelected img {width: 20px; height: 20px; cursor: default; margin-top: 1px; margin-left: 1px;} +a.mceButtonDisabled img {border: 0 !important;} +a.mceButtonNormal img, a.mceButtonSelected img {border: 1px solid #F0F0EE !important;} +a.mceButtonSelected img {border: 1px solid #6779AA !important; background-color: #D4D5D8;} +a.mceButtonNormal img:hover, a.mceButtonSelected img:hover {border: 1px solid #0A246A !important; cursor: default; background-color: #B6BDD2;} +a.mceButtonDisabled img {-moz-opacity:0.3; opacity: 0.3; border: 1px solid #F0F0EE !important; cursor: default;} +a.mceTiledButton img {background-image: url('../images/buttons.gif'); background-repeat: no-repeat;} + +/* Menu button CSS rules */ + +span.mceMenuButton img, span.mceMenuButtonSelected img {border: 1px solid #F0F0EE; margin-left: 1px;} +span.mceMenuButtonSelected img {border: 1px solid #6779AA; background-color: #B6BDD2;} +span.mceMenuButtonSelected img.mceMenuButton {border: 1px solid #F0F0EE; background-color: transparent;} +span.mceMenuButton img.mceMenuButton, span.mceMenuButtonSelected img.mceMenuButton {border-left: 0; margin-left: 0;} +span.mceMenuButton:hover img, span.mceMenuButtonSelected:hover img {border: 1px solid #0A246A; background-color: #B6BDD2;} +span.mceMenuButton:hover img.mceMenuButton, span.mceMenuButtonSelected:hover img.mceMenuButton {border-left: 0;} +span.mceMenuButtonFocus img {border: 1px solid gray; border-right: 0; margin-left: 1px; background-color: #F5F4F2;} +span.mceMenuButtonFocus img.mceMenuButton {border: 1px solid gray; border-left: 1px solid #F5F4F2; margin-left: 0;} +span.mceMenuHover img {border: 1px solid #0A246A; background-color: #B6BDD2;} +span.mceMenuButtonSelected.mceMenuHover img.mceMenuButton {border: 1px solid #0A246A; background-color: #B6BDD2; border-left: 0;} + +/* Menu */ + +.mceMenu {position: absolute; left: 0; top: 0; display: none; z-index: 100; background-color: white; border: 1px solid gray; font-weight: normal;} +.mceMenu a, .mceMenuTitle, .mceMenuDisabled {display: block; width: 100%; text-decoration: none; background-color: white; font-family: Tahoma, Verdana, Arial, Helvetica; font-size: 11px; line-height: 20px; color: black;} +.mceMenu a:hover {background-color: #B6BDD2; color: black; text-decoration: none !important;} +.mceMenu span {padding-left: 10px; padding-right: 10px; display: block; line-height: 20px;} +.mceMenuSeparator {border-bottom: 1px solid gray; background-color: gray; height: 1px;} +.mceMenuTitle span {padding-left: 5px;} +.mceMenuTitle {background-color: #DDDDDD; font-weight: bold;} +.mceMenuDisabled {color: gray;} +span.mceMenuSelectedItem {background-image: url('../images/menu_check.gif'); background-repeat: no-repeat; background-position: 5px 8px; padding-left: 20px;} +span.mceMenuCheckItem {padding-left: 20px;} +span.mceMenuLine {display: block; position: absolute; left: 0; top: -1px; background-color: #F5F4F2; width: 30px; height: 1px; overflow: hidden; padding-left: 0; padding-right: 0;} +.mceColors table, .mceColors td {margin: 0; padding: 2px;} +a.mceMoreColors {width: 130px; margin: 0; padding: 0; margin-left: 3px; margin-bottom: 3px; text-align: center; border: 1px solid white;} +.mceColorPreview {position: absolute; left: 0; top: 0; margin-left: 3px; margin-top: 15px; width: 16px; height: 4px; background-color: red;} +a.mceMoreColors:hover {border: 1px solid #0A246A;} +.mceColors td a {width: 9px; height: 9px; overflow: hidden; border: 1px solid #808080;} + +/* MSIE 6 specific rules */ + +* html a.mceButtonNormal img, * html a.mceButtonSelected img, * html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;} +* html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;} +* html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;} +* html a.mceButtonNormal, * html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;} +* html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;} +* html a.mceButtonNormal:hover, * html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;} +* html .mceSelectList {margin-top: 2px;} +* html span.mceMenuButton, * html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;} +* html span.mceMenuButton img, * html span.mceMenuButtonSelected img, * html span.mceMenuButtonFocus img {position: relative; top: 1px;} +* html a.mceMoreColors {width: 132px;} +* html .mceColors td a {width: 10px; height: 10px;} +* html .mceColorPreview {margin-left: 2px; margin-top: 14px;} + +/* MSIE 7 specific rules */ + +*:first-child+html a.mceButtonNormal img, *:first-child+html a.mceButtonSelected img, *:first-child+html a.mceButtonDisabled img {border: 0 !important; margin-top: 2px; margin-bottom: 1px;} +*:first-child+html a.mceButtonDisabled img {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); border: 0 !important;} +*:first-child+html a.mceButtonDisabled {border: 1px solid #F0F0EE !important;} +*:first-child+html a.mceButtonNormal, *:first-child+html a.mceButtonSelected {border: 1px solid #F0F0EE !important; cursor: default;} +*:first-child+html a.mceButtonSelected {border: 1px solid #6779AA !important; background-color: #D4D5D8;} +*:first-child+html a.mceButtonNormal:hover, *:first-child+html a.mceButtonSelected:hover {border: 1px solid #0A246A !important; background-color: #B6BDD2; cursor: default;} +*:first-child+html .mceSelectList {margin-top: 2px;} +*:first-child+html span.mceMenuButton, *:first-child+html span.mceMenuButtonFocus {position: relative; left: 0; top: 0;} +*:first-child+html span.mceMenuButton img, *:first-child+html span.mceMenuButtonSelected img, *:first-child+html span.mceMenuButtonFocus img {position: relative; top: 1px;} +*:first-child+html a.mceMoreColors {width: 132px;} +*:first-child+html .mceColors td a {width: 10px; height: 10px;} +*:first-child+html .mceColorPreview {margin: 0; padding-left: 4px; margin-top: 14px; width: 14px;} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/editor_template.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/editor_template.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/editor_template.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ +tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_AdvancedTheme={_defColors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','forecolor',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','HiliteColor',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',getControlHTML:function(button_name){var i,x,but;for(i=0;i4?but[4]:false),(but.length>5?but[5]:null));if(but[0]==button_name)return tinyMCE.getButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null))}switch(button_name){case"formatselect":var html='';return html;case"styleselect":return'';case"fontselect":var fontHTML='';return fontHTML;case"fontsizeselect":return'';case"|":case"separator":return'';case"spacer":return'';case"rowseparator":return'
    '}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case'mceHelp':tinyMCE.openWindow({file:'about.htm',width:480,height:380},{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return true;case"mceLink":var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text}else selectedText=inst.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return true}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_href');if(mceRealHref!=""){href=mceRealHref;if(tinyMCE.getParam('convert_urls'))href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);")}action="update"}var template=new Array();template['file']='link.htm';template['width']=310;template['height']=200;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);if(inst.settings['insertlink_callback']){var returnVal=eval(inst.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])TinyMCE_AdvancedTheme._insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class'])}else{tinyMCE.openWindow(template,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class,inline:"yes"})}return true;case"mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;var inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return true;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h)}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:""}src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");mceRealSrc=tinyMCE.getAttrib(img,'mce_src');if(mceRealSrc!=""){src=mceRealSrc;if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);")}action="update"}var template=new Array();template['file']='image.htm?src={$src}';template['width']=355;template['height']=265+(tinyMCE.isMSIE?25:0);template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);if(inst.settings['insertimage_callback']){var returnVal=eval(inst.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])TinyMCE_AdvancedTheme._insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout'])}else tinyMCE.openWindow(template,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action,inline:"yes"});return true;case"forecolor":var fcp=new TinyMCE_Layer(editor_id+'_fcPreview',false),p,img,elm;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!fcp.exists()){fcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=fcp.getElement();elm._editor_id=editor_id;elm._command="forecolor";elm._switchId=editor_id+"_forecolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_forecolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));fcp.moveTo(p.absLeft,p.absTop);fcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).foreColor;fcp.show();return false;case"forecolorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_fcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_text_colors','forecolor'));tinyMCE.switchClass(editor_id+'_forecolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_forecolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"HiliteColor":var bcp=new TinyMCE_Layer(editor_id+'_bcPreview',false),p,img;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!bcp.exists()){bcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=bcp.getElement();elm._editor_id=editor_id;elm._command="HiliteColor";elm._switchId=editor_id+"_backcolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_backcolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));bcp.moveTo(p.absLeft,p.absTop);bcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).backColor;bcp.show();return false;case"HiliteColorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_bcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_background_colors','HiliteColor'));tinyMCE.switchClass(editor_id+'_backcolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_backcolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"mceColorPicker":if(user_interface){var template=new Array();var inputColor=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=220;template['height']=190;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:inputColor})}else{var savedVal=tinyMCE.lastColorPickerValue;var elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;if(elm.onchange!=null&&elm.onchange!='')eval('elm.onchange();')}return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case"mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceNewDocument":if(confirm(tinyMCE.getLang('lang_newdocument')))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,' ');return true}return false},getEditorTemplate:function(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array(),skip;for(var i=0;i 

    ';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i'+key+''}TinyMCE_AdvancedTheme._autoImportCSSClasses=false}switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='0){toolbarHTML+="
    ";deltaHeight-=23}}toolbarHTML+='
    ';template['html']='';if(toolbarLocation=="top"){template['html']+=''}if(statusbarLocation=="top"){template['html']+='';deltaHeight-=23}template['html']+='';if(toolbarLocation=="bottom"){template['html']+=''}if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML,{editor_id:editorId});elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='
    '+toolbarHTML+'
    '+statusbarHTML+'
    '+toolbarHTML+'
    '+toolbarHTML+'
    ';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null}if(statusbarLocation=="bottom"){template['html']+=''+statusbarHTML+'';deltaHeight-=23}template['html']+='';break;case"RowLayout":template['html']='';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i';else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom"}else if(i==0){pathClass="mceStatusbar"}else{deltaHeight-=2}template['html']+='';deltaHeight-=22}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);curContainer=removeFromArray(curContainer,tinyMCE.getParam("theme_advanced_disable","",true,','));for(var j=0;j0){curContainerHTML+="
    ";deltaHeight-=23}template['html']+='
    '}}template['html']+='
    '+statusbarHTML+'
    '+curContainerHTML+'
    ';break;case"CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);")}break}if(resizing)template['html']+='';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);template['delta_width']=0;template['delta_height']=deltaHeight;return template},initInstance:function(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_AdvancedTheme._resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true))}}inst.addShortcut('ctrl','k','lang_link_desc','mceLink')},_handleMenuEvent:function(e){var te=tinyMCE.isMSIE?window.event.srcElement:e.target;tinyMCE._menuButtonEvent(e.type=="mouseover"?"over":"out",document.getElementById(te._switchId));if(e.type=="click")tinyMCE.execInstanceCommand(te._editor_id,te._command)},_hideMenus:function(id){var fcml=new TinyMCE_Layer(id+'_fcMenu'),bcml=new TinyMCE_Layer(id+'_bcMenu');if(fcml.exists()&&fcml.isVisible()){tinyMCE.switchClass(id+'_forecolor','mceMenuButton');fcml.hide()}if(bcml.exists()&&bcml.isVisible()){tinyMCE.switchClass(id+'_backcolor','mceMenuButton');bcml.hide()}},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){var alignNode,breakOut,classNode;function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName.indexOf("html:")==0)nodeName=nodeName.substring(5);if(nodeName=="b"){nodeName="strong"}if(nodeName=="i"){nodeName="em"}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+st+" "}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+face+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+size+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+color+" "}if(getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" "}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+src+" "}if(path[i].nodeName=='A'&&getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+href+" "}className=tinyMCE.getAttrib(path[i],"class");if((nodeName=="img"||nodeName=="span")&&className.indexOf('mceItem')!=-1){nodeName=className.replace(/mceItem([a-z]+)/gi,'$1').toLowerCase();nodeData=path[i].getAttribute('title')}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+anchor;nodeData=""}if(getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+=''+nodeName+'';if(i>0){html+=" » "}}pathElm.innerHTML=''+tinyMCE.getLang('lang_theme_path')+": "+html+' '}tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClass(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClass(editor_id+'_link','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_unlink','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_outdent','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_image','mceButtonNormal');tinyMCE.switchClass(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClass(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClass(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal');tinyMCE.switchClass(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal')}tinyMCE.switchClass(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal');if(undo_levels!=-1){tinyMCE.switchClass(editor_id+'_undo','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_redo','mceButtonDisabled')}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClass(editor_id+'_outdent','mceButtonNormal');if(undo_index!=-1&&(undo_index0))tinyMCE.switchClass(editor_id+'_redo','mceButtonNormal');if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClass(editor_id+'_undo','mceButtonNormal');var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i");else selectByValue(selectElm,"")}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="")}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"")}else selectByValue(selectElm,"")}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size)}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i0)selectElm.setAttribute('cssImported','true')}},_setCookie:function(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie},_getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end))},_resizeTo:function(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth';for(i=0;i';if((i+1)%8==0)h+=''}h+='';return h},_insertImage:function(src,alt,border,hspace,vspace,width,height,align,title,onmouseover,onmouseout){tinyMCE.execCommand('mceBeginUndoLevel');if(src=="")return;if(!tinyMCE.imgElement&&tinyMCE.isSafari){var html="";html+=''+alt+'';tinyMCE.execCommand("mceInsertContent",false,html)}else{if(!tinyMCE.imgElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari)tinyMCE.execCommand("mceInsertContent",false,'');else tinyMCE.selectedInstance.contentDocument.execCommand("insertimage",false,tinyMCE.uniqueURL);tinyMCE.imgElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"img","src",tinyMCE.uniqueURL)}}if(tinyMCE.imgElement){var needsRepaint=false;var msrc=src;src=eval(tinyMCE.settings['urlconverter_callback']+"(src, tinyMCE.imgElement);");if(tinyMCE.getParam('convert_urls'))msrc=src;if(onmouseover&&onmouseover!="")onmouseover="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseover, tinyMCE.imgElement);")+"';";if(onmouseout&&onmouseout!="")onmouseout="this.src='"+eval(tinyMCE.settings['urlconverter_callback']+"(onmouseout, tinyMCE.imgElement);")+"';";if(typeof(title)=="undefined")title=alt;if(width!=tinyMCE.imgElement.getAttribute("width")||height!=tinyMCE.imgElement.getAttribute("height")||align!=tinyMCE.imgElement.getAttribute("align"))needsRepaint=true;tinyMCE.setAttrib(tinyMCE.imgElement,'src',src);tinyMCE.setAttrib(tinyMCE.imgElement,'mce_src',msrc);tinyMCE.setAttrib(tinyMCE.imgElement,'alt',alt);tinyMCE.setAttrib(tinyMCE.imgElement,'title',title);tinyMCE.setAttrib(tinyMCE.imgElement,'align',align);tinyMCE.setAttrib(tinyMCE.imgElement,'border',border,true);tinyMCE.setAttrib(tinyMCE.imgElement,'hspace',hspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'vspace',vspace,true);tinyMCE.setAttrib(tinyMCE.imgElement,'width',width,true);tinyMCE.setAttrib(tinyMCE.imgElement,'height',height,true);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseover',onmouseover);tinyMCE.setAttrib(tinyMCE.imgElement,'onmouseout',onmouseout);if(width&&width!="")tinyMCE.imgElement.style.pixelWidth=width;if(height&&height!="")tinyMCE.imgElement.style.pixelHeight=height;if(needsRepaint)tinyMCE.selectedInstance.repaint()}tinyMCE.execCommand('mceEndUndoLevel')},_insertLink:function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(tinyMCE.selectedInstance&&tinyMCE.selectedElement&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){var doc=tinyMCE.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true}var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(linkElement,'href',thref);tinyMCE.setAttrib(linkElement,'mce_href',mhref);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));tinyMCE.selectedElement.parentNode.replaceChild(linkElement,tinyMCE.selectedElement)}return}if(!tinyMCE.linkElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,''+tinyMCE.selectedInstance.selection.getSelectedHTML()+'')}else tinyMCE.selectedInstance.contentDocument.execCommand("createlink",false,tinyMCE.uniqueURL);tinyMCE.linkElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);var elementArray=tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);for(var i=0;i + + {$lang_insert_image_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/anchor.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/anchor_symbol.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/backcolor.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bold.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bold_de_se.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bold_es.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bold_fr.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bold_ru.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bold_tw.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/browse.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/bullist.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/button_menu.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/buttons.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/cancel_button_bg.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/charmap.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/cleanup.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/close.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/code.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/color.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/copy.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/custom_1.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/cut.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/forecolor.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/help.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/hr.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/image.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/indent.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/insert_button_bg.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/italic.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/italic_de_se.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/italic_es.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/italic_ru.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/italic_tw.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/justifycenter.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/justifyfull.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/justifyleft.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/justifyright.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/link.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/menu_check.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/newdocument.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/numlist.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/opacity.png =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/outdent.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/paste.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/redo.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/removeformat.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/separator.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/spacer.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/statusbar_resize.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/strikethrough.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/sub.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/sup.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/underline.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/underline_es.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/underline_fr.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/underline_ru.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/underline_tw.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/undo.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/unlink.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/images/visualaid.gif =================================================================== diff -u Binary files differ Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/about.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/about.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/about.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,75 @@ +function init() { + var inst; + + tinyMCEPopup.resizeToInnerSize(); + inst = tinyMCE.selectedInstance; + + // Give FF some time + window.setTimeout('insertHelpIFrame();', 10); + + var tcont = document.getElementById('plugintablecontainer'); + var plugins = tinyMCE.getParam('plugins', '', true, ','); + if (plugins.length == 0) + document.getElementById('plugins_tab').style.display = 'none'; + + var html = ""; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + html += ''; + + for (var i=0; i' + info.longname + ''; + else + html += ''; + + if (info.authorurl != null && info.authorurl != '') + html += ''; + else + html += ''; + + html += ''; + html += ''; + } + + html += ''; + html += '
    ' + tinyMCE.getLang('lang_plugin') + '' + tinyMCE.getLang('lang_author') + '' + tinyMCE.getLang('lang_version') + '
    ' + info.longname + '' + info.author + '' + info.author + '' + info.version + '
    '; + + tcont.innerHTML = html; +} + +function getPluginInfo(name) { + if (tinyMCE.plugins[name].getInfo) + return tinyMCE.plugins[name].getInfo(); + + return { + longname : name, + authorurl : '', + infourl : '', + author : '--', + version : '--' + }; +} + +function insertHelpIFrame() { + var html = ''; + + document.getElementById('iframecontainer').innerHTML = html; + + html = ''; + html += 'Got Moxie? '; + html += 'Hosted By Sourceforge '; + html += 'Also on freshmeat '; + + document.getElementById('buttoncontainer').innerHTML = html; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/anchor.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/anchor.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/anchor.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,74 @@ +var action, element; + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id')); + var anchor = tinyMCE.getParentElement(inst.getFocusElement(), "a", "name"); + var img = inst.getFocusElement(); + action = 'insert'; + + if (anchor != null) { + element = anchor; + action = "update"; + } + + if (tinyMCE.getAttrib(img, "class") == "mceItemAnchor") { + element = img; + action = "update"; + } + + if (action == "update") + document.forms[0].anchorName.value = element.nodeName == "IMG" ? element.getAttribute("title") : element.getAttribute("name"); + + document.forms[0].insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true); +} + +function insertAnchor() { + var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id')); + var name = document.forms[0].anchorName.value, e; + + tinyMCEPopup.execCommand("mceBeginUndoLevel"); + + if (action == "update") { + if (element.nodeName == "IMG") + element.setAttribute("title", name); + else + element.setAttribute("name", name); + } else { + var rng = inst.getRng(); + + if (rng.collapse) + rng.collapse(false); + + name = name.replace(/&/g, '&'); + name = name.replace(/\"/g, '"'); + name = name.replace(//g, '>'); + + // Fix for bug #1447335 + if (tinyMCE.isGecko) + html = ''; + else + html = ''; + + tinyMCEPopup.execCommand("mceInsertContent", false, html); + + // Fix for bug #1447335 force cursor after the anchor element + if (tinyMCE.isGecko) { + e = inst.getDoc().getElementById('mceNewAnchor'); + + if (e) { + inst.selection.selectNode(e, true, false, false); + e.removeAttribute('id'); + } + } + + tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst); + } + + tinyMCEPopup.execCommand("mceEndUndoLevel"); + + tinyMCE.triggerNodeChange(); + tinyMCEPopup.close(); +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/charmap.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/charmap.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/charmap.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,326 @@ +function init() { + tinyMCEPopup.resizeToInnerSize(); +} + +var charmap = new Array(); + +// for mor details please see w3c.org +// now here is the complete list ;) + +charmap = [ + [' ', ' ', true, 'no-break space'], + ['&', '&', true, 'ampersand'], + ['"', '"', true, 'quotation mark'], +// finance + ['¢', '¢', true, 'cent sign'], + ['€', '€', true, 'euro sign'], + ['£', '£', true, 'pound sign'], + ['¥', '¥', true, 'yen sign'], +// signs + ['©', '©', true, 'copyright sign'], + ['®', '®', true, 'registered sign'], + ['™', '™', true, 'trade mark sign'], + ['‰', '‰', true, 'per mille sign'], + ['µ', 'µ', true, 'micro sign'], + ['·', '·', true, 'middle dot'], + ['•', '•', true, 'bullet'], + ['…', '…', true, 'three dot leader'], + ['′', '′', true, 'minutes / feet'], + ['″', '″', true, 'seconds / inches'], + ['§', '§', true, 'section sign'], + ['¶', '¶', true, 'paragraph sign'], + ['ß', 'ß', true, 'sharp s / ess-zed'], +// quotations + ['‹', '‹', true, 'single left-pointing angle quotation mark'], + ['›', '›', true, 'single right-pointing angle quotation mark'], + ['«', '«', true, 'left pointing guillemet'], + ['»', '»', true, 'right pointing guillemet'], + ['‘', '‘', true, 'left single quotation mark'], + ['’', '’', true, 'right single quotation mark'], + ['“', '“', true, 'left double quotation mark'], + ['”', '”', true, 'right double quotation mark'], + ['‚', '‚', true, 'single low-9 quotation mark'], + ['„', '„', true, 'double low-9 quotation mark'], + ['<', '<', true, 'less-than sign'], + ['>', '>', true, 'greater-than sign'], + ['≤', '≤', true, 'less-than or equal to'], + ['≥', '≥', true, 'greater-than or equal to'], + ['–', '–', true, 'en dash'], + ['—', '—', true, 'em dash'], + ['¯', '¯', true, 'macron'], + ['‾', '‾', true, 'overline'], + ['¤', '¤', true, 'currency sign'], + ['¦', '¦', true, 'broken bar'], + ['¨', '¨', true, 'diaeresis'], + ['¡', '¡', true, 'inverted exclamation mark'], + ['¿', '¿', true, 'turned question mark'], + ['ˆ', 'ˆ', true, 'circumflex accent'], + ['˜', '˜', true, 'small tilde'], + ['°', '°', true, 'degree sign'], + ['−', '−', true, 'minus sign'], + ['±', '±', true, 'plus-minus sign'], + ['÷', '÷', true, 'division sign'], + ['⁄', '⁄', true, 'fraction slash'], + ['×', '×', true, 'multiplication sign'], + ['¹', '¹', true, 'superscript one'], + ['²', '²', true, 'superscript two'], + ['³', '³', true, 'superscript three'], + ['¼', '¼', true, 'fraction one quarter'], + ['½', '½', true, 'fraction one half'], + ['¾', '¾', true, 'fraction three quarters'], +// math / logical + ['ƒ', 'ƒ', true, 'function / florin'], + ['∫', '∫', true, 'integral'], + ['∑', '∑', true, 'n-ary sumation'], + ['∞', '∞', true, 'infinity'], + ['√', '√', true, 'square root'], + ['∼', '∼', false,'similar to'], + ['≅', '≅', false,'approximately equal to'], + ['≈', '≈', true, 'almost equal to'], + ['≠', '≠', true, 'not equal to'], + ['≡', '≡', true, 'identical to'], + ['∈', '∈', false,'element of'], + ['∉', '∉', false,'not an element of'], + ['∋', '∋', false,'contains as member'], + ['∏', '∏', true, 'n-ary product'], + ['∧', '∧', false,'logical and'], + ['∨', '∨', false,'logical or'], + ['¬', '¬', true, 'not sign'], + ['∩', '∩', true, 'intersection'], + ['∪', '∪', false,'union'], + ['∂', '∂', true, 'partial differential'], + ['∀', '∀', false,'for all'], + ['∃', '∃', false,'there exists'], + ['∅', '∅', false,'diameter'], + ['∇', '∇', false,'backward difference'], + ['∗', '∗', false,'asterisk operator'], + ['∝', '∝', false,'proportional to'], + ['∠', '∠', false,'angle'], +// undefined + ['´', '´', true, 'acute accent'], + ['¸', '¸', true, 'cedilla'], + ['ª', 'ª', true, 'feminine ordinal indicator'], + ['º', 'º', true, 'masculine ordinal indicator'], + ['†', '†', true, 'dagger'], + ['‡', '‡', true, 'double dagger'], +// alphabetical special chars + ['À', 'À', true, 'A - grave'], + ['Á', 'Á', true, 'A - acute'], + ['Â', 'Â', true, 'A - circumflex'], + ['Ã', 'Ã', true, 'A - tilde'], + ['Ä', 'Ä', true, 'A - diaeresis'], + ['Å', 'Å', true, 'A - ring above'], + ['Æ', 'Æ', true, 'ligature AE'], + ['Ç', 'Ç', true, 'C - cedilla'], + ['È', 'È', true, 'E - grave'], + ['É', 'É', true, 'E - acute'], + ['Ê', 'Ê', true, 'E - circumflex'], + ['Ë', 'Ë', true, 'E - diaeresis'], + ['Ì', 'Ì', true, 'I - grave'], + ['Í', 'Í', true, 'I - acute'], + ['Î', 'Î', true, 'I - circumflex'], + ['Ï', 'Ï', true, 'I - diaeresis'], + ['Ð', 'Ð', true, 'ETH'], + ['Ñ', 'Ñ', true, 'N - tilde'], + ['Ò', 'Ò', true, 'O - grave'], + ['Ó', 'Ó', true, 'O - acute'], + ['Ô', 'Ô', true, 'O - circumflex'], + ['Õ', 'Õ', true, 'O - tilde'], + ['Ö', 'Ö', true, 'O - diaeresis'], + ['Ø', 'Ø', true, 'O - slash'], + ['Œ', 'Œ', true, 'ligature OE'], + ['Š', 'Š', true, 'S - caron'], + ['Ù', 'Ù', true, 'U - grave'], + ['Ú', 'Ú', true, 'U - acute'], + ['Û', 'Û', true, 'U - circumflex'], + ['Ü', 'Ü', true, 'U - diaeresis'], + ['Ý', 'Ý', true, 'Y - acute'], + ['Ÿ', 'Ÿ', true, 'Y - diaeresis'], + ['Þ', 'Þ', true, 'THORN'], + ['à', 'à', true, 'a - grave'], + ['á', 'á', true, 'a - acute'], + ['â', 'â', true, 'a - circumflex'], + ['ã', 'ã', true, 'a - tilde'], + ['ä', 'ä', true, 'a - diaeresis'], + ['å', 'å', true, 'a - ring above'], + ['æ', 'æ', true, 'ligature ae'], + ['ç', 'ç', true, 'c - cedilla'], + ['è', 'è', true, 'e - grave'], + ['é', 'é', true, 'e - acute'], + ['ê', 'ê', true, 'e - circumflex'], + ['ë', 'ë', true, 'e - diaeresis'], + ['ì', 'ì', true, 'i - grave'], + ['í', 'í', true, 'i - acute'], + ['î', 'î', true, 'i - circumflex'], + ['ï', 'ï', true, 'i - diaeresis'], + ['ð', 'ð', true, 'eth'], + ['ñ', 'ñ', true, 'n - tilde'], + ['ò', 'ò', true, 'o - grave'], + ['ó', 'ó', true, 'o - acute'], + ['ô', 'ô', true, 'o - circumflex'], + ['õ', 'õ', true, 'o - tilde'], + ['ö', 'ö', true, 'o - diaeresis'], + ['ø', 'ø', true, 'o slash'], + ['œ', 'œ', true, 'ligature oe'], + ['š', 'š', true, 's - caron'], + ['ù', 'ù', true, 'u - grave'], + ['ú', 'ú', true, 'u - acute'], + ['û', 'û', true, 'u - circumflex'], + ['ü', 'ü', true, 'u - diaeresis'], + ['ý', 'ý', true, 'y - acute'], + ['þ', 'þ', true, 'thorn'], + ['ÿ', 'ÿ', true, 'y - diaeresis'], + ['Α', 'Α', true, 'Alpha'], + ['Β', 'Β', true, 'Beta'], + ['Γ', 'Γ', true, 'Gamma'], + ['Δ', 'Δ', true, 'Delta'], + ['Ε', 'Ε', true, 'Epsilon'], + ['Ζ', 'Ζ', true, 'Zeta'], + ['Η', 'Η', true, 'Eta'], + ['Θ', 'Θ', true, 'Theta'], + ['Ι', 'Ι', true, 'Iota'], + ['Κ', 'Κ', true, 'Kappa'], + ['Λ', 'Λ', true, 'Lambda'], + ['Μ', 'Μ', true, 'Mu'], + ['Ν', 'Ν', true, 'Nu'], + ['Ξ', 'Ξ', true, 'Xi'], + ['Ο', 'Ο', true, 'Omicron'], + ['Π', 'Π', true, 'Pi'], + ['Ρ', 'Ρ', true, 'Rho'], + ['Σ', 'Σ', true, 'Sigma'], + ['Τ', 'Τ', true, 'Tau'], + ['Υ', 'Υ', true, 'Upsilon'], + ['Φ', 'Φ', true, 'Phi'], + ['Χ', 'Χ', true, 'Chi'], + ['Ψ', 'Ψ', true, 'Psi'], + ['Ω', 'Ω', true, 'Omega'], + ['α', 'α', true, 'alpha'], + ['β', 'β', true, 'beta'], + ['γ', 'γ', true, 'gamma'], + ['δ', 'δ', true, 'delta'], + ['ε', 'ε', true, 'epsilon'], + ['ζ', 'ζ', true, 'zeta'], + ['η', 'η', true, 'eta'], + ['θ', 'θ', true, 'theta'], + ['ι', 'ι', true, 'iota'], + ['κ', 'κ', true, 'kappa'], + ['λ', 'λ', true, 'lambda'], + ['μ', 'μ', true, 'mu'], + ['ν', 'ν', true, 'nu'], + ['ξ', 'ξ', true, 'xi'], + ['ο', 'ο', true, 'omicron'], + ['π', 'π', true, 'pi'], + ['ρ', 'ρ', true, 'rho'], + ['ς', 'ς', true, 'final sigma'], + ['σ', 'σ', true, 'sigma'], + ['τ', 'τ', true, 'tau'], + ['υ', 'υ', true, 'upsilon'], + ['φ', 'φ', true, 'phi'], + ['χ', 'χ', true, 'chi'], + ['ψ', 'ψ', true, 'psi'], + ['ω', 'ω', true, 'omega'], +// symbols + ['ℵ', 'ℵ', false,'alef symbol'], + ['ϖ', 'ϖ', false,'pi symbol'], + ['ℜ', 'ℜ', false,'real part symbol'], + ['ϑ','ϑ', false,'theta symbol'], + ['ϒ', 'ϒ', false,'upsilon - hook symbol'], + ['℘', '℘', false,'Weierstrass p'], + ['ℑ', 'ℑ', false,'imaginary part'], +// arrows + ['←', '←', true, 'leftwards arrow'], + ['↑', '↑', true, 'upwards arrow'], + ['→', '→', true, 'rightwards arrow'], + ['↓', '↓', true, 'downwards arrow'], + ['↔', '↔', true, 'left right arrow'], + ['↵', '↵', false,'carriage return'], + ['⇐', '⇐', false,'leftwards double arrow'], + ['⇑', '⇑', false,'upwards double arrow'], + ['⇒', '⇒', false,'rightwards double arrow'], + ['⇓', '⇓', false,'downwards double arrow'], + ['⇔', '⇔', false,'left right double arrow'], + ['∴', '∴', false,'therefore'], + ['⊂', '⊂', false,'subset of'], + ['⊃', '⊃', false,'superset of'], + ['⊄', '⊄', false,'not a subset of'], + ['⊆', '⊆', false,'subset of or equal to'], + ['⊇', '⊇', false,'superset of or equal to'], + ['⊕', '⊕', false,'circled plus'], + ['⊗', '⊗', false,'circled times'], + ['⊥', '⊥', false,'perpendicular'], + ['⋅', '⋅', false,'dot operator'], + ['⌈', '⌈', false,'left ceiling'], + ['⌉', '⌉', false,'right ceiling'], + ['⌊', '⌊', false,'left floor'], + ['⌋', '⌋', false,'right floor'], + ['⟨', '〈', false,'left-pointing angle bracket'], + ['⟩', '〉', false,'right-pointing angle bracket'], + ['◊', '◊', true,'lozenge'], + ['♠', '♠', false,'black spade suit'], + ['♣', '♣', true, 'black club suit'], + ['♥', '♥', true, 'black heart suit'], + ['♦', '♦', true, 'black diamond suit'], + [' ', ' ', false,'en space'], + [' ', ' ', false,'em space'], + [' ', ' ', false,'thin space'], + ['‌', '‌', false,'zero width non-joiner'], + ['‍', '‍', false,'zero width joiner'], + ['‎', '‎', false,'left-to-right mark'], + ['‏', '‏', false,'right-to-left mark'], + ['­', '­', false,'soft hyphen'] +]; + +function renderCharMapHTML() { + var charsPerRow = 20, tdWidth=20, tdHeight=20; + var html = ''; + var cols=-1; + for (var i=0; i' + + charmap[i][1] + + ''; + if ((cols+1) % charsPerRow == 0) + html += ''; + } + } + if (cols % charsPerRow > 0) { + var padd = charsPerRow - (cols % charsPerRow); + for (var i=0; i '; + } + html += '
    '; + document.write(html); +} + +function insertChar(chr) { + tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';'); + + // Refocus in window + if (tinyMCEPopup.isWindow) + window.focus(); + + tinyMCEPopup.close(); +} + +function previewChar(codeA, codeB, codeN) { + var elmA = document.getElementById('codeA'); + var elmB = document.getElementById('codeB'); + var elmV = document.getElementById('codeV'); + var elmN = document.getElementById('codeN'); + + if (codeA=='#160;') { + elmV.innerHTML = '__'; + } else { + elmV.innerHTML = '&' + codeA; + } + + elmB.innerHTML = '&' + codeA; + elmA.innerHTML = '&' + codeB; + elmN.innerHTML = codeN; +} Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/color_picker.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/color_picker.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/color_picker.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,108 @@ +function init() { + if (tinyMCE.isMSIE) + tinyMCEPopup.resizeToInnerSize(); +} + +function selectColor() { + var color = document.getElementById("selectedColorBox").value; + + tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color); + tinyMCEPopup.close(); +} + +function showColor(color) { + document.getElementById("selectedColor").style.backgroundColor = color; + document.getElementById("selectedColorBox").value = color; +} + +var colors = new Array( + "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", + "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", + "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", + "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", + "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", + "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", + "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", + "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", + "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", + "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", + "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", + "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", + "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", + "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", + "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", + "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", + "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", + "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", + "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", + "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", + "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", + "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", + "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", + "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", + "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", + "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", + "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" +); + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return "rgb(" + r + "," + g + "," + b + ")"; + } + + return col; +} + +function renderColorMap() { + var html = ""; + var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color')); + + html += '' + + ''; + for (var i=0; i' + + '' + + '' + colors[i] +  ''; + if ((i+1) % 18 == 0) + html += ''; + } + html += '' + + '
    ' + + '' + + '' + + '
    ' + + '' + + '' + + '' + + '
    ' + + '
    ' + + '
    ' + + '
    '; + + document.write(html); +} \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/image.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/image.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/jscripts/image.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,81 @@ +var url = tinyMCE.getParam("external_image_list_url"); +if (url != null) { + // Fix relative + if (url.charAt(0) != '/' && url.indexOf('://') == -1) + url = tinyMCE.documentBasePath + "/" + url; + + document.write(''); +} + +function insertImage() { + var src = document.forms[0].src.value; + var alt = document.forms[0].alt.value; + var border = document.forms[0].border.value; + var vspace = document.forms[0].vspace.value; + var hspace = document.forms[0].hspace.value; + var width = document.forms[0].width.value; + var height = document.forms[0].height.value; + var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value; + + tinyMCEPopup.restoreSelection(); + tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align); + tinyMCEPopup.close(); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); + + var formObj = document.forms[0]; + + for (var i=0; i 0) { + for (var i=0; i'); +} + +function init() { + tinyMCEPopup.resizeToInnerSize(); + + document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link'); + + // Handle file browser + if (isVisible('hrefbrowser')) + document.getElementById('href').style.width = '180px'; + + var formObj = document.forms[0]; + + for (var i=0; i 0) { + var formObj = document.forms[0]; + + for (var i=0; i + + {$lang_insert_link_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/source_editor.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/source_editor.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/themes/advanced/source_editor.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,32 @@ + + + + {$lang_theme_code_title} + + + + + +
    +
    {$lang_theme_code_title}
    + +
    + +
    + +
    + + + +
    +
    + +
    + +
    + +
    +
    +
    + + Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/tiny_mce.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/tiny_mce.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/tiny_mce.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1 @@ +function TinyMCE_Engine(){var ua;this.majorVersion="2";this.minorVersion="0.8";this.releaseDate="2006-10-23";this.instances=new Array();this.switchClassCache=new Array();this.windowArgs=new Array();this.loadedFiles=new Array();this.pendingFiles=new Array();this.loadingIndex=0;this.configs=new Array();this.currentConfig=0;this.eventHandlers=new Array();this.log=new Array();this.undoLevels=[];this.undoIndex=0;this.typingUndoIndex=-1;ua=navigator.userAgent;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(ua.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(ua.indexOf('MSIE 5.0')!=-1);this.isMSIE7=this.isMSIE&&(ua.indexOf('MSIE 7')!=-1);this.isGecko=ua.indexOf('Gecko')!=-1;this.isSafari=ua.indexOf('Safari')!=-1;this.isOpera=ua.indexOf('Opera')!=-1;this.isMac=ua.indexOf('Mac')!=-1;this.isNS7=ua.indexOf('Netscape/7')!=-1;this.isNS71=ua.indexOf('Netscape/7.1')!=-1;this.dialogCounter=0;this.plugins=new Array();this.themes=new Array();this.menus=new Array();this.loadedPlugins=new Array();this.buttonMap=new Array();this.isLoaded=false;if(this.isOpera){this.isMSIE=true;this.isGecko=false;this.isSafari=false}this.isIE=this.isMSIE;this.isRealIE=this.isMSIE&&!this.isOpera;this.idCounter=0};TinyMCE_Engine.prototype={init:function(settings){var theme,nl,baseHREF="",i;if(this.isMSIE5_0)return;this.settings=settings;if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');nl=document.getElementsByTagName('base');for(i=0;i');this._def("font_size_classes",'');this._def("font_size_style_values",'xx-small,x-small,small,medium,large,x-large,xx-large',true);this._def("event_elements",'a,img',true);this._def("convert_urls",true);this._def("table_inline_editing",false);this._def("object_resizing",true);this._def("custom_shortcuts",true);this._def("convert_on_click",false);this._def("content_css",'');this._def("fix_list_elements",false);this._def("fix_table_elements",false);this._def("strict_loading_mode",document.contentType=='application/xhtml+xml');this._def("hidden_tab_class",'');this._def("display_tab_class",'');this._def("gecko_spellcheck",false);if(this.isMSIE&&!this.isOpera)this.settings.strict_loading_mode=false;if(this.isMSIE&&this.settings['browsers'].indexOf('msie')==-1)return;if(this.isGecko&&this.settings['browsers'].indexOf('gecko')==-1)return;if(this.isSafari&&this.settings['browsers'].indexOf('safari')==-1)return;if(this.isOpera&&this.settings['browsers'].indexOf('opera')==-1)return;baseHREF=tinyMCE.settings['document_base_url'];var h=document.location.href;var p=h.indexOf('://');if(p>0&&document.location.protocol!="file:"){p=h.indexOf('/',p+3);h=h.substring(0,p);if(baseHREF.indexOf('://')==-1)baseHREF=h+baseHREF;tinyMCE.settings['document_base_url']=baseHREF;tinyMCE.settings['document_base_prefix']=h}if(baseHREF.indexOf('?')!=-1)baseHREF=baseHREF.substring(0,baseHREF.indexOf('?'));this.settings['base_href']=baseHREF.substring(0,baseHREF.lastIndexOf('/'))+"/";theme=this.settings['theme'];this.inlineStrict='A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment';this.inlineTransitional='A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment';this.blockElms='H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP';this.blockRegExp=new RegExp("^("+this.blockElms+")$","i");this.posKeyCodes=new Array(13,45,36,35,33,34,37,38,39,40);this.uniqueURL='javascript:TINYMCE_UNIQUEURL();';this.uniqueTag='';this.callbacks=new Array('onInit','getInfo','getEditorTemplate','setupContent','onChange','onPageLoad','handleNodeChange','initInstance','execCommand','getControlHTML','handleEvent','cleanup');this.settings['theme_href']=tinyMCE.baseURL+"/themes/"+theme;if(!tinyMCE.isIE||tinyMCE.isOpera)this.settings['force_br_newlines']=false;if(tinyMCE.getParam("popups_css",false)){var cssPath=tinyMCE.getParam("popups_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['popups_css']=this.documentBasePath+"/"+cssPath;else this.settings['popups_css']=cssPath}else this.settings['popups_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_popup.css";if(tinyMCE.getParam("editor_css",false)){var cssPath=tinyMCE.getParam("editor_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings['editor_css']=this.documentBasePath+"/"+cssPath;else this.settings['editor_css']=cssPath}else{if(this.settings.editor_css!='')this.settings['editor_css']=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_ui.css"}if(tinyMCE.settings['debug']){var msg="Debug: \n";msg+="baseURL: "+this.baseURL+"\n";msg+="documentBasePath: "+this.documentBasePath+"\n";msg+="content_css: "+this.settings['content_css']+"\n";msg+="popups_css: "+this.settings['popups_css']+"\n";msg+="editor_css: "+this.settings['editor_css']+"\n";alert(msg)}if(this.configs.length==0){if(typeof(TinyMCECompressed)=="undefined"){tinyMCE.addEvent(window,"DOMContentLoaded",TinyMCE_Engine.prototype.onLoad);if(tinyMCE.isRealIE){if(document.body)tinyMCE.addEvent(document.body,"readystatechange",TinyMCE_Engine.prototype.onLoad);else tinyMCE.addEvent(document,"readystatechange",TinyMCE_Engine.prototype.onLoad)}tinyMCE.addEvent(window,"load",TinyMCE_Engine.prototype.onLoad);tinyMCE._addUnloadEvents()}}this.loadScript(tinyMCE.baseURL+'/themes/'+this.settings['theme']+'/editor_template'+tinyMCE.srcMode+'.js');this.loadScript(tinyMCE.baseURL+'/langs/'+this.settings['language']+'.js');this.loadCSS(this.settings['editor_css']);var p=tinyMCE.getParam('plugins','',true,',');if(p.length>0){for(var i=0;i');this.loadedFiles[this.loadedFiles.length]=url},loadNextScript:function(){var d=document,se;if(!tinyMCE.settings.strict_loading_mode)return;if(this.loadingIndex0){for(i=0,lflen=this.loadedFiles.length;i');this.loadedFiles[this.loadedFiles.length]=ar[x]}}}},importCSS:function(doc,css){var css_ary=css.replace(/\s+/,'').split(',');var csslen,elm,headArr,x,css_file;for(x=0,csslen=css_ary.length;x0){if(css_file.indexOf('://')==-1&&css_file.charAt(0)!='/')css_file=this.documentBasePath+"/"+css_file;if(typeof(doc.createStyleSheet)=="undefined"){elm=doc.createElement("link");elm.rel="stylesheet";elm.href=css_file;if((headArr=doc.getElementsByTagName("head"))!=null&&headArr.length>0)headArr[0].appendChild(elm)}else doc.createStyleSheet(css_file)}}},confirmAdd:function(e,settings){var elm=tinyMCE.isIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;tinyMCE.settings=settings;if(tinyMCE.settings['convert_on_click']||(!elm.getAttribute('mce_noask')&&confirm(tinyMCELang['lang_edit_confirm'])))tinyMCE.addMCEControl(elm,elementId);elm.setAttribute('mce_noask','true')},updateContent:function(form_element_name){var formElement=document.getElementById(form_element_name);for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();if(inst.formElement==formElement){var doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isIE)doc.body.innerHTML=tinyMCE._cleanupHTML(inst,doc,this.settings,doc.body,inst.visualAid)}}},addMCEControl:function(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCE_Control(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst._onAdd(replace_element,form_element_name,target_document)},removeInstance:function(ti){var t=[],n,i;for(n in tinyMCE.instances){i=tinyMCE.instances[n];if(tinyMCE.isInstance(i)&&ti!=i)t[n]=i}tinyMCE.instances=t;n=[];t=tinyMCE.undoLevels;for(i=0;i0){tinyMCE.nextUndoRedoAction='Undo';inst=this.undoLevels[--this.undoIndex];inst.select();if(!tinyMCE.nextUndoRedoInstanceId)inst.execCommand('Undo')}}else inst.execCommand('Undo');return true;case"Redo":if(this.getParam('custom_undo_redo_global')){if(this.undoIndex<=this.undoLevels.length-1){tinyMCE.nextUndoRedoAction='Redo';inst=this.undoLevels[this.undoIndex++];inst.select();if(!tinyMCE.nextUndoRedoInstanceId)inst.execCommand('Redo')}}else inst.execCommand('Redo');return true;case'mceFocus':var inst=tinyMCE.getInstanceById(value);if(inst)inst.getWin().focus();return;case"mceAddControl":case"mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value);return;case"mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(value['element'],value['document']),value['element'],value['document']);return;case"mceRemoveControl":case"mceRemoveEditor":tinyMCE.removeMCEControl(value);return;case"mceResetDesignMode":if(!tinyMCE.isIE){for(var n in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[n]))continue;try{tinyMCE.instances[n].getDoc().designMode="on"}catch(e){}}}return}if(inst){inst.execCommand(command,user_interface,value)}else if(tinyMCE.settings['focus_alert'])alert(tinyMCELang['lang_focus_alert'])},_createIFrame:function(replace_element,doc,win){var iframe,id=replace_element.getAttribute("id");var aw,ah;if(typeof(doc)=="undefined")doc=document;if(typeof(win)=="undefined")win=window;iframe=doc.createElement("iframe");aw=""+tinyMCE.settings['area_width'];ah=""+tinyMCE.settings['area_height'];if(aw.indexOf('%')==-1){aw=parseInt(aw);aw=(isNaN(aw)||aw<0)?300:aw;aw=aw+"px"}if(ah.indexOf('%')==-1){ah=parseInt(ah);ah=(isNaN(ah)||ah<0)?240:ah;ah=ah+"px"}iframe.setAttribute("id",id);iframe.setAttribute("name",id);iframe.setAttribute("class","mceEditorIframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",aw);iframe.setAttribute("height",ah);iframe.setAttribute("allowtransparency","true");iframe.className='mceEditorIframe';if(tinyMCE.settings["auto_resize"])iframe.setAttribute("scrolling","no");if(tinyMCE.isRealIE)iframe.setAttribute("src",this.settings['default_document']);iframe.style.width=aw;iframe.style.height=ah;if(tinyMCE.settings.strict_loading_mode)iframe.style.marginBottom='-5px';if(tinyMCE.isRealIE)replace_element.outerHTML=iframe.outerHTML;else replace_element.parentNode.replaceChild(iframe,replace_element);if(tinyMCE.isRealIE)return win.frames[id];else return iframe},setupContent:function(editor_id){var inst=tinyMCE.instances[editor_id],i;var doc=inst.getDoc();var head=doc.getElementsByTagName('head').item(0);var content=inst.startContent;if(tinyMCE.settings.strict_loading_mode){content=content.replace(/</g,'<');content=content.replace(/>/g,'>');content=content.replace(/"/g,'"');content=content.replace(/&/g,'&')}inst.switchSettings();if(!tinyMCE.isIE&&tinyMCE.getParam("setupcontent_reload",false)&&doc.title!="blank_page"){try{doc.location.href=tinyMCE.baseURL+"/blank.htm"}catch(ex){}window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",1000);return}if(!head){window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",10);return}tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/themes/"+inst.settings['theme']+"/css/editor_content.css");tinyMCE.importCSS(inst.getDoc(),inst.settings['content_css']);tinyMCE.dispatchCallback(inst,'init_instance_callback','initInstance',inst);if(tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')){inst.addShortcut('ctrl','z','lang_undo_desc','Undo');inst.addShortcut('ctrl','y','lang_redo_desc','Redo')}for(i=1;i<=6;i++)inst.addShortcut('ctrl',''+i,'','FormatBlock',false,'');inst.addShortcut('ctrl','7','','FormatBlock',false,'

    ');inst.addShortcut('ctrl','8','','FormatBlock',false,'

    ');inst.addShortcut('ctrl','9','','FormatBlock',false,'
    ');if(tinyMCE.isGecko){inst.addShortcut('ctrl','b','lang_bold_desc','Bold');inst.addShortcut('ctrl','i','lang_italic_desc','Italic');inst.addShortcut('ctrl','u','lang_underline_desc','Underline')}if(tinyMCE.getParam("convert_fonts_to_spans"))inst.getBody().setAttribute('id','mceSpanFonts');if(tinyMCE.settings['nowrap'])doc.body.style.whiteSpace="nowrap";doc.body.dir=this.settings['directionality'];doc.editorId=editor_id;if(!tinyMCE.isIE)doc.documentElement.editorId=editor_id;inst.setBaseHREF(tinyMCE.settings['base_href']);if(tinyMCE.settings['convert_newlines_to_brs']){content=tinyMCE.regexpReplace(content,"\r\n","
    ","gi");content=tinyMCE.regexpReplace(content,"\r","
    ","gi");content=tinyMCE.regexpReplace(content,"\n","
    ","gi")}content=tinyMCE.storeAwayURLs(content);content=tinyMCE._customCleanup(inst,"insert_to_editor",content);if(tinyMCE.isIE){window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["'+editor_id+'"].getDoc(), "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings["force_br_newlines"])doc.styleSheets[0].addRule("p","margin: 0;");var body=inst.getBody();body.editorId=editor_id}content=tinyMCE.cleanupHTMLCode(content);if(!tinyMCE.isIE){var contentElement=inst.getDoc().createElement("body");var doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.isGecko&&tinyMCE.settings['remove_lt_gt'])content=content.replace(new RegExp('<>','g'),"");if(tinyMCE.settings['cleanup_on_startup'])tinyMCE.setInnerHTML(inst.getBody(),tinyMCE._cleanupHTML(inst,doc,this.settings,contentElement));else tinyMCE.setInnerHTML(inst.getBody(),content);tinyMCE.convertAllRelativeURLs(inst.getBody())}else{if(tinyMCE.settings['cleanup_on_startup']){tinyMCE._setHTML(inst.getDoc(),content);eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}')}else tinyMCE._setHTML(inst.getDoc(),content)}var parentElm=inst.targetDoc.getElementById(inst.editorId+'_parent');inst.formElement=tinyMCE.isGecko?parentElm.previousSibling:parentElm.nextSibling;tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings['visual'],inst);tinyMCE.dispatchCallback(inst,'setupcontent_callback','setupContent',editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isIE)tinyMCE.addEventHandlers(inst);if(tinyMCE.isIE){tinyMCE.addEvent(inst.getBody(),"blur",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(inst.getBody(),"beforedeactivate",TinyMCE_Engine.prototype._eventPatch);if(!tinyMCE.isOpera){tinyMCE.addEvent(doc.body,"mousemove",TinyMCE_Engine.prototype.onMouseMove);tinyMCE.addEvent(doc.body,"beforepaste",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc.body,"drop",TinyMCE_Engine.prototype._eventPatch)}}inst.select();tinyMCE.selectedElement=inst.contentWindow.document.body;tinyMCE._customCleanup(inst,"insert_to_editor_dom",inst.getBody());tinyMCE._customCleanup(inst,"setup_content_dom",inst.getBody());tinyMCE._setEventsEnabled(inst.getBody(),false);tinyMCE.cleanupAnchors(inst.getDoc());if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(inst.getDoc());inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);inst.undoRedo.add({content:inst.startContent});if(tinyMCE.isGecko){tinyMCE.selectNodes(inst.getBody(),function(n){if(n.nodeType==3||n.nodeType==8)n.nodeValue=n.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)=\"[^\"]*\"','gi'),"");return false})}if(tinyMCE.isGecko)inst.getBody().spellcheck=tinyMCE.getParam("gecko_spellcheck");tinyMCE._removeInternal(inst.getBody());inst.select();tinyMCE.triggerNodeChange(false,true)},storeAwayURLs:function(s){if(!s.match(/(mce_src|mce_href)/gi,s)){s=s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"','gi'),'src="$1" mce_src="$1"');s=s.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"','gi'),'href="$1" mce_href="$1"')}return s},_removeInternal:function(n){if(tinyMCE.isGecko){tinyMCE.selectNodes(n,function(n){if(n.nodeType==3||n.nodeType==8)n.nodeValue=n.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)=\"[^\"]*\"','gi'),"");return false})}},handleEvent:function(e){var inst=tinyMCE.selectedInstance;if(typeof(tinyMCE)=="undefined")return true;if(tinyMCE.executeCallback(tinyMCE.selectedInstance,'handle_event_callback','handleEvent',e))return false;switch(e.type){case"beforedeactivate":case"blur":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.execCommand('mceEndTyping');tinyMCE.hideMenus();return;case"drop":case"beforepaste":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.setBaseHREF(null);if(tinyMCE.isRealIE){var ife=tinyMCE.selectedInstance.iframeElement;if(ife.style.height.indexOf('%')!=-1){ife._oldHeight=ife.style.height;ife.style.height=ife.clientHeight}}window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings['base_href']);tinyMCE._resetIframeHeight();",1);return;case"submit":tinyMCE.triggerSave();tinyMCE.isNotDirty=true;return;case"reset":var formObj=tinyMCE.isIE?window.event.srcElement:e.target;for(var i=0;i");rng.collapse(false);rng.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false)}return false;break;case"keyup":case"keydown":tinyMCE.hideMenus();tinyMCE.hasMouseMoved=false;if(inst&&inst.handleShortcut(e))return false;if(e.target.editorId)tinyMCE.instances[e.target.editorId].select();if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();var inst=tinyMCE.selectedInstance;if(tinyMCE.isGecko&&tinyMCE.settings['force_p_newlines']&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,e.type)){tinyMCE.execCommand("mceAddUndoLevel");e.preventDefault();return false}}tinyMCE.selectedElement=null;tinyMCE.selectedNode=null;var elm=tinyMCE.selectedInstance.getFocusElement();tinyMCE.linkElement=tinyMCE.getParentElement(elm,"a");tinyMCE.imgElement=tinyMCE.getParentElement(elm,"img");tinyMCE.selectedElement=elm;if(tinyMCE.isGecko&&e.type=="keyup"&&e.keyCode==9)tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(),true,tinyMCE.settings['visual'],tinyMCE.selectedInstance);if(tinyMCE.isIE&&e.type=="keydown"&&e.keyCode==13)tinyMCE.enterKeyElement=tinyMCE.selectedInstance.getFocusElement();if(tinyMCE.isIE&&e.type=="keyup"&&e.keyCode==13){var elm=tinyMCE.enterKeyElement;if(elm){var re=new RegExp('^HR|IMG|BR$','g');var dre=new RegExp('^H[1-6]$','g');if(!elm.hasChildNodes()&&!re.test(elm.nodeName)){if(dre.test(elm.nodeName))elm.innerHTML="  ";else elm.innerHTML=" "}}}var keys=tinyMCE.posKeyCodes;var posKey=false;for(var i=0;i';h+='';h+=''}else{h+='';h+='';h+=''}return h},getMenuButtonHTML:function(id,lang,img,mcmd,cmd,ui,val){var h='',m,x;mcmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+mcmd+'\');';cmd='tinyMCE.execInstanceCommand(\'{$editor_id}\',\''+cmd+'\'';if(typeof(ui)!="undefined"&&ui!=null)cmd+=','+ui;if(typeof(val)!="undefined"&&val!=null)cmd+=",'"+val+"'";cmd+=');';if(tinyMCE.getParam('button_tile_map')&&(!tinyMCE.isIE||tinyMCE.isOpera)&&(m=tinyMCE.buttonMap[id])!=null&&(tinyMCE.getParam("language")=="en"||img.indexOf('$lang')==-1)){x=0-(m*20)==0?'0':0-(m*20);if(tinyMCE.isRealIE)h+='';else h+='';h+='';h+='';h+='';h+=''}else{if(tinyMCE.isRealIE)h+='';else h+='';h+='';h+='';h+='';h+=''}return h},_menuButtonEvent:function(e,o){if(o.className=='mceMenuButtonFocus')return;if(e=='over')o.className=o.className+' mceMenuHover';else o.className=o.className.replace(/\s.*$/,'')},addButtonMap:function(m){var i,a=m.replace(/\s+/,'').split(',');for(i=0;i0);if(tinyMCE.settings['custom_undo_redo']){undoIndex=inst.undoRedo.undoIndex;undoLevels=inst.undoRedo.undoLevels.length}tinyMCE.dispatchCallback(inst,'handle_node_change_callback','handleNodeChange',editorId,elm,undoIndex,undoLevels,inst.visualAid,anySelection,setup_content)}if(this.selectedInstance&&(typeof(focus)=="undefined"||focus))this.selectedInstance.contentWindow.focus()},_customCleanup:function(inst,type,content){var pl,po,i;var customCleanup=tinyMCE.settings['cleanup_callback'];if(customCleanup!=""&&eval("typeof("+customCleanup+")")!="undefined")content=eval(customCleanup+"(type, content, inst);");po=tinyMCE.themes[tinyMCE.settings['theme']];if(po&&po.cleanup)content=po.cleanup(type,content,inst);pl=inst.plugins;for(i=0;i0)className+=" ";className+=classNames[i]}return className},handleVisualAid:function(el,deep,state,inst,skip_dispatch){if(!el)return;if(!skip_dispatch)tinyMCE.dispatchCallback(inst,'handle_visual_aid_callback','handleVisualAid',el,deep,state,inst);var tableElement=null;switch(el.nodeName){case"TABLE":var oldW=el.style.width;var oldH=el.style.height;var bo=tinyMCE.getAttrib(el,"border");bo=bo==""||bo=="0"?true:false;tinyMCE.setAttrib(el,"class",tinyMCE.getVisualAidClass(tinyMCE.getAttrib(el,"class"),state&&bo));el.style.width=oldW;el.style.height=oldH;for(var y=0;y0){for(var x=0;x0)tinyMCE.cssClasses=output;return output},regexpReplace:function(in_str,reg_exp,replace_str,opts){if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';var re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str)},trim:function(s){return s.replace(/^\s*|\s*$/g,"")},cleanupEventStr:function(s){s=""+s;s=s.replace('function anonymous()\n{\n','');s=s.replace('\n}','');s=s.replace(/^return true;/gi,'');return s},getControlHTML:function(c){var i,l,n,o,v;l=tinyMCE.plugins;for(n in l){o=l[n];if(o.getControlHTML&&(v=o.getControlHTML(c))!='')return tinyMCE.replaceVar(v,"pluginurl",o.baseURL)}o=tinyMCE.themes[tinyMCE.settings['theme']];if(o.getControlHTML&&(v=o.getControlHTML(c))!='')return v;return''},evalFunc:function(f,idx,a,o){var s='(',i;for(i=idx;i0)return true;if(ins!=null){for(i=0,l=ins.plugins;i0)return true}}l=tinyMCE.themes;for(on in l){o=l[on];if(o[n]&&(v=tinyMCE.evalFunc(n,3,a,o))==s&&m>0)return true}return false},xmlEncode:function(s){return s?(''+s).replace(new RegExp('[<>&"\']','g'),function(c,b){switch(c){case'&':return'&';case'"':return'"';case'\'':return''';case'<':return'<';case'>':return'>'}return c}):s},extend:function(p,np){var o={};o.parent=p;for(n in p)o[n]=p[n];for(n in np)o[n]=np[n];return o},hideMenus:function(){var e=tinyMCE.lastSelectedMenuBtn;if(tinyMCE.lastMenu){tinyMCE.lastMenu.hide();tinyMCE.lastMenu=null}if(e){tinyMCE.switchClass(e,tinyMCE.lastMenuBtnClass);tinyMCE.lastSelectedMenuBtn=null}}};var TinyMCE=TinyMCE_Engine;var tinyMCE=new TinyMCE_Engine();var tinyMCELang={};function TinyMCE_Control(settings){var t,i,to,fu,p,x,fn,fu,pn,s=settings;this.undoRedoLevel=true;this.isTinyMCE_Control=true;this.settings=s;this.settings['theme']=tinyMCE.getParam("theme","default");this.settings['width']=tinyMCE.getParam("width",-1);this.settings['height']=tinyMCE.getParam("height",-1);this.selection=new TinyMCE_Selection(this);this.undoRedo=new TinyMCE_UndoRedo(this);this.cleanup=new TinyMCE_Cleanup();this.shortcuts=new Array();this.hasMouseMoved=false;this.foreColor=this.backColor="#999999";this.data={};this.cleanup.init({valid_elements:s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,entities:s.entities,entity_encoding:s.entity_encoding,debug:s.cleanup_debug,url_converter:'TinyMCE_Cleanup.prototype._urlConverter',indent:s.apply_source_formatting,invalid_elements:s.invalid_elements,verify_html:s.verify_html,fix_content_duplication:s.fix_content_duplication});t=this.settings['theme'];if(!tinyMCE.hasTheme(t)){fn=tinyMCE.callbacks;to={};for(i=0;i0){for(i=0;i1&&tinyMCE.currentConfig!=this.settings['index']){tinyMCE.settings=this.settings;tinyMCE.currentConfig=this.settings['index']}},select:function(){var oldInst=tinyMCE.selectedInstance;if(oldInst!=this){if(oldInst)oldInst.execCommand('mceEndTyping');tinyMCE.dispatchCallback(this,'select_instance_callback','selectInstance',this,oldInst);tinyMCE.selectedInstance=this}},getBody:function(){return this.contentBody?this.contentBody:this.getDoc().body},getDoc:function(){return this.contentWindow.document},getWin:function(){return this.contentWindow},getContainerWin:function(){return this.containerWindow?this.containerWindow:window},getViewPort:function(){return tinyMCE.getViewPort(this.getWin())},getParentNode:function(n,f){return tinyMCE.getParentNode(n,f,this.getBody())},getParentElement:function(n,na,f){return tinyMCE.getParentElement(n,na,f,this.getBody())},getParentBlockElement:function(n){return tinyMCE.getParentBlockElement(n,this.getBody())},resizeToContent:function(){var d=this.getDoc(),b=d.body,de=d.documentElement;this.iframeElement.style.height=(tinyMCE.isRealIE)?b.scrollHeight:de.offsetHeight+'px'},addShortcut:function(m,k,d,cmd,ui,va){var n=typeof(k)=="number",ie=tinyMCE.isIE,c,sc,i,scl=this.shortcuts;if(!tinyMCE.getParam('custom_shortcuts'))return false;m=m.toLowerCase();k=ie&&!n?k.toUpperCase():k;c=n?null:k.charCodeAt(0);d=d&&d.indexOf('lang_')==0?tinyMCE.getLang(d):d;sc={alt:m.indexOf('alt')!=-1,ctrl:m.indexOf('ctrl')!=-1,shift:m.indexOf('shift')!=-1,charCode:c,keyCode:n?k:(ie?c:null),desc:d,cmd:cmd,ui:ui,val:va};for(i=0;i0)rng.pasteHTML('
    '+rng.htmlText+"
    ");tinyMCE.triggerNodeChange();return}}}switch(command){case"mceRepaint":this.repaint();return true;case"unlink":if(tinyMCE.isGecko&&this.getSel().isCollapsed){focusElm=tinyMCE.getParentElement(focusElm,'A');if(focusElm)this.selection.selectNode(focusElm,false)}this.getDoc().execCommand(command,user_interface,value);tinyMCE.isGecko&&this.getSel().collapseToEnd();tinyMCE.triggerNodeChange();return true;case"FormatBlock":if(!this.cleanup.isValid(value))return true;this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"InsertUnorderedList":case"InsertOrderedList":this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"Strikethrough":this.getDoc().execCommand(command,user_interface,value);tinyMCE.triggerNodeChange();break;case"mceSelectNode":this.selection.selectNode(value);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=value;break;case"FormatBlock":if(value==null||value==""){var elm=tinyMCE.getParentElement(this.getFocusElement(),"p,div,h1,h2,h3,h4,h5,h6,pre,address,blockquote,dt,dl,dd,samp");if(elm)this.execCommand("mceRemoveNode",false,elm)}else{if(tinyMCE.isGecko&&new RegExp('<(div|blockquote|code|dt|dd|dl|samp)>','gi').test(value))value=value.replace(/[^a-z]/gi,'');if(tinyMCE.isIE&&new RegExp('blockquote|code|samp','gi').test(value)){var b=this.selection.getBookmark();this.getDoc().execCommand("FormatBlock",false,'

    ');tinyMCE.renameElement(tinyMCE.getParentBlockElement(this.getFocusElement()),value);this.selection.moveToBookmark(b)}else this.getDoc().execCommand("FormatBlock",false,value)}tinyMCE.triggerNodeChange();break;case"mceRemoveNode":if(!value)value=tinyMCE.getParentElement(this.getFocusElement());if(tinyMCE.isIE){value.outerHTML=value.innerHTML}else{var rng=value.ownerDocument.createRange();rng.setStartBefore(value);rng.setEndAfter(value);rng.deleteContents();rng.insertNode(rng.createContextualFragment(value.innerHTML))}tinyMCE.triggerNodeChange();break;case"mceSelectNodeDepth":var parentNode=this.getFocusElement();for(var i=0;parentNode;i++){if(parentNode.nodeName.toLowerCase()=="body")break;if(parentNode.nodeName.toLowerCase()=="#text"){i--;parentNode=parentNode.parentNode;continue}if(i==value){this.selection.selectNode(parentNode,false);tinyMCE.triggerNodeChange();tinyMCE.selectedNode=parentNode;return}parentNode=parentNode.parentNode}break;case"SetStyleInfo":var rng=this.getRng();var sel=this.getSel();var scmd=value['command'];var sname=value['name'];var svalue=value['value']==null?'':value['value'];var wrapper=value['wrapper']?value['wrapper']:"span";var parentElm=null;var invalidRe=new RegExp("^BODY|HTML$","g");var invalidParentsRe=tinyMCE.settings['merge_styles_invalid_parents']!=''?new RegExp(tinyMCE.settings['merge_styles_invalid_parents'],"gi"):null;if(tinyMCE.isIE){if(rng.item)parentElm=rng.item(0);else{var pelm=rng.parentElement();var prng=doc.selection.createRange();prng.moveToElementText(pelm);if(rng.htmlText==prng.htmlText||rng.boundingWidth==0){if(invalidParentsRe==null||!invalidParentsRe.test(pelm.nodeName))parentElm=pelm}}}else{var felm=this.getFocusElement();if(sel.isCollapsed||(new RegExp('td|tr|tbody|table','gi').test(felm.nodeName)&&sel.anchorNode==felm.parentNode))parentElm=felm}if(parentElm&&!invalidRe.test(parentElm.nodeName)){if(scmd=="setstyle")tinyMCE.setStyleAttrib(parentElm,sname,svalue);if(scmd=="setattrib")tinyMCE.setAttrib(parentElm,sname,svalue);if(scmd=="removeformat"){parentElm.style.cssText='';tinyMCE.setAttrib(parentElm,'class','')}var ch=tinyMCE.getNodeTree(parentElm,new Array(),1);for(var z=0;z=0;i--){var elm=nodes[i];var isNew=tinyMCE.getAttrib(elm,"mce_new")=="true";elm.removeAttribute("mce_new");if(elm.childNodes&&elm.childNodes.length==1&&elm.childNodes[0].nodeType==1){this._mergeElements(scmd,elm,elm.childNodes[0],isNew);continue}if(elm.parentNode.childNodes.length==1&&!invalidRe.test(elm.nodeName)&&!invalidRe.test(elm.parentNode.nodeName)){if(invalidParentsRe==null||!invalidParentsRe.test(elm.parentNode.nodeName))this._mergeElements(scmd,elm.parentNode,elm,false)}}var nodes=doc.getElementsByTagName(wrapper);for(var i=nodes.length-1;i>=0;i--){var elm=nodes[i];var isEmpty=true;var tmp=doc.createElement("body");tmp.appendChild(elm.cloneNode(false));tmp.innerHTML=tmp.innerHTML.replace(new RegExp('style=""|class=""','gi'),'');if(new RegExp('','gi').test(tmp.innerHTML)){for(var x=0;x0){value=tinyMCE.replaceVar(value,"selection",selectedText);tinyMCE.execCommand('mceInsertContent',false,value)}tinyMCE.triggerNodeChange();break;case"mceSetAttribute":if(typeof(value)=='object'){var targetElms=(typeof(value['targets'])=="undefined")?"p,img,span,div,td,h1,h2,h3,h4,h5,h6,pre,address":value['targets'];var targetNode=tinyMCE.getParentElement(this.getFocusElement(),targetElms);if(targetNode){targetNode.setAttribute(value['name'],value['value']);tinyMCE.triggerNodeChange()}}break;case"mceSetCSSClass":this.execCommand("SetStyleInfo",false,{command:"setattrib",name:"class",value:value});break;case"mceInsertRawHTML":var key='tiny_mce_marker';this.execCommand('mceBeginUndoLevel');this.execCommand('mceInsertContent',false,key);var scrollX=this.getBody().scrollLeft+this.getDoc().documentElement.scrollLeft;var scrollY=this.getBody().scrollTop+this.getDoc().documentElement.scrollTop;var html=this.getBody().innerHTML;if((pos=html.indexOf(key))!=-1)tinyMCE.setInnerHTML(this.getBody(),html.substring(0,pos)+value+html.substring(pos+key.length));this.contentWindow.scrollTo(scrollX,scrollY);this.execCommand('mceEndUndoLevel');break;case"mceInsertContent":if(!value)value='';var insertHTMLFailed=false;if(tinyMCE.isGecko||tinyMCE.isOpera){try{if(value.indexOf('<')==-1&&!value.match(/(&| |<|>)/g)){var r=this.getRng();var n=this.getDoc().createTextNode(tinyMCE.entityDecode(value));var s=this.getSel();var r2=r.cloneRange();s.removeAllRanges();r.deleteContents();r.insertNode(n);r2.selectNode(n);r2.collapse(false);s.removeAllRanges();s.addRange(r2)}else{value=tinyMCE.fixGeckoBaseHREFBug(1,this.getDoc(),value);this.getDoc().execCommand('inserthtml',false,value);tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value)}}catch(ex){insertHTMLFailed=true}if(!insertHTMLFailed){tinyMCE.triggerNodeChange();return}}if(!tinyMCE.isIE){var isHTML=value.indexOf('<')!=-1;var sel=this.getSel();var rng=this.getRng();if(isHTML){if(tinyMCE.isSafari){var tmpRng=this.getDoc().createRange();tmpRng.setStart(this.getBody(),0);tmpRng.setEnd(this.getBody(),0);value=tmpRng.createContextualFragment(value)}else value=rng.createContextualFragment(value)}else{var el=document.createElement("div");el.innerHTML=value;value=el.firstChild.nodeValue;value=doc.createTextNode(value)}if(tinyMCE.isSafari&&!isHTML){this.execCommand('InsertText',false,value.nodeValue);tinyMCE.triggerNodeChange();return true}else if(tinyMCE.isSafari&&isHTML){rng.deleteContents();rng.insertNode(value);tinyMCE.triggerNodeChange();return true}rng.deleteContents();if(rng.startContainer.nodeType==3){var node=rng.startContainer.splitText(rng.startOffset);node.parentNode.insertBefore(value,node)}else rng.insertNode(value);if(!isHTML){sel.selectAllChildren(doc.body);sel.removeAllRanges();var rng=doc.createRange();rng.selectNode(value);rng.collapse(false);sel.addRange(rng)}else rng.collapse(false);tinyMCE.fixGeckoBaseHREFBug(2,this.getDoc(),value)}else{var rng=doc.selection.createRange(),tmpRng=null;var c=value.indexOf('"}if(hc){cn=n.childNodes;for(i=0,l=cn.length;i';return h},_serializeAttribute:function(n,r,an){var av='',t,os=this.settings.on_save;if(os&&(an.indexOf('mce_')==0||an.indexOf('_moz')==0))return'';if(os&&this.mceAttribs[an])av=this._getAttrib(n,this.mceAttribs[an]);if(av.length==0)av=this._getAttrib(n,an);if(av.length==0&&r.defaultAttribs&&(t=r.defaultAttribs[an])){av=t;if(av=="mce_empty")return" "+an+'=""'}if(r.forceAttribs&&(t=r.forceAttribs[an]))av=t;if(os&&av.length!=0&&this.settings.url_converter.length!=0&&/^(src|href|longdesc)$/.test(an))av=eval(this.settings.url_converter+'(this, n, av)');if(av.length!=0&&r.validAttribValues&&r.validAttribValues[an]&&!r.validAttribValues[an].test(av))return"";if(av.length!=0&&av=="{$uid}")av="uid_"+(this.idCount++);if(av.length!=0){if(an.indexOf('on')!=0)av=this.xmlEncode(av);return" "+an+"="+'"'+av+'"'}return""},formatHTML:function(h){var s=this.settings,p='',i=0,li=0,o='',l;h=h.replace(/]*)>(.*?)<\/pre>/gi,function(a,b,c){c=c.replace(//gi,'\n');return''+c+''});h=h.replace(/\r/g,'');h='\n'+h;h=h.replace(new RegExp('\\n\\s+','gi'),'\n');h=h.replace(this.nlBeforeRe,'\n<$1$2>');h=h.replace(this.nlAfterRe,'<$1$2>\n');h=h.replace(this.nlBeforeAfterRe,'\n<$1$2$3>\n');h+='\n';while((i=h.indexOf('\n',i+1))!=-1){if((l=h.substring(li+1,i)).length!=0){if(this.ouRe.test(l)&&p.length>=s.indent_levels)p=p.substring(s.indent_levels);o+=p+l+'\n';if(this.inRe.test(l))p+=this.inStr}li=i}return o},xmlEncode:function(s){var cl=this;this._setupEntities();switch(this.settings.entity_encoding){case"raw":return tinyMCE.xmlEncode(s);case"named":return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']','g'),function(c,b){b=cl.entities[c.charCodeAt(0)];return b?'&'+b+';':c});case"numeric":return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']','g'),function(c,b){return b?'&#'+c.charCodeAt(0)+';':c})}return s},split:function(re,s){var c=s.split(re);var i,l,o=new Array();for(i=0,l=c.length;i':'>'+h+'';return o};TinyMCE_Engine.prototype.createTag=function(d,tn,a,h){var o=d.createElement(tn);if(a){for(n in a){if(typeof(a[n])!='function'&&a[n]!=null)tinyMCE.setAttrib(o,n,a[n])}}if(h)o.innerHTML=h;return o};TinyMCE_Engine.prototype.getElementByAttributeValue=function(n,e,a,v){return(n=this.getElementsByAttributeValue(n,e,a,v)).length==0?null:n[0]};TinyMCE_Engine.prototype.getElementsByAttributeValue=function(n,e,a,v){var i,nl=n.getElementsByTagName(e),o=new Array();for(i=0;i/gi,'');h=h.replace(/<\/em>/gi,'')}if(tinyMCE.isRealIE){h=h.replace(/\s\/>/g,'>');h=h.replace(/]*)>\u00A0?<\/p>/gi,' 

    ');h=h.replace(/]*)>\s* \s*<\/p>/gi,' 

    ');h=h.replace(/]*)>\s+<\/p>/gi,' 

    ');e.innerHTML=tinyMCE.uniqueTag+h;e.firstChild.removeNode(true);nl=e.getElementsByTagName("p");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.nodeName=='P'&&!n.hasChildNodes()&&!n.mce_keep)n.parentNode.removeChild(n)}}else{h=this.fixGeckoBaseHREFBug(1,e,h);e.innerHTML=h;this.fixGeckoBaseHREFBug(2,e,h)}};TinyMCE_Engine.prototype.getOuterHTML=function(e){if(tinyMCE.isIE)return e.outerHTML;var d=e.ownerDocument.createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML};TinyMCE_Engine.prototype.setOuterHTML=function(e,h,d){var d=typeof(d)=="undefined"?e.ownerDocument:d,i,nl,t;if(tinyMCE.isIE&&e.nodeType==1)e.outerHTML=h;else{t=d.createElement("body");t.innerHTML=h;for(i=0,nl=t.childNodes;i-1;i--){if(ar[i].specified&&ar[i].nodeValue)ne.setAttribute(ar[i].nodeName.toLowerCase(),ar[i].nodeValue)}ar=e.childNodes;for(i=0;i=strTok2.length){for(var i=0;i=strTok2.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break}}}if(strTok1.length=strTok1.length||strTok1[i]!=strTok2[i]){breakPoint=i+1;break}}}if(breakPoint==1)return targetURL.path;for(var i=0;i<(strTok1.length-(breakPoint-1));i++)outPath+="../";for(var i=breakPoint-1;i=0;i--){if(baseURLParts[i].length==0)continue;newBaseURLParts[newBaseURLParts.length]=baseURLParts[i]}baseURLParts=newBaseURLParts.reverse();var newRelURLParts=new Array();var numBack=0;for(var i=relURLParts.length-1;i>=0;i--){if(relURLParts[i].length==0||relURLParts[i]==".")continue;if(relURLParts[i]=='..'){numBack++;continue}if(numBack>0){numBack--;continue}newRelURLParts[newRelURLParts.length]=relURLParts[i]}relURLParts=newRelURLParts.reverse();var len=baseURLParts.length-numBack;var absPath=(len<=0?"":"/")+baseURLParts.slice(0,len).join('/')+"/"+relURLParts.join('/');var start="",end="";relURL.protocol=baseURL.protocol;relURL.host=baseURL.host;relURL.port=baseURL.port;if(relURL.path.charAt(relURL.path.length-1)=="/")absPath+="/";relURL.path=absPath;return this.serializeURL(relURL)};TinyMCE_Engine.prototype.convertURL=function(url,node,on_save){var prot=document.location.protocol;var host=document.location.hostname;var port=document.location.port;if(prot=="file:")return url;url=tinyMCE.regexpReplace(url,'(http|https):///','/');if(url.indexOf('mailto:')!=-1||url.indexOf('javascript:')!=-1||tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0)=="#")return url;if(!tinyMCE.isIE&&!on_save&&url.indexOf("://")==-1&&url.charAt(0)!='/')return tinyMCE.settings['base_href']+url;if(on_save&&tinyMCE.getParam('relative_urls')){var curl=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],url);if(curl.charAt(0)=='/')curl=tinyMCE.settings['document_base_prefix']+curl;var urlParts=tinyMCE.parseURL(curl);var tmpUrlParts=tinyMCE.parseURL(tinyMCE.settings['document_base_url']);if(urlParts['host']==tmpUrlParts['host']&&(urlParts['port']==tmpUrlParts['port']))return tinyMCE.convertAbsoluteURLToRelativeURL(tinyMCE.settings['document_base_url'],curl)}if(!tinyMCE.getParam('relative_urls')){var urlParts=tinyMCE.parseURL(url);var baseUrlParts=tinyMCE.parseURL(tinyMCE.settings['base_href']);url=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],url);if(urlParts['anchor']&&urlParts['path']==baseUrlParts['path'])return"#"+urlParts['anchor']}if(tinyMCE.getParam('remove_script_host')){var start="",portPart="";if(port!="")portPart=":"+port;start=prot+"//"+host+portPart+"/";if(url.indexOf(start)==0)url=url.substring(start.length-1)}return url};TinyMCE_Engine.prototype.convertAllRelativeURLs=function(body){var i,elms,src,href,mhref,msrc;elms=body.getElementsByTagName("img");for(i=0;ibookmark.index){try{rng.addElement(nl[bookmark.index])}catch(ex){}}}else{try{if(bookmark.start<0)return true;rng=inst.getSel().createRange();rng.moveToElementText(inst.getBody());rng.collapse(true);rng.moveStart('character',bookmark.start);rng.moveEnd('character',bookmark.length)}catch(ex){return true}}rng.select();win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true}if(tinyMCE.isGecko||tinyMCE.isOpera){if(bookmark.rng){sel.removeAllRanges();sel.addRange(bookmark.rng)}if(bookmark.start!=-1&&bookmark.end!=-1){try{sd=this._getTextPos(b,bookmark.start,bookmark.end);rng=doc.createRange();rng.setStart(sd.startNode,sd.startOffset);rng.setEnd(sd.endNode,sd.endOffset);sel.removeAllRanges();sel.addRange(rng);win.focus()}catch(ex){}}win.scrollTo(bookmark.scrollX,bookmark.scrollY);return true}return false},_getPosText:function(r,sn,en){var w=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={};while((n=w.nextNode())!=null){if(n==sn)d.start=p;if(n==en){d.end=p;return d}p+=n.nodeValue?n.nodeValue.length:0}return null},_getTextPos:function(r,sp,ep){var w=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,false),n,p=0,d={};while((n=w.nextNode())!=null){p+=n.nodeValue?n.nodeValue.length:0;if(p>=sp&&!d.startNode){d.startNode=n;d.startOffset=sp-(p-n.nodeValue.length)}if(p>=ep){d.endNode=n;d.endOffset=ep-(p-n.nodeValue.length);return d}}return null},selectNode:function(node,collapse,select_text_node,to_start){var inst=this.instance,sel,rng,nodes;if(!node)return;if(typeof(collapse)=="undefined")collapse=true;if(typeof(select_text_node)=="undefined")select_text_node=false;if(typeof(to_start)=="undefined")to_start=true;if(inst.settings.auto_resize)inst.resizeToContent();if(tinyMCE.isRealIE){rng=inst.getDoc().body.createTextRange();try{rng.moveToElementText(node);if(collapse)rng.collapse(to_start);rng.select()}catch(e){}}else{sel=this.getSel();if(!sel)return;if(tinyMCE.isSafari){sel.setBaseAndExtent(node,0,node,node.innerText.length);if(collapse){if(to_start)sel.collapseToStart();else sel.collapseToEnd()}this.scrollToNode(node);return}rng=inst.getDoc().createRange();if(select_text_node){nodes=tinyMCE.getNodeTree(node,new Array(),3);if(nodes.length>0)rng.selectNodeContents(nodes[0]);else rng.selectNodeContents(node)}else rng.selectNode(node);if(collapse){if(!to_start&&node.nodeType==3){rng.setStart(node,node.nodeValue.length);rng.setEnd(node,node.nodeValue.length)}else rng.collapse(to_start)}sel.removeAllRanges();sel.addRange(rng)}this.scrollToNode(node);tinyMCE.selectedElement=null;if(node.nodeType==1)tinyMCE.selectedElement=node},scrollToNode:function(node){var inst=this.instance,w=inst.getWin(),vp=inst.getViewPort(),pos=tinyMCE.getAbsPosition(node),cvp,p,cwin;if(pos.absLeftvp.left+vp.width||pos.absTopvp.top+(vp.height-25))w.scrollTo(pos.absLeft,pos.absTop-vp.height+25);if(inst.settings.auto_resize){cwin=inst.getContainerWin();cvp=tinyMCE.getViewPort(cwin);p=this.getAbsPosition(node);if(p.absLeftcvp.left+cvp.width||p.absTopcvp.top+cvp.height)cwin.scrollTo(p.absLeft,p.absTop-cvp.height+25)}},getAbsPosition:function(n){var pos=tinyMCE.getAbsPosition(n),ipos=tinyMCE.getAbsPosition(this.instance.iframeElement);return{absLeft:ipos.absLeft+pos.absLeft,absTop:ipos.absTop+pos.absTop}},getSel:function(){var inst=this.instance;if(tinyMCE.isRealIE)return inst.getDoc().selection;return inst.contentWindow.getSelection()},getRng:function(){var s=this.getSel();if(s==null)return null;if(tinyMCE.isRealIE)return s.createRange();if(tinyMCE.isSafari&&!s.getRangeAt)return''+window.getSelection();return s.getRangeAt(0)},getFocusElement:function(){var inst=this.instance,doc,rng,sel,elm;if(tinyMCE.isRealIE){doc=inst.getDoc();rng=doc.selection.createRange();elm=rng.item?rng.item(0):rng.parentElement()}else{if(!tinyMCE.isSafari&&inst.isHidden())return inst.getBody();sel=this.getSel();rng=this.getRng();if(!sel||!rng)return null;elm=rng.commonAncestorContainer;if(!rng.collapsed){if(rng.startContainer==rng.endContainer){if(rng.startOffset-rng.endOffset<2){if(rng.startContainer.hasChildNodes())elm=rng.startContainer.childNodes[rng.startOffset]}}}elm=tinyMCE.getParentElement(elm);}return elm}};function TinyMCE_UndoRedo(inst){this.instance=inst;this.undoLevels=new Array();this.undoIndex=0;this.typingUndoIndex=-1;this.undoRedo=true};TinyMCE_UndoRedo.prototype={add:function(l){var b,customUndoLevels,newHTML,inst=this.instance,i,ul,ur;if(l){this.undoLevels[this.undoLevels.length]=l;return true}if(this.typingUndoIndex!=-1){this.undoIndex=this.typingUndoIndex;if(tinyMCE.typingUndoIndex!=-1)tinyMCE.undoIndex=tinyMCE.typingUndoIndex}newHTML=tinyMCE.trim(inst.getBody().innerHTML);if(this.undoLevels[this.undoIndex]&&newHTML!=this.undoLevels[this.undoIndex].content){tinyMCE.dispatchCallback(inst,'onchange_callback','onChange',inst);customUndoLevels=tinyMCE.settings['custom_undo_redo_levels'];if(customUndoLevels!=-1&&this.undoLevels.length>customUndoLevels){for(i=0;i0){this.undoIndex--;tinyMCE.setInnerHTML(inst.getBody(),this.undoLevels[this.undoIndex].content);inst.repaint();if(inst.settings.custom_undo_redo_restore_selection)inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark)}},redo:function(){var inst=this.instance;tinyMCE.execCommand("mceEndTyping");if(this.undoIndex<(this.undoLevels.length-1)){this.undoIndex++;tinyMCE.setInnerHTML(inst.getBody(),this.undoLevels[this.undoIndex].content);inst.repaint();if(inst.settings.custom_undo_redo_restore_selection)inst.selection.moveToBookmark(this.undoLevels[this.undoIndex].bookmark)}tinyMCE.triggerNodeChange()}};var TinyMCE_ForceParagraphs={_insertPara:function(inst,e){var doc=inst.getDoc(),sel=inst.getSel(),body=inst.getBody(),win=inst.contentWindow,rng=sel.getRangeAt(0);var rootElm=doc.documentElement,blockName="P",startNode,endNode,startBlock,endBlock;var rngBefore,rngAfter,direct,startNode,startOffset,endNode,endOffset,b=tinyMCE.isOpera?inst.selection.getBookmark():null;var paraBefore,paraAfter,startChop,endChop,contents;function isEmpty(para){function isEmptyHTML(html){return html.replace(new RegExp('[ \t\r\n]+','g'),'').toLowerCase()==""}if(para.getElementsByTagName("img").length>0)return false;if(para.getElementsByTagName("table").length>0)return false;if(para.getElementsByTagName("hr").length>0)return false;var nodes=tinyMCE.getNodeTree(para,new Array(),3);for(var i=0;i <"+blockName+"> ";paraAfter=body.childNodes[1]}inst.selection.moveToBookmark(b);inst.selection.selectNode(paraAfter,true,true);return true}if(startChop.nodeName==blockName)rngBefore.setStart(startChop,0);else rngBefore.setStartBefore(startChop);rngBefore.setEnd(startNode,startOffset);paraBefore.appendChild(rngBefore.cloneContents());rngAfter.setEndAfter(endChop);rngAfter.setStart(endNode,endOffset);contents=rngAfter.cloneContents();if(contents.firstChild&&contents.firstChild.nodeName==blockName){paraAfter.innerHTML=contents.firstChild.innerHTML}else paraAfter.appendChild(contents);if(isEmpty(paraBefore))paraBefore.innerHTML=" ";if(isEmpty(paraAfter))paraAfter.innerHTML=" ";rng=doc.createRange();if(!startChop.previousSibling&&startChop.parentNode.nodeName.toUpperCase()==blockName){rng.setStartBefore(startChop.parentNode)}else{if(rngBefore.startContainer.nodeName.toUpperCase()==blockName&&rngBefore.startOffset==0)rng.setStartBefore(rngBefore.startContainer);else rng.setStart(rngBefore.startContainer,rngBefore.startOffset)}if(!endChop.nextSibling&&endChop.parentNode.nodeName.toUpperCase()==blockName)rng.setEndAfter(endChop.parentNode);else rng.setEnd(rngAfter.endContainer,rngAfter.endOffset);rng.deleteContents();if(tinyMCE.isOpera){rng.insertNode(paraBefore);rng.insertNode(paraAfter)}else{rng.insertNode(paraAfter);rng.insertNode(paraBefore)}paraAfter.normalize();paraBefore.normalize();inst.selection.moveToBookmark(b);inst.selection.selectNode(paraAfter,true,true);return true},_handleBackSpace:function(inst){var r=inst.getRng(),sn=r.startContainer,nv,s=false;if(sn&&sn.nextSibling&&sn.nextSibling.nodeName=="BR"&&sn.parentNode.nodeName!="BODY"){nv=sn.nodeValue;if(nv!=null&&r.startOffset==nv.length)sn.nextSibling.parentNode.removeChild(sn.nextSibling)}if(inst.settings.auto_resize)inst.resizeToContent();return s}};function TinyMCE_Layer(id,bm){this.id=id;this.blockerElement=null;this.events=false;this.element=null;this.blockMode=typeof(bm)!='undefined'?bm:true;this.doc=document};TinyMCE_Layer.prototype={moveRelativeTo:function(re,p){var rep=this.getAbsPosition(re);var w=parseInt(re.offsetWidth);var h=parseInt(re.offsetHeight);var e=this.getElement();var ew=parseInt(e.offsetWidth);var eh=parseInt(e.offsetHeight);var x,y;switch(p){case"tl":x=rep.absLeft;y=rep.absTop;break;case"tr":x=rep.absLeft+w;y=rep.absTop;break;case"bl":x=rep.absLeft;y=rep.absTop+h;break;case"br":x=rep.absLeft+w;y=rep.absTop+h;break;case"cc":x=rep.absLeft+(w/ 2) - (ew /2);y=rep.absTop+(h/ 2) - (eh /2);break}this.moveTo(x,y)},moveBy:function(x,y){var e=this.getElement();this.moveTo(parseInt(e.style.left)+x,parseInt(e.style.top)+y)},moveTo:function(x,y){var e=this.getElement();e.style.left=x+"px";e.style.top=y+"px";this.updateBlocker()},resizeBy:function(w,h){var e=this.getElement();this.resizeTo(parseInt(e.style.width)+w,parseInt(e.style.height)+h)},resizeTo:function(w,h){var e=this.getElement();if(w!=null)e.style.width=w+"px";if(h!=null)e.style.height=h+"px";this.updateBlocker()},show:function(){this.getElement().style.display='block';this.updateBlocker()},hide:function(){this.getElement().style.display='none';this.updateBlocker()},isVisible:function(){return this.getElement().style.display=='block'},getElement:function(){if(!this.element)this.element=this.doc.getElementById(this.id);return this.element},setBlockMode:function(s){this.blockMode=s},updateBlocker:function(){var e,b,x,y,w,h;b=this.getBlocker();if(b){if(this.blockMode){e=this.getElement();x=this.parseInt(e.style.left);y=this.parseInt(e.style.top);w=this.parseInt(e.offsetWidth);h=this.parseInt(e.offsetHeight);b.style.left=x+'px';b.style.top=y+'px';b.style.width=w+'px';b.style.height=h+'px';b.style.display=e.style.display}else b.style.display='none'}},getBlocker:function(){var d,b;if(!this.blockerElement&&this.blockMode){d=this.doc;b=d.getElementById(this.id+"_blocker");if(!b){b=d.createElement("iframe");b.setAttribute('id',this.id+"_blocker");b.style.cssText='display: none; position: absolute; left: 0; top: 0';b.src='javascript:false;';b.frameBorder='0';b.scrolling='no';d.body.appendChild(b)}this.blockerElement=b}return this.blockerElement},getAbsPosition:function(n){var p={absLeft:0,absTop:0};while(n){p.absLeft+=n.offsetLeft;p.absTop+=n.offsetTop;n=n.offsetParent}return p},create:function(n,c,p,h){var d=this.doc,e=d.createElement(n);e.setAttribute('id',this.id);if(c)e.className=c;if(!p)p=d.body;if(h)e.innerHTML=h;p.appendChild(e);return this.element=e},exists:function(){return this.doc.getElementById(this.id)!=null},parseInt:function(s){if(s==null||s=='')return 0;return parseInt(s)}};function TinyMCE_Menu(){var id;if(typeof(tinyMCE.menuCounter)=="undefined")tinyMCE.menuCounter=0;id="mc_menu_"+tinyMCE.menuCounter++;TinyMCE_Layer.call(this,id,true);this.id=id;this.items=new Array();this.needsUpdate=true};TinyMCE_Menu.prototype=tinyMCE.extend(TinyMCE_Layer.prototype,{init:function(s){var n;this.settings={separator_class:'mceMenuSeparator',title_class:'mceMenuTitle',disabled_class:'mceMenuDisabled',menu_class:'mceMenu',drop_menu:true};for(n in s)this.settings[n]=s[n];this.create('div',this.settings.menu_class)},clear:function(){this.items=new Array()},addTitle:function(t){this.add({type:'title',text:t})},addDisabled:function(t){this.add({type:'disabled',text:t})},addSeparator:function(){this.add({type:'separator'})},addItem:function(t,js){this.add({text:t,js:js})},add:function(mi){this.items[this.items.length]=mi;this.needsUpdate=true},update:function(){var e=this.getElement(),h='',i,t,m=this.items,s=this.settings;if(this.settings.drop_menu)h+='';h+='';for(i=0;i'}h+='
    ';break;case'title':h+='
    '+t+'';break;case'disabled':h+='
    '+t+'';break;default:h+='
    '+t+''}h+='
    ';e.innerHTML=h;this.needsUpdate=false;this.updateBlocker()},show:function(){var nl,i;if(tinyMCE.lastMenu==this)return;if(this.needsUpdate)this.update();if(tinyMCE.lastMenu&&tinyMCE.lastMenu!=this)tinyMCE.lastMenu.hide();TinyMCE_Layer.prototype.show.call(this);if(!tinyMCE.isOpera){}tinyMCE.lastMenu=this}});if(!Function.prototype.call){Function.prototype.call=function(){var a=arguments,s=a[0],i,as='',r,o;for(i=1;i1?',':'')+'a['+i+']';o=s._fu;s._fu=this;r=eval('s._fu('+as+')');s._fu=o;return r}};TinyMCE_Engine.prototype.debug=function(){var m="",a,i,l=tinyMCE.log.length;for(i=0,a=this.debug.arguments;i'); + + if (tinyMCE.getParam("popups_css_add")) { + c = tinyMCE.getParam("popups_css_add"); + + // Is relative + if (c.indexOf('://') == -1 && c.charAt(0) != '/') + c = tinyMCE.documentBasePath + "/" + c; + + document.write(''); + } + + tinyMCE.addEvent(window, "load", this.onLoad); + }, + + onLoad : function() { + var dir, i, elms, body = document.body; + + if (tinyMCE.getWindowArg('mce_replacevariables', true)) + body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs); + + dir = tinyMCE.selectedInstance.settings['directionality']; + if (dir == "rtl" && document.forms && document.forms.length > 0) { + elms = document.forms[0].elements; + for (i=0; i=0; i--) { + if (wrapper.hasChildNodes()) + wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild); + else + wrapper.appendChild(nodes[i].cloneNode(true)); + + nodes[i].parentNode.removeChild(nodes[i]); + } + + // Add wrapper + doc.body.appendChild(wrapper); + + // Create iframe + iframe = document.createElement("iframe"); + iframe.id = "mcWinIframe"; + iframe.src = document.location.href.toLowerCase().indexOf('https') == -1 ? "about:blank" : tinyMCE.settings['default_document']; + iframe.width = "100%"; + iframe.height = "100%"; + iframe.style.margin = '0'; + + // Add iframe + doc.body.appendChild(iframe); + + // Measure iframe + iframe = document.getElementById('mcWinIframe'); + dx = tinyMCE.getWindowArg('mce_width') - iframe.clientWidth; + dy = tinyMCE.getWindowArg('mce_height') - iframe.clientHeight; + + // Resize window + // tinyMCE.debug(tinyMCE.getWindowArg('mce_width') + "," + tinyMCE.getWindowArg('mce_height') + " - " + dx + "," + dy); + window.resizeBy(dx, dy); + + // Hide iframe and show wrapper + body.style.margin = oldMargin; + iframe.style.display = 'none'; + wrapper.style.display = 'block'; + } + }, + + resizeToContent : function() { + var isMSIE = (navigator.appName == "Microsoft Internet Explorer"); + var isOpera = (navigator.userAgent.indexOf("Opera") != -1); + + if (isOpera) + return; + + if (isMSIE) { + try { window.resizeTo(10, 10); } catch (e) {} + + var elm = document.body; + var width = elm.offsetWidth; + var height = elm.offsetHeight; + var dx = (elm.scrollWidth - width) + 4; + var dy = elm.scrollHeight - height; + + try { window.resizeBy(dx, dy); } catch (e) {} + } else { + window.scrollBy(1000, 1000); + if (window.scrollX > 0 || window.scrollY > 0) { + window.resizeBy(window.innerWidth * 2, window.innerHeight * 2); + window.sizeToContent(); + window.scrollTo(0, 0); + var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0); + var y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0); + window.moveTo(x, y); + } + } + }, + + getWindowArg : function(name, default_value) { + return tinyMCE.getWindowArg(name, default_value); + }, + + restoreSelection : function() { + if (this.storeSelection) { + var inst = tinyMCE.selectedInstance; + + inst.getWin().focus(); + + if (inst.selectionBookmark) + inst.selection.moveToBookmark(inst.selectionBookmark); + } + }, + + execCommand : function(command, user_interface, value) { + var inst = tinyMCE.selectedInstance; + + this.restoreSelection(); + inst.execCommand(command, user_interface, value); + + // Store selection + if (this.storeSelection) + inst.selectionBookmark = inst.selection.getBookmark(true); + }, + + close : function() { + tinyMCE.closeWindow(window); + }, + + pickColor : function(e, element_id) { + tinyMCE.selectedInstance.execCommand('mceColorPicker', true, { + element_id : element_id, + document : document, + window : window, + store_selection : false + }); + }, + + openBrowser : function(element_id, type, option) { + var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback")); + var url = document.getElementById(element_id).value; + + tinyMCE.setWindowArg("window", window); + tinyMCE.setWindowArg("document", document); + + // Call to external callback + if (eval('typeof(tinyMCEPopup.windowOpener.' + cb + ')') == "undefined") + alert("Callback function: " + cb + " could not be found."); + else + eval("tinyMCEPopup.windowOpener." + cb + "(element_id, url, type, window);"); + }, + + importClass : function(c) { + window[c] = function() {}; + + for (var n in window.opener[c].prototype) + window[c].prototype[n] = window.opener[c].prototype[n]; + + window[c].constructor = window.opener[c].constructor; + } + + }; + +// Setup global instance +var tinyMCEPopup = new TinyMCE_Popup(); + +tinyMCEPopup.init(); Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/utils/editable_selects.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/utils/editable_selects.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/tinymce/utils/editable_selects.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,61 @@ +/** + * $Id$ + * + * Makes select boxes editable. + * + * @author Moxiecode + * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. + */ + +var TinyMCE_EditableSelects = { + editSelectElm : null, + + init : function() { + var nl = document.getElementsByTagName("select"), i, d = document, o; + + for (i=0; i'; + h += ''; + + return h; +} + +function pickColor(e, target_form_element) { + if ((e.keyCode == 32 || e.keyCode == 13) || e.type == "mousedown") + tinyMCEPopup.pickColor(e, target_form_element); +} + +function updateColor(img_id, form_element_id) { + document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value; +} + +function setBrowserDisabled(id, state) { + var img = document.getElementById(id); + var lnk = document.getElementById(id + "_link"); + + if (lnk) { + if (state) { + lnk.setAttribute("realhref", lnk.getAttribute("href")); + lnk.removeAttribute("href"); + tinyMCE.switchClass(img, 'mceButtonDisabled', true); + } else { + lnk.setAttribute("href", lnk.getAttribute("realhref")); + tinyMCE.switchClass(img, 'mceButtonNormal', false); + } + } +} + +function getBrowserHTML(id, target_form_element, type, prefix) { + var option = prefix + "_" + type + "_browser_callback"; + var cb = tinyMCE.getParam(option, tinyMCE.getParam("file_browser_callback")); + if (cb == null) + return ""; + + var html = ""; + + html += ''; + html += ''; + + return html; +} + +function openBrower(img_id, target_form_element, type, option) { + var img = document.getElementById(img_id); + + if (img.className != "mceButtonDisabled") + tinyMCEPopup.openBrowser(target_form_element, type, option); +} + +function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { + if (!form_obj || !form_obj.elements[field_name]) + return; + + var sel = form_obj.elements[field_name]; + + var found = false; + for (var i=0; i x && mx < x + w && my > y && my < y + h)) { + MCLayer.visibleLayer = null; + + if (l.autoHideCallback && l.autoHideCallback(l, e, mx, my)) + return true; + + l.hide(); + } + } + }, + + addCSSClass : function(e, c) { + this.removeCSSClass(e, c); + var a = this.explode(' ', e.className); + a[a.length] = c; + e.className = a.join(' '); + }, + + removeCSSClass : function(e, c) { + var a = this.explode(' ', e.className), i; + + for (i=0; i parseInt(v)) + st = this.mark(f, n); + } + } + + return st; + }, + + hasClass : function(n, c, d) { + return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className); + }, + + getNum : function(n, c) { + c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0]; + c = c.replace(/[^0-9]/g, ''); + + return c; + }, + + addClass : function(n, c, b) { + var o = this.removeClass(n, c); + n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c; + }, + + removeClass : function(n, c) { + c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' '); + return n.className = c != ' ' ? c : ''; + }, + + tags : function(f, s) { + return f.getElementsByTagName(s); + }, + + mark : function(f, n) { + var s = this.settings; + + this.addClass(n, s.invalid_cls); + this.markLabels(f, n, s.invalid_cls); + + return false; + }, + + markLabels : function(f, n, ic) { + var nl, i; + + nl = this.tags(f, "label"); + for (i=0; i + * Created on: 24.02.2008 + * ---------------------------------------------- + * Released under GPL version 2 + **/ + +var strings = new Array(); + +// Menu +strings["Polish"] = "Polski"; +strings["New"] = "Nowy"; +strings["Save"] = "Zapisz"; +strings["Print"] = "Drukuj"; +strings["Home"] = "Start"; +strings["<<"] = "<<"; +strings[">>"] = ">>"; +strings["Up"] = "W górę" +strings["Down"] = "W dół"; +strings["Position"] = "Pozycja"; +strings["Formula"] = "Formuła"; +strings["Style"] = "Styl"; +strings["Close"] = "Zamknij"; +strings["X"] = "X"; +strings["Formulas"] = "Formuły"; +strings["Styles"] = "Style"; +strings["Values"] = "Wartości"; +strings["Help"] = "Pomoc"; +strings["Insert Row"] = "Wstaw wiersz"; +strings["Insert Column"] = "Wstaw kolumnę"; +strings["Delete Row"] = "Usuń wiersz"; +strings["Delete Column"] = "Usuń kolumnę"; +strings["Sort asc."] = "Sortuj rosnąco"; +strings["Sort desc."] = "Sortuj malejąco"; +strings["Cut"] = "Wytnij"; +strings["Copy"] = "Kopiuj"; +strings["Paste"] = "Wklej"; +strings["Empty"] = "Wyczyść"; +strings["Export to CSV"] = "Eksport do CSV"; +strings["Export to TSV"] = "Eksport do TSV"; +strings["Export to JS"] = "Eksport do JS"; +strings["Load"] = "Wczytaj"; +strings["Cancel"] = "Anuluj"; +strings["About"] = "O programie"; +strings["Simple Spreadsheet code / CSV data / Tab separated values (copy/paste from Excel):"] = "Kod Simple Spreadsheet / Dane CSV / Wartości rozdzielone znakami tabulacji (skopiuj/wklej z Excela)"; +strings["Url"] = "URL"; +strings["Refresh"] = "Odświeżanie"; +strings["Auto"] = "Auto"; +strings["Manual"] = "Ręczne"; +strings["Only Javascript-like syntax"] = "Tylko składnia typu Javascript"; + +// Confirmation messages +strings["Really empty cell(s) ?"] = "Na pewno wyczyścić komórkę (komórki)?"; +strings["Really delete entire row ?"] = "Na pewno usunąć cały wiersz?"; +strings["Really delete entire column ?"] = "Na pewno usunąć całą kolumnę?"; +strings["Really close without saving changes ?"] = "Na pewno zamknąć bez zapisywania zmian?"; + +// Error messages +strings["Error loading data:"] = "Błąd podczas ładowania danych:"; +strings["Error parsing data:"] = "Błąd podczas analizy danych:"; +strings["Error evaluating"] = "Błąd podczas oceniania"; +strings["Value"] = "Wartość"; +strings["Invalid cell."] = "Błędna komórka."; +strings["Cannot edit: cell is marked as readonly."] = "Nie można edytować, komórka jest oznaczona jako tylko-do-odczytu"; +strings["There was an error on this page."] = "Na stronie wystąpił błąd."; +strings["Line:"] = "Linia:"; +strings["Error:"] = "Błąd:"; +strings["Could not initialize RequestObject"] = "Inicjalizacja RequestObject nie powiodła się"; +strings["Error doing request to xmlhttp:"] = "Błąd żądania xmlhttp:"; + +// Months and Days +strings["January"] = "Styczeń"; +strings["February"] = "Luty"; +strings["March"] = "Marzec"; +strings["April"] = "Kwiecień"; +strings["May"] = "Maj"; +strings["June"] = "Czerwiec"; +strings["July"] = "Lipiec"; +strings["August"] = "Sierpień"; +strings["September"] = "Wrzesień"; +strings["October"] = "Październik"; +strings["November"] = "Listopad"; +strings["December"] = "Grudzień"; + +strings["Monday"] = "Poniedziałek"; +strings["Tuesday"] = "Wtorek"; +strings["Wednesday"] = "Środa"; +strings["Thursday"] = "Czwartek"; +strings["Friday"] = "Piątek"; +strings["Saturday"] = "Sobota"; +strings["Sunday"] = "Niedziela"; Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/ptBR.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/ptBR.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/ptBR.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,93 @@ +/** + * Translation source file for Simple Spreadsheet + * Language: Brazil / Portuguese + * Author: Igor Herson (igorhaf � gmail.com) + * Created on: 27.11.2007 + * ---------------------------------------------- + * Released under GPL version 2 + **/ + +var strings = new Array(); + +// Menu +strings["Portuguese"] = "Portugu�s"; +strings["New"] = "Novo"; +strings["Save"] = "Salvar"; +strings["Print"] = "Imprimir"; +strings["Home"] = "Principal"; +strings["<<"] = "<<"; +strings[">>"] = ">>"; +strings["Up"] = "Acima"; +strings["Down"] = "Abaixo"; +strings["Position"] = "Posi��o"; +strings["Formula"] = "Formula"; +strings["Style"] = "Estilo"; +strings["Close"] = "Fechar"; +strings["X"] = "X"; +strings["Formulas"] = "Formulas"; +strings["Styles"] = "Estilos"; +strings["Values"] = "Valores"; +strings["Help"] = "Ajuda"; +strings["Insert Row"] = "Inserir Linha"; +strings["Insert Column"] = "Inserir Coluna"; +strings["Delete Row"] = "Apagar Linha"; +strings["Delete Column"] = "Apagar Coluna"; +strings["Sort asc."] = "Ordenar asc."; +strings["Sort desc."] = "Ordenar desc."; +strings["Cut"] = "Cortar"; +strings["Copy"] = "Copiar"; +strings["Paste"] = "Colar"; +strings["Empty"] = "Limpar"; +strings["Export to CSV"] = "Exportar para CSV"; +strings["Export to TSV"] = "Exportar para TSV"; +strings["Export to JS"] = "Exportar para JS"; +strings["Load"] = "Carregar"; +strings["Cancel"] = "Cancelar"; +strings["About"] = "Sobre"; +strings["Simple Spreadsheet code / CSV data / Tab separated values (copy/paste from Excel):"] = "Simple Spreadsheet code / CSV data / Tab separated values (copy/paste from Excel):"; +strings["Url"] = "URL"; +strings["Refresh"] = "Atualizar"; +strings["Auto"] = "Auto"; +strings["Manual"] = "Manual"; +strings["Only Javascript-like syntax"] = "Somente syntax Javascript"; + +// Confirmation messages +strings["Really empty cell(s) ?"] = "Deseja realmente limpar a(s) celulas(s)?"; +strings["Really delete entire row ?"] = "Deseja realmente excluir toda a linha ?"; +strings["Really delete entire column ?"] = "Deseja realmente excluir toda a coluna ?"; +strings["Really close without saving changes ?"] = "Deseja realmente fechar sem salvar as modifica��es ?"; + +// Error messages +strings["Error loading data:"] = "Erro na leitura dos dados:"; +strings["Error parsing data:"] = "Erro na interpreta��o dos dados:"; +strings["Error evaluating"] = "Erro na avalia��o"; +strings["Value"] = "Valor"; +strings["Invalid cell."] = "Celular Inv�lida."; +strings["Cannot edit: cell is marked as readonly."] = "Permi��o negada: A celula esta marcada como somente leitura."; +strings["There was an error on this page."] = "Existe um erro neste documento."; +strings["Line:"] = "Linnha:"; +strings["Error:"] = "Erro:"; +strings["Could not initialize RequestObject"] = "N�o foi poss�vel inicializar o objeto"; +strings["Error doing request to xmlhttp:"] = "N�o foi poss�vel inicializar o xmlhttp:"; + +// Months and Days +strings["January"] = "Janeiro"; +strings["February"] = "Fevereiro"; +strings["March"] = "Mar�o"; +strings["April"] = "Abril"; +strings["May"] = "Maio"; +strings["June"] = "Junho"; +strings["July"] = "Julho"; +strings["August"] = "Agosto"; +strings["September"] = "Setembro"; +strings["October"] = "Outubro"; +strings["November"] = "Novembro"; +strings["December"] = "Dezembro"; + +strings["Monday"] = "Segunda"; +strings["Tuesday"] = "Ter�a"; +strings["Wednesday"] = "Quarta"; +strings["Thursday"] = "Quinta"; +strings["Friday"] = "Sexta"; +strings["Saturday"] = "Sabado"; +strings["Sunday"] = "Domingo"; \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/ru.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/ru.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/ru.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,10 @@ +/** + * Translation source file for Simple Spreadsheet + * Language: + * Author: + * Created on: + * ---------------------------------------------- + * Released under GPL version 2 + **/ + +var strings = new Array(); \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/se.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/se.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/se.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,10 @@ +/** + * Translation source file for Simple Spreadsheet + * Language: + * Author: + * Created on: + * ---------------------------------------------- + * Released under GPL version 2 + **/ + +var strings = new Array(); \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/sk.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/sk.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/sk.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,10 @@ +/** + * Translation source file for Simple Spreadsheet + * Language: + * Author: + * Created on: + * ---------------------------------------------- + * Released under GPL version 2 + **/ + +var strings = new Array(); \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/tr.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/tr.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/translations/tr.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,10 @@ +/** + * Translation source file for Simple Spreadsheet + * Language: + * Author: + * Created on: + * ---------------------------------------------- + * Released under GPL version 2 + **/ + +var strings = new Array(); \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/w.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/w.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/simple_spreadsheet/w.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file Index: lams_tool_spreadsheet/web/includes/javascript/spreadsheetcommon.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/spreadsheetcommon.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/spreadsheetcommon.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,10 @@ + function showBusy(targetDiv){ + if($(targetDiv+"_Busy") != null){ + Element.show(targetDiv+"_Busy"); + } + } + function hideBusy(targetDiv){ + if($(targetDiv+"_Busy") != null){ + Element.hide(targetDiv+"_Busy"); + } + } Index: lams_tool_spreadsheet/web/includes/javascript/tree.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/tree.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/tree.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,139 @@ +// Title: Tigra Tree +// Description: See the demo at url +// URL: http://www.softcomplex.com/products/tigra_menu_tree/ +// Version: 1.1 +// Date: 11-12-2002 (mm-dd-yyyy) +// Notes: This script is free. Visit official site for further details. + +function tree (a_items, a_template) { + + this.a_tpl = a_template; + this.a_config = a_items; + this.o_root = this; + this.a_index = []; + this.o_selected = null; + this.n_depth = -1; + + var o_icone = new Image(), + o_iconl = new Image(); + o_icone.src = a_template['icon_e']; + o_iconl.src = a_template['icon_l']; + a_template['im_e'] = o_icone; + a_template['im_l'] = o_iconl; + for (var i = 0; i < 64; i++) + if (a_template['icon_' + i]) { + var o_icon = new Image(); + a_template['im_' + i] = o_icon; + o_icon.src = a_template['icon_' + i]; + } + + this.toggle = function (n_id) { var o_item = this.a_index[n_id]; o_item.open(o_item.b_opened) }; + this.select = function (n_id) { return this.a_index[n_id].select(); }; + this.mout = function (n_id) { this.a_index[n_id].upstatus(true) }; + this.mover = function (n_id) { this.a_index[n_id].upstatus() }; + + this.a_children = []; + for (var i = 0; i < a_items.length; i++) + new tree_item(this, i); + + this.n_id = trees.length; + trees[this.n_id] = this; + + for (var i = 0; i < this.a_children.length; i++) { + document.write(this.a_children[i].init()); + this.a_children[i].open(); + } +} +function tree_item (o_parent, n_order) { + + this.n_depth = o_parent.n_depth + 1; + this.a_config = o_parent.a_config[n_order + (this.n_depth ? 2 : 0)]; + if (!this.a_config) return; + + this.o_root = o_parent.o_root; + this.o_parent = o_parent; + this.n_order = n_order; + this.b_opened = !this.n_depth; + + this.n_id = this.o_root.a_index.length; + this.o_root.a_index[this.n_id] = this; + o_parent.a_children[n_order] = this; + + this.a_children = []; + for (var i = 0; i < this.a_config.length - 2; i++) + new tree_item(this, i); + + this.get_icon = item_get_icon; + this.open = item_open; + this.select = item_select; + this.init = item_init; + this.upstatus = item_upstatus; + this.is_last = function () { return this.n_order == this.o_parent.a_children.length - 1 }; +} + +function item_open (b_close) { + var o_idiv = get_element('i_div' + this.o_root.n_id + '_' + this.n_id); + if (!o_idiv) return; + + if (!o_idiv.innerHTML) { + var a_children = []; + for (var i = 0; i < this.a_children.length; i++) + a_children[i]= this.a_children[i].init(); + o_idiv.innerHTML = a_children.join(''); + } + o_idiv.style.display = (b_close ? 'none' : 'block'); + + this.b_opened = !b_close; + var o_jicon = document.images['j_img' + this.o_root.n_id + '_' + this.n_id], + o_iicon = document.images['i_img' + this.o_root.n_id + '_' + this.n_id]; + if (o_jicon) o_jicon.src = this.get_icon(true); + if (o_iicon) o_iicon.src = this.get_icon(); + this.upstatus(); +} + +function item_select (b_deselect) { + if (!b_deselect) { + var o_olditem = this.o_root.o_selected; + this.o_root.o_selected = this; + if (o_olditem) o_olditem.select(true); + } + var o_iicon = document.images['i_img' + this.o_root.n_id + '_' + this.n_id]; + if (o_iicon) o_iicon.src = this.get_icon(); + get_element('i_txt' + this.o_root.n_id + '_' + this.n_id).style.fontWeight = b_deselect ? 'normal' : 'bold'; + + this.upstatus(); + return Boolean(this.a_config[1]); +} + +function item_upstatus (b_clear) { + window.setTimeout('window.status="' + (b_clear ? '' : this.a_config[0] + (this.a_config[1] ? ' ('+ this.a_config[1] + ')' : '')) + '"', 10); +} + +function item_init () { + var a_offset = [], + o_current_item = this.o_parent; + for (var i = this.n_depth; i > 1; i--) { + a_offset[i] = ''; + o_current_item = o_current_item.o_parent; + } + //NDPNDP: if the link href='0', then display non-link fields + return '
    ' + (this.n_depth ? a_offset.join('') + (this.a_children.length + ? '' + : '') : '') + + (this.a_config[1] == 0?'': (''))+'' + this.a_config[0] + (this.a_config[1]== 0?'':'')+'
    ' + (this.a_children.length ? '' : ''); + /** + return '
    ' + (this.n_depth ? a_offset.join('') + (this.a_children.length + ? '' + : '') : '') + + '' + this.a_config[0] + '
    ' + (this.a_children.length ? '' : ''); + **/ +} + +function item_get_icon (b_junction) { + return this.o_root.a_tpl['icon_' + ((this.n_depth ? 0 : 32) + (this.a_children.length ? 16 : 0) + (this.a_children.length && this.b_opened ? 8 : 0) + (!b_junction && this.o_root.o_selected == this ? 4 : 0) + (b_junction ? 2 : 0) + (b_junction && this.is_last() ? 1 : 0))]; +} + +var trees = []; +get_element = document.all ? + function (s_id) { return document.all[s_id] } : + function (s_id) { return document.getElementById(s_id) }; Index: lams_tool_spreadsheet/web/includes/javascript/tree_tpl.js =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/tree_tpl.js (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/tree_tpl.js (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,36 @@ +/* + Feel free to use your custom icons for the tree. Make sure they are all of the same size. + User icons collections are welcome, we'll publish them giving all regards. +*/ + +var TREE_TPL = { + 'target' : 'contentFrame', // name of the frame links will be opened in + // other possible values are: _blank, _parent, _search, _self and _top + + 'icon_e' : 'icons/empty.gif', // empty image + 'icon_l' : 'icons/line.gif', // vertical line + + 'icon_32' : 'icons/base.gif', // root leaf icon normal + 'icon_36' : 'icons/base.gif', // root leaf icon selected + + 'icon_48' : 'icons/base.gif', // root icon normal + 'icon_52' : 'icons/base.gif', // root icon selected + 'icon_56' : 'icons/base.gif', // root icon opened + 'icon_60' : 'icons/base.gif', // root icon selected + + 'icon_16' : 'icons/folder.gif', // node icon normal + 'icon_20' : 'icons/folderopen.gif', // node icon selected + 'icon_24' : 'icons/folderopen.gif', // node icon opened + 'icon_28' : 'icons/folderopen.gif', // node icon selected opened + + 'icon_0' : 'icons/page.gif', // leaf icon normal + 'icon_4' : 'icons/page.gif', // leaf icon selected + + 'icon_2' : 'icons/joinbottom.gif', // junction for leaf + 'icon_3' : 'icons/join.gif', // junction for last leaf + 'icon_18' : 'icons/plusbottom.gif', // junction for closed node + 'icon_19' : 'icons/plus.gif', // junctioin for last closed node + 'icon_26' : 'icons/minusbottom.gif',// junction for opened node + 'icon_27' : 'icons/minus.gif' // junctioin for last opended node +}; + Index: lams_tool_spreadsheet/web/includes/javascript/w.htm =================================================================== diff -u --- lams_tool_spreadsheet/web/includes/javascript/w.htm (revision 0) +++ lams_tool_spreadsheet/web/includes/javascript/w.htm (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file Index: lams_tool_spreadsheet/web/layout/ frame.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/layout/ frame.jsp (revision 0) +++ lams_tool_spreadsheet/web/layout/ frame.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,56 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ include file="/common/taglibs.jsp" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <body class="stripes"> + This tool requires the support of frames. Your browser does not support frames. + </body> + + + Index: lams_tool_spreadsheet/web/layout/default.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/layout/default.jsp (revision 0) +++ lams_tool_spreadsheet/web/layout/default.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,20 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ taglib uri="tags-tiles" prefix="tiles"%> + + + + + + + + +

    + +

    +
    + + + + +
    Index: lams_tool_spreadsheet/web/login.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/login.jsp (revision 0) +++ lams_tool_spreadsheet/web/login.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,12 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + Index: lams_tool_spreadsheet/web/pages/authoring/advance.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/advance.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/advance.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,75 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +

    + + + + +

    + +

    + checked="checked" + onclick="document.spreadsheetForm.isMarkingEnabled.disabled = true; + document.spreadsheetForm.isMarkingEnabled.checked = false;" + /> + +

    + + checked="checked" + onclick="document.spreadsheetForm.isMarkingEnabled.disabled = false;" + /> + +

    + +        + + + +

    + +

    + + + +

    + +

    + +

    + + Index: lams_tool_spreadsheet/web/pages/authoring/authoring.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/authoring.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/authoring.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,107 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants"%> + + + + + <fmt:message key="label.authoring.title" /> + + <%@ include file="/common/tabbedheader.jsp"%> + <%@ include file="/common/fckeditorheader.jsp"%> + + + + + + + +
    +

    + +

    + + +
    + + + <%@ include file="/common/messages.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + <%-- Default value + cancelButtonLabelKey="label.authoring.cancel.button" + saveButtonLabelKey="label.authoring.save.button" + cancelConfirmMsgKey="authoring.msg.cancel.save" + accessMode="author" + --%> + + + +
    + + + +
    + + +
    Index: lams_tool_spreadsheet/web/pages/authoring/basic.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/basic.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/basic.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,45 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    + + +
    + + + Index: lams_tool_spreadsheet/web/pages/authoring/definelater.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/definelater.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/definelater.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,85 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="java.util.HashSet"%> +<%@ page import="org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants"%> +<%@ page import="java.util.Set"%> +<%Set tabs = new HashSet(); + tabs.add("label.authoring.heading.basic"); + pageContext.setAttribute("tabs", tabs); + + %> + + + <fmt:message key="label.authoring.title" /> + + <%@ include file="/common/tabbedheader.jsp"%> + <%@ include file="/common/fckeditorheader.jsp"%> + + + + + + + +
    + + + + + + + +

    + +

    + +
    + <%@ include file="/common/messages.jsp"%> + + +
    + + + + + + + +
    + + + + +
    + +
    + +
    Index: lams_tool_spreadsheet/web/pages/authoring/definelaterforbid.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/definelaterforbid.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/definelaterforbid.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,21 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + <fmt:message key="label.authoring.title" /> + + <%@ include file="/common/header.jsp"%> + + +
    +
    +

    + +

    + + +
    +
    + +
    Index: lams_tool_spreadsheet/web/pages/authoring/instructions.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/instructions.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/instructions.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,131 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page + import="org.lamsfoundation.lams.contentrepository.client.IToolContentHandler"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    + +
    + <%@ include file="parts/instructionfilelist.jsp"%> +
    +
    +
    + +
    + + + + + +
    + +
    +
    +
    + +
    + +
    + +
    + <%@ include file="parts/instructionfilelist.jsp"%> +
    +
    +
    + +
    + + + + + +
    + Index: lams_tool_spreadsheet/web/pages/authoring/parts/instructionfilelist.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/parts/instructionfilelist.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/parts/instructionfilelist.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,65 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page + import="org.lamsfoundation.lams.contentrepository.client.IToolContentHandler"%> + + + + + + + + + + + + +<%-- check whehter has target file type --%> + + + + + + +<%-- Display target file type --%> + +
      + + +
    • + + + + + + + + + + + + + + + + + + + + + + + + + + +
    • +
      +
      +
    +
    Index: lams_tool_spreadsheet/web/pages/authoring/parts/instructions.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/parts/instructions.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/parts/instructions.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,81 @@ +<%@ include file="/common/taglibs.jsp"%> + + +
    +
    + + +
    + +
    + + + + + + + + + + + + + + + +
    + ${status.index+1} + + + + <%-- Don't display down icon if last line --%> + + + + " + onclick="upItem('${status.index}')"> + + + "> + + + + + + " + onclick="downItem('${status.index}','${listSize}')"> + + + + "> + + + + + <%-- Don't display down icon if last line --%> + + " + onclick="removeInstruction('${status.index}')"> +
    + +
    +
    + +<%-- This script will adjust spreadsheet item input area height according to the new instruction item amount. --%> + Index: lams_tool_spreadsheet/web/pages/authoring/start.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/authoring/start.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/authoring/start.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,16 @@ + + +<%@ include file="/common/taglibs.jsp" %> + + + + + + + + + + Index: lams_tool_spreadsheet/web/pages/export/exportportfolio.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/export/exportportfolio.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/export/exportportfolio.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,220 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="export.title" /> + + + + + + + + + + + + +
    + +

    + ${title} +

    + +
    + ${instructions} +
    + + + +

    + + + + + + + ${group[0].sessionName} + + +

    + + + + + + + + + + + + + + + + + <%-- Bold styling is to indicate an item created by the author --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + ${item.itemTitle} + + + +
      + +
    1. + ${itemInstruction} +
    2. +
      +
    +
    + +   + +
    +
    + ${item.username} + + + + + + + + + + + + + + + + + + + +
    + + <%-- Display reflection entries --%> + + + + <%-- End all answers for this question --%> +

    + +

    + + +

    + ${reflectDTO.fullName} +

    +

    + +

    +
    +
    + +
    + +
    + +
    + + + + + + +
    Index: lams_tool_spreadsheet/web/pages/learning/definelater.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/learning/definelater.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/learning/definelater.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,21 @@ + + +<%@include file="/common/taglibs.jsp"%> + + + + <%@ include file="/common/header.jsp"%> + + + + +
    +

    + +

    + +
    + + +
    Index: lams_tool_spreadsheet/web/pages/learning/finish.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/learning/finish.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/learning/finish.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,15 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%-- This page just for : redir finish page to parent rather that part of the frame --%> + + + + + + Index: lams_tool_spreadsheet/web/pages/learning/learning.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/learning/learning.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/learning/learning.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,140 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + <fmt:message key="label.learning.title" /> + + <%@ include file="/common/header.jsp"%> + + <%-- param has higher level for request attribute --%> + + + + + + + + + + + + + + +
    +

    + ${spreadsheet.title} +

    + +

    + ${spreadsheet.instructions} +

    + + +
    + + + + + + + + +
    +
    + + <%@ include file="/common/messages.jsp"%> + + + + + +

    + + + +
    +

    + ${sessionMap.reflectInstructions} +

    + + + +

    + + +

    +
    + +

    + +

    +
    +
    + + + + + + +
    +
    + + +
    + + + + + + + + + + + + +
    +
    + +
    + + + + + + +
    Index: lams_tool_spreadsheet/web/pages/learning/notebook.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/learning/notebook.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/learning/notebook.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,53 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + <fmt:message key="label.learning.title" /> + + <%@ include file="/common/header.jsp"%> + + + + + + + + + + + + +
    +

    + ${sessionMap.title} +

    + + <%@ include file="/common/messages.jsp"%> + +

    + +

    + + + +
    + + + +
    +
    +
    + + + + + +
    Index: lams_tool_spreadsheet/web/pages/learning/runoffline.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/learning/runoffline.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/learning/runoffline.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,85 @@ + + +<%@include file="/common/taglibs.jsp"%> + + + + <%@ include file="/common/header.jsp"%> + + + + + +
    +

    + ${sessionMap.title} +

    + +

    + +

    + + +
    +

    + ${sessionMap.reflectInstructions} +

    + + + +

    + + +

    +
    + +

    + +

    +
    +
    + + + + +
    +
    + +
    + + + + + + + + + + + + +
    +
    + + + + +
    Index: lams_tool_spreadsheet/web/pages/learning/start.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/learning/start.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/learning/start.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,23 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + Index: lams_tool_spreadsheet/web/pages/monitoring/editactivity.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/editactivity.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/editactivity.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,44 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +

    + +

    +
    + + + + + + + + + + + + + + + +
    + + : + + +
    + + : + + +
    + + + + + + + +
    + \ No newline at end of file Index: lams_tool_spreadsheet/web/pages/monitoring/instructions.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/instructions.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/instructions.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,96 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    Index: lams_tool_spreadsheet/web/pages/monitoring/monitoring.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/monitoring.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/monitoring.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,96 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.spreadsheet.SpreadsheetConstants"%> + + + + <%@ include file="/common/tabbedheader.jsp" %> + + + +
    +

    + +

    + +
    + + + + + + +
    + + +
    + +
    Index: lams_tool_spreadsheet/web/pages/monitoring/notebook.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/notebook.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/notebook.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,48 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + <fmt:message key="label.learning.title" /> + <%@ include file="/common/header.jsp"%> + + + +
    +

    + +

    + ${userDTO.fullName}

    + + + + + + + +
    + +
    + + + + + + + + +
    + + + + +
    + +
    +
    + + + +
    Index: lams_tool_spreadsheet/web/pages/monitoring/statistics.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/statistics.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/statistics.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,5 @@ +<%@ include file="/common/taglibs.jsp"%> + +
    + <%@ include file="statisticspart.jsp"%> +
    \ No newline at end of file Index: lams_tool_spreadsheet/web/pages/monitoring/statisticspart.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/statisticspart.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/statisticspart.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,35 @@ +<%-- This is for AJAX call to refresh statistic page --%> +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + +
    + +
    + + + +
    + + + +
    + + + +
    +
    \ No newline at end of file Index: lams_tool_spreadsheet/web/pages/monitoring/summary.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/summary.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/summary.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,228 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + +<%-- Overall TaskList information --%> + +
    + + + + On + + + Off + + +
    + + + + + On + + + Off + + +
    + + + + + On + + + Off + + +
    + + + + + On + + + Off + + +
    +
    + +<%-- Summary list --%> + + +
    + +
    +
    + + +

    ${summary.sessionName}

    +

    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + ${user.loginName} + + + + ${user.loginName} + + + + + + tick + + + + cross + + + + + + + +
    + +
    + + + + + + + + + +
    +
    + + <%-- Reflection list --%> + + + +

    + + + + + + + + + + + + + + +
    + + + +
    + ${user.loginName} + + + + + + + +
    +
    +
    + + +
    + + + + + +

    + +

    +
    Index: lams_tool_spreadsheet/web/pages/monitoring/userlist.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/monitoring/userlist.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/monitoring/userlist.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,54 @@ + + + +<%@ include file="/common/taglibs.jsp"%> + + + <%@ include file="/common/header.jsp" %> + + + + +
    + +

    + +

    + + + + + + + + + + + + + + + + + +
    + + + + + +
    + ${user.loginName} + + + + ${user.firstName},${user.lastName} +
    + Close +
    +
    + +
    + + Index: lams_tool_spreadsheet/web/pages/reviewitem/reviewitem.jsp =================================================================== diff -u --- lams_tool_spreadsheet/web/pages/reviewitem/reviewitem.jsp (revision 0) +++ lams_tool_spreadsheet/web/pages/reviewitem/reviewitem.jsp (revision 7f9f772433a7fd55c4475241d4e3bc0765f474e8) @@ -0,0 +1,47 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + <fmt:message key="label.reviewitem.title" /> + + <%@ include file="/common/header.jsp"%> + + + +
    +

    ${userName}


    + + + +
    +
    + +
    +
    + + + +


    + + + + +
    + +
    + +
    +
    +
    + + + +