From a0b391f29082a84a7d95d3dbb47ea9b8ced02b44 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 2 Mar 2009 16:09:32 +0000 Subject: [PATCH] updated some string labels to make them more specific. plugged in some style for testing. next step, move to external css git-svn-id: svn://svn.open-ils.org/ILS/trunk@12350 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../web/js/dojo/openils/conify/nls/conify.js | 23 +++++++------ .../conify/global/action/survey/edit.js | 32 +++++++++++-------- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/conify/nls/conify.js b/Open-ILS/web/js/dojo/openils/conify/nls/conify.js index f5351f7450..5896fbdf3f 100644 --- a/Open-ILS/web/js/dojo/openils/conify/nls/conify.js +++ b/Open-ILS/web/js/dojo/openils/conify/nls/conify.js @@ -73,14 +73,17 @@ "SUCCESS_SAVING_HOO": "Hours of Operation updated for ${0}", "SUCCESS_SAVING_ILL": "Saved changes to the ILL Address of ${0}", "SUCCESS_SAVING_MAILING": "Saved changes to the Mailing Address of ${0}", - "SUCCESS_SAVING_PHYSICAL": "Saved changes to the Physical Address of ${0}", - "TRANSLATION": "Translation", - "END_SURVEY": "End Survey Now", - "SAVE_ADD": "Save Question & Add Answer", - "DELETE_QUESTION": "Delete Question & Answers", - "DELETE_ANSWER": "Delete Answer", - "SAVE_CHANGES": "Save Changes", - "ADD_ANSWER": "Add Answer", - "ANSWER": "Answer:", - "QUESTION": "Question:" + "SUCCESS_SAVING_PHYSICAL": "Saved changes to the Physical Address of ${0}", + "TRANSLATION": "Translation", + "END_SURVEY": "End Survey Now", + "SURVEY_SAVE_ADD": "Save Question & Add Answer", + "SURVEY_DELETE_QUESTION": "Delete Question & Answers", + "SURVEY_DELETE_ANSWER": "Delete Answer", + "SURVEY_SAVE_CHANGES": "Save Changes", + "SURVEY_ADD_ANSWER": "Add Answer", + "SURVEY_ANSWER": "Answer:", + "SURVEY_QUESTION": "Question:", + "SURVEY_ID": "

Survey ID # ${0}

", + "SURVEY_FOOT_LABEL": "

Questions & Answers

