Skip to content

Commit

Permalink
Merge branch 'release/1.6.6.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
iperdomo committed Nov 8, 2013
2 parents 9c0a44e + 329a9b3 commit 97ead73
Show file tree
Hide file tree
Showing 31 changed files with 696 additions and 47 deletions.
33 changes: 16 additions & 17 deletions Dashboard/app/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2121,14 +2121,11 @@ nav.smallMenu ul li a.showQuestion:hover { background: url(../images/showQuestio
.questionNbr span {
display: inline-block;
margin: -10px 0.6em 0 0;
padding: 0.2em 0 0 0;
width: 2em;
height: 1.8em;
border-radius: 1em;
padding:0.3em 0.6em;
border-radius: 0.75em;
background: rgb(58,58,58);
color: rgb(223,223,223);
text-align: center;
font-weight: bold;
font-size: 0.8em;
-moz-box-shadow: 0 -1px 0 rgb(185,185,185), 0 2px 0 rgb(255,255,255);
-webkit-box-shadow: 0 -1px 0 rgb(185,185,185), 0 2px 0 rgb(255,255,255);
Expand Down Expand Up @@ -2687,6 +2684,17 @@ footer.bottomPage a[rel="self"]:hover { }
font-size: 1.2em;
font-family: Georgia, "Times New Roman", Times, serif;
}
.fixedMenu {
background: none repeat scroll 0 0 #FFFFFF;
box-shadow: 0 1px 3px #F2F2F2;
height: 35px;
padding:10px 0;
position: fixed;
top: 15.3%;
width: 60%;
min-width:500px;
z-index: 9999;
}
.surveyPreviewWrap div.questionGroupBlock {
margin: 5em auto;
padding: 0.5em 1em 1em 1em;
Expand Down Expand Up @@ -2736,24 +2744,15 @@ footer.bottomPage a[rel="self"]:hover { }
}
.surveyPreviewWrap .innerContent h1.questionNbr span {
display: inline-block;
margin: 0.1em 0.2em 0 0;
padding: 0 0 0 0;
margin: 0.1em 0.5em 0 0;
width: inherit;
height: inherit;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
background: transparent;
color: rgb(58,58,58);
text-align: center;
font-weight: bold;
font-size: 1.2em;
-o-border-radius: 0;
}

.surveyPreviewWrap .innerContent h1.questionNbr span:after {
display: inline-block;
margin: 0 0.2em 0 0;
content: ".";
margin: 0 0.5em 0 0;
}
.surveyPreviewWrap .previewQuestion { margin: 2.5em auto 0 auto; }
/********************************************************************************************************************************
Expand Down
1 change: 1 addition & 0 deletions Dashboard/app/js/lib/controllers/survey-controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ FLOW.questionControl = Ember.ArrayController.create({
});
// restore order in case the order has gone haywire
this.restoreOrder(questionsInGroup);
FLOW.selectedControl.selectedSurvey.set('status', 'NOT_PUBLISHED');
FLOW.store.commit();
},

Expand Down
4 changes: 0 additions & 4 deletions Dashboard/app/js/lib/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ FLOW.Router = Ember.Router.extend({
}
},

doManageNotifications: function (router, event) {
router.transitionTo('navSurveys.navSurveysEdit.manageNotifications');
},

doEditQuestions: function (router, event) {
router.transitionTo('navSurveys.navSurveysEdit.editQuestions');
},
Expand Down
31 changes: 26 additions & 5 deletions Dashboard/app/js/lib/views/devices/assignment-edit-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,33 @@ FLOW.AssignmentEditView = FLOW.View.extend({
FLOW.selectedControl.set('selectedSurveyAssignment', null);
}.observes('FLOW.router.navigationController.selected', 'FLOW.router.devicesSubnavController.selected'),

assignmentNotComplete: function () {
if (Ember.empty(this.get('assignmentName'))) {
FLOW.dialogControl.set('activeAction', 'ignore');
FLOW.dialogControl.set('header', Ember.String.loc('_assignment_name_not_set'));
FLOW.dialogControl.set('message', Ember.String.loc('_assignment_name_not_set_text'));
FLOW.dialogControl.set('showCANCEL', false);
FLOW.dialogControl.set('showDialog', true);
return true;
}
if (Ember.none(FLOW.dateControl.get('toDate')) || Ember.none(FLOW.dateControl.get('fromDate'))) {
FLOW.dialogControl.set('activeAction', 'ignore');
FLOW.dialogControl.set('header', Ember.String.loc('_date_not_set'));
FLOW.dialogControl.set('message', Ember.String.loc('_date_not_set_text'));
FLOW.dialogControl.set('showCANCEL', false);
FLOW.dialogControl.set('showDialog', true);
return true;
}
return false;
},

saveSurveyAssignment: function () {
var sa, endDateParse, startDateParse, devices = [],
surveys = [];
if (this.assignmentNotComplete()){
return;
}
sa = FLOW.selectedControl.get('selectedSurveyAssignment');

sa.set('name', this.get('assignmentName'));

if (!Ember.none(FLOW.dateControl.get('toDate'))) {
Expand Down Expand Up @@ -156,10 +178,9 @@ FLOW.AssignmentEditView = FLOW.View.extend({
},

selectAllSurveys: function () {
var selected = Ember.A([]);
FLOW.surveyControl.get('content').forEach(function (item) {
selected.pushObject(item);
});
var selected = FLOW.surveyControl.get('content').filter(function (item) {
return item.get('status') === "PUBLISHED";
});
FLOW.selectedControl.set('selectedSurveys', selected);
},

Expand Down
7 changes: 3 additions & 4 deletions Dashboard/app/js/lib/views/devices/survey-bootstrap-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ FLOW.SurveyBootstrap = FLOW.View.extend({
},

selectAllSurveys: function () {
var selected = Ember.A([]);
FLOW.surveyControl.get('content').forEach(function (item) {
selected.pushObject(item);
var selected = FLOW.surveyControl.get('content').filter(function (item) {
return item.get('status') === "PUBLISHED";
});
FLOW.selectedControl.set('selectedSurveys', selected);
FLOW.selectedControl.set('selectedSurveys', selected);
},

deselectAllSurveys: function () {
Expand Down
2 changes: 1 addition & 1 deletion Dashboard/app/js/lib/views/reports/export-reports-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ FLOW.ExportReportsAppletView = FLOW.View.extend({

selectedSurvey: function () {
return FLOW.selectedControl.selectedSurvey.get('keyId');
}.property(),
}.property('FLOW.selectedControl.selectedSurvey'),

showRawDataReport: function () {
var sId = this.get('selectedSurvey');
Expand Down
1 change: 1 addition & 0 deletions Dashboard/app/js/lib/views/surveys/question-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ FLOW.QuestionView = FLOW.View.extend({
});
// restore order in case the order has gone haywire
FLOW.questionControl.restoreOrder(questionsInGroup);
FLOW.selectedControl.selectedSurvey.set('status', 'NOT_PUBLISHED');
FLOW.store.commit();
},

Expand Down
63 changes: 53 additions & 10 deletions Dashboard/app/js/lib/views/surveys/survey-details-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,36 @@ FLOW.SurveySidebarView = FLOW.View.extend({
return FLOW.questionGroupControl.content.toArray().length;
}.property('FLOW.questionGroupControl.content.@each'),

surveyNotComplete: function () {
if (Ember.empty(this.get('surveyTitle'))) {
FLOW.dialogControl.set('activeAction', 'ignore');
FLOW.dialogControl.set('header', Ember.String.loc('_survey_title_not_set'));
FLOW.dialogControl.set('message', Ember.String.loc('_survey_title_not_set_text'));
FLOW.dialogControl.set('showCANCEL', false);
FLOW.dialogControl.set('showDialog', true);
return true;
}
if (Ember.empty(this.get('surveyPointType'))) {
FLOW.dialogControl.set('activeAction', 'ignore');
FLOW.dialogControl.set('header', Ember.String.loc('_survey_type_not_set'));
FLOW.dialogControl.set('message', Ember.String.loc('_survey_type_not_set_text'));
FLOW.dialogControl.set('showCANCEL', false);
FLOW.dialogControl.set('showDialog', true);
return true;
}
return false;
},

doManageTranslations: function () {
// check if we have questions that are still loading
if (Ember.none(FLOW.questionControl.get('content'))){
FLOW.dialogControl.set('activeAction', "ignore");
FLOW.dialogControl.set('header', Ember.String.loc('_no_questions'));
FLOW.dialogControl.set('message', Ember.String.loc('_no_questions_text'));
FLOW.dialogControl.set('showCANCEL', false);
FLOW.dialogControl.set('showDialog', true);
return;
}
// check if we have questions that are still loading
if (!FLOW.questionControl.content.get('isLoaded')){
FLOW.dialogControl.set('activeAction', "ignore");
Expand All @@ -90,6 +119,9 @@ FLOW.SurveySidebarView = FLOW.View.extend({
FLOW.dialogControl.set('showDialog', true);
return;
}
if (this.surveyNotComplete()){
return;
}
// check if we have any unsaved changes
survey = FLOW.store.find(FLOW.Survey, FLOW.selectedControl.selectedSurvey.get('keyId'));
this.setIsDirty();
Expand All @@ -103,18 +135,29 @@ FLOW.SurveySidebarView = FLOW.View.extend({
FLOW.router.transitionTo('navSurveys.navSurveysEdit.manageTranslations');
},


doManageNotifications: function () {
if (this.surveyNotComplete()){
return;
}
// check if we have any unsaved changes
survey = FLOW.store.find(FLOW.Survey, FLOW.selectedControl.selectedSurvey.get('keyId'));
this.setIsDirty();
if (!Ember.none(survey) && this.get('isDirty')) {
FLOW.dialogControl.set('activeAction', "ignore");
FLOW.dialogControl.set('header', Ember.String.loc('_you_have_unsaved_changes'));
FLOW.dialogControl.set('message', Ember.String.loc('_before_notifications_save'));
FLOW.dialogControl.set('showCANCEL', false); FLOW.dialogControl.set('showDialog', true);
return;
}
FLOW.router.transitionTo('navSurveys.navSurveysEdit.manageNotifications');
},

doSaveSurvey: function () {
var survey;
// validation
if (this.get('surveyPointType') === null) {
FLOW.dialogControl.set('activeAction', 'ignore');
FLOW.dialogControl.set('header', Ember.String.loc('_survey_type_not_set'));
FLOW.dialogControl.set('message', Ember.String.loc('_survey_type_not_set_text'));
FLOW.dialogControl.set('showCANCEL', false);
FLOW.dialogControl.set('showDialog', true);
return;
}

if (this.surveyNotComplete()){
return;
}
survey = FLOW.selectedControl.get('selectedSurvey');
survey.set('name', this.get('surveyTitle'));
survey.set('code', this.get('surveyTitle'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</label>
</form>
<a {{action "doManageTranslations" target="this"}} class="manageNotifications"><span>+</span>{{t _manage_translations}}</a>
<a {{action "doManageNotifications"}} class="manageNotifications"><span>+</span>{{t _manage_notifications}}</a>
<a {{action "doManageNotifications" target="this"}} class="manageNotifications"><span>+</span>{{t _manage_notifications}}</a>
<ul class="newSurveyInfoUl" id="">
<li>
<h3>{{t _survey_summary}}</h3>
Expand Down
2 changes: 1 addition & 1 deletion Dashboard/app/js/templates/navUsers/nav-users.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{/view}}
{{#view FLOW.ColumnView item="permissionList" type="user"}}
<a {{action "sort" target="this"}} class="emailAdr">{{t _permission_level}}</a>
{{tooltip _there_are_three_permission_levels}}
{{tooltip _there_are_two_permission_levels}}
{{/view}}
<th class="action noArrows" >{{t _actions}}</th>
</tr>
Expand Down
11 changes: 10 additions & 1 deletion GAE/src/locale/en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ Are\ you\ sure\ you\ want\ to\ delete\ this\ survey,\ its\ question\ groups,\ an
Are\ you\ sure\ you\ want\ to\ delete\ this\ user? = Are you sure you want to delete this user?
Assignment\ details = Assignment details
Assignment\ name = Assignment name
Assignment\ name\ not\ set = Assignment name not set
Assignments\ list = Assignments list
Attaching\ a\ tag\ to\ a\ question\ is\ a\ way\ to\ follow\ questions\ over\ multiple\ surveys.\ In\ future,\ this\ will\ be\ used\ for\ reporting\ across\ multiple\ surveys. = Attaching a tag to a question is a way to follow questions over multiple surveys. In future, this will be used for reporting across multiple surveys.
Attribute\ name = Attribute name
Barcode = Barcode
Before\ editing\ notifications,\ you\ have\ to\ save\ your\ changes\ to\ the\ survey\ by\ clicking\ the\ "save"\ button = Before editing notifications, you have to save your changes to the survey by clicking the "save" button
Before\ editing\ translations,\ you\ have\ to\ save\ your\ changes\ to\ the\ survey\ by\ clicking\ the\ "save"\ button = Before editing translations, you have to save your changes to the survey by clicking the "save" button
Before\ publishing,\ you\ have\ to\ save\ your\ changes\ by\ clicking\ the\ "save"\ button = Before publishing, you have to save your changes by clicking the "save" button
Before\ saving\ an\ assignment,\ you\ need\ to\ set\ an\ assignment\ name = Before saving an assignment, you need to set an assignment name
Before\ you\ can\ add\ questions\ groups\ to\ a\ survey,\ you\ first\ need\ to\ save\ the\ survey.\ click\ ok\ the\ save\ button\ in\ the\ left\ sidebar = Before you can add questions groups to a survey, you first need to save the survey. click ok the save button in the left sidebar
Before\ you\ save\ or\ publish\ a\ survey,\ you\ have\ to\ give\ the\ survey\ a\ title = Before you save or publish a survey, you have to give the survey a title
Before\ you\ save\ or\ publish\ a\ survey,\ you\ have\ to\ select\ a\ survey\ type = Before you save or publish a survey, you have to select a survey type
Build\ chart = Build chart
Bulk\ upload\ data = Bulk upload data
Expand Down Expand Up @@ -168,6 +172,7 @@ Maximum\ value = Maximum value
Message = Message
Messages = Messages
Minimum\ value = Minimum value
Missing\ date\ = Missing date
Modified = Modified
Move = Move
Move\ group\ here = Move group here
Expand All @@ -180,6 +185,7 @@ Next = Next
Next\ record = Next record
No\ details = No details
No\ options\ for\ this\ type\ of\ question = No options for this type of question
No\ questions\ available = No questions available
Not\ published = Not published
Notification\ details = Notification details
Notification\ email = Notification email
Expand Down Expand Up @@ -283,13 +289,15 @@ Survey\ groups = Survey groups
Survey\ preview = Survey preview
Survey\ summary = Survey summary
Survey\ title = Survey title
Survey\ title\ not\ set = Survey title not set
Survey\ translation = Survey translation
Survey\ type\ not\ set = Survey type not set
Surveys = Surveys
Tag = Tag
Terms\ of\ service = Terms of service
The\ barcode\ app\ on\ the\ device\ is\ used\ here = The barcode app on the device is used here
The\ camera\ of\ the\ device\ is\ used\ here = The camera of the device is used here
The\ from\ or\ to\ date\ has\ not\ been\ set = The from or to date has not been set
The\ gps\ of\ the\ device\ is\ used\ here = The gps of the device is used here
The\ language\ you\ have\ selected\ is\ the\ same\ as\ the\ default\ language\ of\ the\ survey.\ You\ cannot\ add\ a\ translation\ in\ the\ same\ language. = The language you have selected is the same as the default language of the survey. You cannot add a translation in the same language.
The\ master\ language\ should\ not\ be\ changed\ once\ data\ has\ been\ collected\ for\ this\ survey = The master language should not be changed once data has been collected for this survey
Expand All @@ -302,7 +310,7 @@ The\ survey\ copy\ has\ been\ started.\ Please\ consult\ the\ messages\ tab\ to\
The\ survey\ has\ been\ published.\ please\ consult\ the\ messages\ tab\ to\ see\ if\ the\ publishing\ has\ succeeded.\ this\ may\ take\ a\ few\ minutes = The survey has been published. please consult the messages tab to see if the publishing has succeeded. this may take a few minutes
The\ upload\ process\ was\ cancelled = The upload process was cancelled
The\ video\ camera\ of\ the\ device\ is\ used\ here = The video camera of the device is used here
There\ are\ three\ permission\ levels:\ User,\ Project\ Editor\ and\ Administrator.\ Read\ more\ on\ the\ FLOW\ documentation\ site,\ or\ contact\ your\ Administrator\ for\ details. = There are three permission levels: User, Project Editor and Administrator. Read more on the FLOW documentation site, or contact your Administrator for details.
There\ are\ two\ permission\ levels:\ User,\ Administrator.\ Read\ more\ on\ the\ FLOW\ documentation\ site,\ or\ contact\ your\ Administrator\ for\ details. = There are two permission levels: User, Administrator. Read more on the FLOW documentation site, or contact your Administrator for details.
This\ cannot\ be\ undone = This cannot be undone
Title = Title
To = To
Expand Down Expand Up @@ -331,6 +339,7 @@ You\ cannot\ delete\ this\ survey\ because\ it\ contains\ questions\ and/or\ has
You\ cannot\ delete\ this\ survey\ group\ because\ it\ contains\ surveys,\ and\ possibly\ data.\ Please\ delete\ the\ surveys\ and\ data\ first. = You cannot delete this survey group because it contains surveys, and possibly data. Please delete the surveys and data first.
You\ have\ unsaved\ changes = You have unsaved changes
You\ have\ unsaved\ translations = You have unsaved translations
You\ haven't\ defined\ any\ questions\ yet = You haven't defined any questions yet
You\ must\ provide\ some\ DB\ instructions = You must provide some DB instructions
You\ must\ select\ a\ RAW\ DATA\ REPORT\ (.xlsx)\ to\ import = You must select a RAW DATA REPORT (.xlsx) to import
You\ must\ select\ a\ survey\ for\ running\ the\ import\ process = You must select a survey for running the import process
Expand Down
11 changes: 10 additions & 1 deletion GAE/src/locale/ui-strings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ _are_you_sure_you_want_to_delete_this_user = Are you sure you want to delete thi
_assignment_delete_header = Are you sure you want to delete this assignment?
_assignment_details = Assignment details
_assignment_name = Assignment name
_assignment_name_not_set = Assignment name not set
_assignment_name_not_set_text = Before saving an assignment, you need to set an assignment name
_assignments_list = Assignments list
_attr_delete_header = Are you sure you want to delete this attribute?
_attribute_name = Attribute name
_barcode = Barcode
_before_notifications_save = Before editing notifications, you have to save your changes to the survey by clicking the "save" button
_before_publishing_ = Before publishing, you have to save your changes by clicking the "save" button
_before_translations_save = Before editing translations, you have to save your changes to the survey by clicking the "save" button
_build_chart = Build chart
Expand Down Expand Up @@ -78,6 +81,8 @@ _dashboard_language = Language
_data = Data
_data_cleaning = Data cleaning
_date = Date
_date_not_set = Missing date
_date_not_set_text = The from or to date has not been set
_default_language = Default language
_delete = Delete
_delete_record_header = Delete this record?
Expand Down Expand Up @@ -185,6 +190,8 @@ _next = Next
_next_record = Next record
_no_details = No details
_no_options_for_this_question_type = No options for this type of question
_no_questions = No questions available
_no_questions_text = You haven't defined any questions yet
_not_published = Not published
_notification_details = Notification details
_notification_email = Notification email
Expand Down Expand Up @@ -301,6 +308,8 @@ _survey_preview = Survey preview
_survey_published_text_ = The survey has been published. please consult the messages tab to see if the publishing has succeeded. this may take a few minutes
_survey_summary = Survey summary
_survey_title = Survey title
_survey_title_not_set = Survey title not set
_survey_title_not_set_text = Before you save or publish a survey, you have to give the survey a title
_survey_translation = Survey translation
_survey_type_not_set = Survey type not set
_survey_type_not_set_text = Before you save or publish a survey, you have to select a survey type
Expand All @@ -311,7 +320,7 @@ _the_barcode_app_on_the_device_is_used_here = The barcode app on the device is u
_the_camera_of_the_device_is_used_here = The camera of the device is used here
_the_gps_of_the_device_is_used_here = The gps of the device is used here
_the_video_camera_of_the_device_is_used_here = The video camera of the device is used here
_there_are_three_permission_levels = There are three permission levels: User, Project Editor and Administrator. Read more on the FLOW documentation site, or contact your Administrator for details.
_there_are_two_permission_levels = There are two permission levels: User, Administrator. Read more on the FLOW documentation site, or contact your Administrator for details.
_this_cant_be_undo = This cannot be undone
_title = Title
_to = To
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class SurveyEventNotificationHandler extends BaseNotificationHandler {
private static final String APPROVAL_HEADER = "A submission has been approved:";
private static final String APPROVAL_FOOTER = "Please visit the dashboard to view the details";
private static final String SUBMISSION_HEADER = "A submission has been received:";
private static final String SUBMISSION_FOOTER = "Please visit the daashboard to approve";
private static final String SUBMISSION_FOOTER = "Please visit the dashboard to approve";
private static final String SUBMISSION_SUBJECT = "FLOW Submisson Received";
private static final String APPROVAL_SUBJECT = "FLOW Submission Approval";

Expand Down
Loading

0 comments on commit 97ead73

Please sign in to comment.