Skip to content

Commit

Permalink
SAK-31079 Mobile - Create reports screen not fully responsive (sakaip…
Browse files Browse the repository at this point in the history
  • Loading branch information
josecebe authored and jonespm committed Apr 25, 2017
1 parent fd5b5de commit a0c82de
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ public String getIdValue(Object object, int index) {
protected void onUpdate(AjaxRequestTarget target) {
if(ReportManager.WHO_CUSTOM.equals(getReportParams().getWho())) {
addUsers(selectOptionsRV);
whoUserIds.add(new AttributeModifier("style", new Model("width: 300px")));
who.remove(this);
whoUserIds.add(new AttributeModifier("onchange", new Model("checkWhoSelection();")));
target.add(who);
Expand Down
8 changes: 8 additions & 0 deletions sitestats/sitestats-tool/src/webapp/css/sitestats.css
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ table.formContainer {
margin: 0.1em 0.3em;
border:1px solid #888888;
}
.formContainer .responsive-form {
width: 300px;
}
@media screen and (max-width: 580px) {
.formContainer .responsive-form {
width: 100%;
}
}


/** Summary Table */
Expand Down
34 changes: 17 additions & 17 deletions sitestats/sitestats-tool/src/webapp/html/pages/ReportsEditPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,31 +70,31 @@ <h4 class="summaryHeader">
<wicket:message key="report_reporttitle">[title]</wicket:message>
</td>
<td>
<input type="text" wicket:id="reportDef.title" style="width: 300px;"/>
<input type="text" wicket:id="reportDef.title" class="responsive-form"/>
</td>
</tr>
<tr wicket:id="titleLocalizedContainer">
<td class="lbl">
<wicket:message key="report_reporttitle_localized">[localized_title]</wicket:message>
</td>
<td>
<span wicket:id="titleLocalized" style="width: 300px;"></span>
<span wicket:id="titleLocalized" class="responsive-form"></span>
</td>
</tr>
<tr>
<td class="lbl">
<wicket:message key="report_reportdescription">[description]</wicket:message>
</td>
<td>
<textarea wicket:id="reportDef.description" cols="30" rows="4" style="width: 300px;"></textarea>
<textarea wicket:id="reportDef.description" cols="30" rows="4" class="responsive-form"></textarea>
</td>
</tr>
<tr wicket:id="descriptionLocalizedContainer">
<td class="lbl">
<wicket:message key="report_reportdescription_localized">[localized_description]</wicket:message>
</td>
<td>
<textarea wicket:id="descriptionLocalized" disabled="disabled" cols="30" rows="4" style="width: 300px;"></textarea>
<textarea wicket:id="descriptionLocalized" disabled="disabled" cols="30" rows="4" class="responsive-form"></textarea>
</td>
</tr>
</table>
Expand All @@ -116,7 +116,7 @@ <h4 class="summaryHeader">
<wicket:message key="report_what_activity">[Activity:]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.what" class="what" style="width: 300px; margin-right: 0; " onchange="checkWhatSelection();"/>
<select wicket:id="reportParams.what" class="what responsive-form" style="margin-right: 0; " onchange="checkWhatSelection();"/>
<!-- Event selection type -->
<select wicket:id="reportParams.whatEventSelType" class="what-events-selection-type" style="width: 173px; margin-left: 0; display:none" onchange="checkWhatSelection();"/>
</td>
Expand All @@ -131,7 +131,7 @@ <h4 class="summaryHeader">
<td>
<!-- Tool selection -->
<div id="what-tools-select" style="display:none">
<select wicket:id="reportParams.whatToolIds" style="width: 300px; overflow: auto;" size="7" multiple="multiple" class="what-tools-select-component">
<select wicket:id="reportParams.whatToolIds" style="overflow: auto;" size="7" multiple="multiple" class="what-tools-select-component responsive-form">
<span wicket:id="selectOptionsRV1">
<span wicket:id="selectOptions">
<option wicket:id="option"></option>
Expand All @@ -141,7 +141,7 @@ <h4 class="summaryHeader">
</div>
<!-- Event selection -->
<div id="what-events-select" style="display:none">
<select wicket:id="reportParams.whatEventIds" style="width: 300px; overflow: auto;" size="7" multiple="multiple">
<select wicket:id="reportParams.whatEventIds" class="responsive-form" style="overflow: auto;" size="7" multiple="multiple">
<span wicket:id="selectOptionsRV2">
<span wicket:id="group">
<span wicket:id="selectOptions">
Expand All @@ -158,7 +158,7 @@ <h4 class="summaryHeader">
<wicket:message key="report_what_resource_action">[report_what_resource_action]</wicket:message>
</span>
<select wicket:id="reportParams.whatResourceAction" class="whatResourceAction" style="margin-top: 5px" onclick="checkWhatSelection();"/>
<div style="width: 300px;">
<div class="responsive-form">
<input type="checkbox" wicket:id="reportParams.whatLimitedResourceIds" class="whatLimitedResourceIds" onclick="checkWhatSelection();"/>
<wicket:message key="report_what_sel_resources">[report_what_sel_resources]</wicket:message>
</div>
Expand All @@ -183,7 +183,7 @@ <h4 class="summaryHeader">
<wicket:message key="report_when_period">[report_when_period]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.when" class="when" style="width: 300px;" onchange="checkWhenSelection();"/>
<select wicket:id="reportParams.when" class="when responsive-form" onchange="checkWhenSelection();"/>
</td>
</tr>
<tr id="when-custom-from" style="display: none">
Expand Down Expand Up @@ -220,31 +220,31 @@ <h4 class="summaryHeader">
<wicket:message key="report_who_users">[report_who_users]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.who" class="who" style="width: 300px;" onchange="checkWhoSelection();"/>
<select wicket:id="reportParams.who" class="who responsive-form" onchange="checkWhoSelection();"/>
</td>
</tr>
<tr id="whoRole" style="display: none">
<td class="lbl">
<wicket:message key="report_who_role_sel">[report_who_role]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.whoRoleId" class="who-role-select" style="width: 300px;"/>
<select wicket:id="reportParams.whoRoleId" class="who-role-select responsive-form"/>
</td>
</tr>
<tr id="whoGroup" wicket:id="who-groups-tr" style="display: none">
<td class="lbl">
<wicket:message key="report_who_group_sel">[report_who_group]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.whoGroupId" class="who-group-select" style="width: 300px;"/>
<select wicket:id="reportParams.whoGroupId" class="who-group-select responsive-form"/>
</td>
</tr>
<tr id="whoCustom" style="display: none">
<td class="lbl">
<wicket:message key="report_who_custom_sel">[report_who_custom]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.whoUserIds" style="width: 300x;" size="7" multiple="multiple">
<select wicket:id="reportParams.whoUserIds" class="responsive-form" size="7" multiple="multiple">
<span wicket:id="selectOptionsRV">
<span wicket:id="selectOptions">
<option wicket:id="option"></option>
Expand All @@ -271,15 +271,15 @@ <h4 class="summaryHeader">
<wicket:message key="report_reportsite">[site_to_report]</wicket:message>
</td>
<td>
<select wicket:id="reportSite" class="reportSite" style="width: 300px;" onchange="checkReportDetails()"/>
<select wicket:id="reportSite" class="reportSite responsive-form" onchange="checkReportDetails()"/>
</td>
</tr>
<tr>
<td class="lbl">
<wicket:message key="report_howtotalsby">[report_howtotalsby]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.howTotalsBy" class="howTotalsBy" style="width: 300px;" multiple="multiple" size="6" onchange="checkHowTotalsBySelection(); checkHowChartSelection();">
<select wicket:id="reportParams.howTotalsBy" class="howTotalsBy responsive-form" multiple="multiple" size="6" onchange="checkHowTotalsBySelection(); checkHowChartSelection();">
<span wicket:id="howTotalsByOptions">
<span wicket:id="selectOptions">
<option wicket:id="option"></option>
Expand Down Expand Up @@ -320,15 +320,15 @@ <h4 class="summaryHeader">
<wicket:message key="report_howpresentation">[report_howpresentation]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.howPresentationMode" class="howPresentation" style="width: 300px; margin-right: 0; " onchange="checkHowChartSelection()"/>
<select wicket:id="reportParams.howPresentationMode" class="howPresentation responsive-form" style="margin-right: 0; " onchange="checkHowChartSelection()"/>
</td>
</tr>
<tr id="chartTypeTr">
<td class="lbl">
<wicket:message key="report_howcharttype">[report_howcharttype]</wicket:message>
</td>
<td>
<select wicket:id="reportParams.howChartType" class="howChartType" style="width: 300px; margin-right: 0; " onchange="checkHowChartSelection()"/>
<select wicket:id="reportParams.howChartType" class="howChartType responsive-form" style="margin-right: 0; " onchange="checkHowChartSelection()"/>
</td>
</tr>
<tr id="chartDataSourceTr">
Expand Down
2 changes: 0 additions & 2 deletions sitestats/sitestats-tool/src/webapp/script/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ function checkHowChartSelection() {
function checkWhatSelection() {
var what = jQuery('#what').val();
if(what == 'what-visits' || what == 'what-presences') {
jQuery('#what').css('width','300px');
jQuery('#what-selection-label').hide();
jQuery('#whatEventSelType').hide();
jQuery('#what-tools-select').hide();
Expand All @@ -241,7 +240,6 @@ function checkWhatSelection() {
jQuery('#what-resources-options').hide();
jQuery('#what-resources-select').hide();
}else if(what == 'what-resources') {
jQuery('#what').css('width','300px');
jQuery('#what-selection-label').show();
jQuery('#whatEventSelType').hide();
jQuery('#what-tools-select').hide();
Expand Down

0 comments on commit a0c82de

Please sign in to comment.