" } + diff --git a/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js b/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js index 74d1ef3466..2eea06c402 100644 --- a/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js +++ b/Open-ILS/web/js/ui/default/conify/global/action/survey/edit.js @@ -23,19 +23,25 @@ var localeStrings = dojo.i18n.getLocalization('openils.conify', 'conify'); function drawSurvey(svyId) { today = new Date(); var surveyTable = dojo.byId('edit-pane'); - var surveyHead = dojo.create('thead', {style: "background-color: #99CCFF"}, surveyTable); + var surveyHead = dojo.create('thead', {style: "background-color: #99CCFF"}, surveyTable); + var headRow = dojo.create('tr', null, surveyHead); + var headCell = dojo.create('td', {innerHTML: dojo.string.substitute(localeStrings.SURVEY_ID, [svyId]), style: "width: 100%"}, headRow); var pcrud = new openils.PermaCrud(); var survey = pcrud.retrieve('asv', svyId); startDate = dojo.date.stamp.fromISOString(survey.start_date()); endDate = dojo.date.stamp.fromISOString(survey.end_date()); var pane = new openils.widget.EditPane({fmObject : survey, hideActionButtons:false}, dojo.byId('edit-pane')); if ( endDate > today) { - var buttonBody = dojo.create( 'tbody', {innerHTML: "End Survey Now"}, surveyTable); + var buttonBody = dojo.create( 'td', null, headRow); var endButton = new dijit.form.Button({label: localeStrings.END_SURVEY, onClick:function() {endSurvey(survey.id())} }, buttonBody); - } + } pane.fieldOrder = ['id', 'name', 'description', 'owner', 'start_date', 'end_date']; pane.onCancel = cancelEdit; pane.startup(); + var surveyFoot = dojo.create('tfoot', {style: "background-color: #99CCFF"}, surveyTable); + var footRow = dojo.create('tr', { style: "width: 100%"}, surveyFoot); + var footLabel = dojo.create('td', {innerHTML: localeStrings.SURVEY_FOOT_LABEL, style: "width: 100%"}, footRow); + var footCell = dojo.create('td', {innerHTML: "
", style: "width: 100%"}, footRow); getQuestions(svyId, survey); } @@ -77,11 +83,11 @@ function newQuestionBody(svyId) { var surveyTable = dojo.byId("survey_table"); var surveyBody = dojo.create('tbody', {style: "background-color: #d9e8f9"}, surveyTable); var questionRow = dojo.create('tr', null, surveyBody); - var questionLabel = dojo.create('td',{ innerHTML: localeStrings.QUESTION}, questionRow, "first"); + var questionLabel = dojo.create('td',{ innerHTML: localeStrings.SURVEY_QUESTION}, questionRow, "first"); var questionTextbox = dojo.create('td', null, questionRow, "second"); var qInput = new dijit.form.TextBox(null, questionTextbox); var questionButton = dojo.create('td', null , questionRow); - var qButton = new dijit.form.Button({ label: localeStrings.SAVE_ADD, onClick:function() {newQuestion(svyId, qInput.getValue(), questionRow)} }, questionButton); + var qButton = new dijit.form.Button({ label: localeStrings.SURVEY_SAVE_ADD, onClick:function() {newQuestion(svyId, qInput.getValue(), questionRow)} }, questionButton); } @@ -90,15 +96,15 @@ function drawQuestionBody(question, answers, survey){ var surveyTable = dojo.byId('survey_table'); var surveyBody = dojo.create( 'tbody', {quid:question.id(), id:("q" + question.id()), style: "background-color: #d9e8f9"}, surveyTable); var questionRow = dojo.create('tr', {quid:question.id()}, surveyBody); - var questionLabel = dojo.create('td', {quid:question.id(), innerHTML: localeStrings.QUESTION}, questionRow, "first"); + var questionLabel = dojo.create('td', {quid:question.id(), innerHTML: localeStrings.SURVEY_QUESTION}, questionRow, "first"); var questionTextbox = dojo.create('td', {quid: question.id() }, questionRow, "second"); var qInput = new dijit.form.TextBox(null, questionTextbox); qInput.attr('value', question.question()); if (startDate > today){ var questionButton = dojo.create('td', {quid: question.id()}, questionRow); - var qButton = new dijit.form.Button({label: localeStrings.DELETE_QUESTION, onClick:function() {deleteQuestion(question.id(), surveyBody) }}, questionButton); + var qButton = new dijit.form.Button({label: localeStrings.SURVEY_DELETE_QUESTION, onClick:function() {deleteQuestion(question.id(), surveyBody) }}, questionButton); var qChangesButton = dojo.create('td', {quid: question.id()}, questionRow); - var qcButton = new dijit.form.Button({label: localeStrings.SAVE_CHANGES, onClick:function() {changeQuestion(question.id(), qInput.attr('value')) }}, qChangesButton); + var qcButton = new dijit.form.Button({label: localeStrings.SURVEY_SAVE_CHANGES, onClick:function() {changeQuestion(question.id(), qInput.attr('value')) }}, qChangesButton); } for (var i in answers) { @@ -154,7 +160,7 @@ function drawAnswer(answer, qid, surveyBody, survey) { var surveyBody = dojo.byId(("q" + qid)); var answerRow = dojo.create('tr', {anid: answer.id(), style: "background-color: #FFF"}, surveyBody); var answerSpacer = dojo.create('td', {anid: answer.id()}, answerRow, "first"); - var answerLabel = dojo.create('td', {anid: answer.id(), style: "float: right", innerHTML: localeStrings.ANSWER }, answerRow, "second"); + var answerLabel = dojo.create('td', {anid: answer.id(), style: "float: right", innerHTML: localeStrings.SURVEY_ANSWER }, answerRow, "second"); var answerTextbox = dojo.create('td', {anid: answer.id() }, answerRow, "third"); var input = new dijit.form.TextBox(null, answerTextbox); input.attr('value', answer.answer()); @@ -162,20 +168,20 @@ function drawAnswer(answer, qid, surveyBody, survey) { var answerSpacer = dojo.create('td', {anid: answer.id()}, answerRow); var delanswerButton = dojo.create('td', {anid: answer.id()}, answerRow); var aid = answer.id(); - var aButton = new dijit.form.Button({label: localeStrings.DELETE_ANSWER, onClick:function(){deleteAnswer(aid);answerRow.parentNode.removeChild(answerRow)} }, delanswerButton); + var aButton = new dijit.form.Button({label: localeStrings.SURVEY_DELETE_ANSWER, onClick:function(){deleteAnswer(aid);answerRow.parentNode.removeChild(answerRow)} }, delanswerButton); var aChangesButton = dojo.create('td', {anid: qid}, answerRow); - var acButton = new dijit.form.Button({label: localeStrings.SAVE_CHANGES, onClick:function() {changeAnswer(answer.id(), input.attr('value')) }}, aChangesButton); + var acButton = new dijit.form.Button({label: localeStrings.SURVEY_SAVE_CHANGES, onClick:function() {changeAnswer(answer.id(), input.attr('value')) }}, aChangesButton); } } function drawNewAnswerRow(qid, surveyBody) { var answerRow = dojo.create('tr', {quid: qid, style: "background-color: #FFF"}, surveyBody); var answerSpacer = dojo.create('td', {quid: qid}, answerRow, "first"); - var answerLabel = dojo.create('td', {quid: qid, innerHTML: localeStrings.ANSWER, style: "float:right" }, answerRow, "second"); + var answerLabel = dojo.create('td', {quid: qid, innerHTML: localeStrings.SURVEY_ANSWER, style: "float:right" }, answerRow, "second"); var answerTextbox = dojo.create('td', {quid: qid }, answerRow, "third"); var input = new dijit.form.TextBox(null, answerTextbox); var answerButton = dojo.create('td', {anid: qid}, answerRow); - var aButton = new dijit.form.Button({label: localeStrings.ADD_ANSWER, onClick:function() {newAnswer(qid, input.attr('value'), answerRow, surveyBody)} }, answerButton); + var aButton = new dijit.form.Button({label: localeStrings.SURVEY_ADD_ANSWER, onClick:function() {newAnswer(qid, input.attr('value'), answerRow, surveyBody)} }, answerButton); } -- 2.43.2