Skip to content

Commit

Permalink
Added Place for IdentificationType, Added Base export page, Added ref…
Browse files Browse the repository at this point in the history
…resh for all widgets in booking, Added remove GroupLeader, Added only editing guest lightbox
  • Loading branch information
Alessandro Nardecchia committed Mar 14, 2013
1 parent 1a3fe9e commit 993fdb3
Show file tree
Hide file tree
Showing 16 changed files with 472 additions and 60 deletions.
4 changes: 2 additions & 2 deletions mysql.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ DBmaxWait=10000

DBhost=localhost
DBport=3306
DBusername=root
DBpassword=root
DBusername=utente
DBpassword=utente
DBdump=sql
DBdriverClassName=com.mysql.jdbc.Driver
DBurl=jdbc:mysql://localhost:3306/locanda
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.birt.runtime.3_7_1</groupId>
<artifactId>org.apache.xerces</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
<organization>
<name>Sardegna Ricerche</name>
Expand Down
4 changes: 4 additions & 0 deletions src/global_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ city = Citt\u00E0

Citizenship = Cittadinanza

IdentificationTypeProvince = Provincia rilascio documento

IdentificationTypePlace = Luogo rilascio documento

code = Codice

confirmed = Confermato
Expand Down
4 changes: 2 additions & 2 deletions webroot/WEB-INF/jsp/contents/guests_form.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
<div id="col1" role="complementary">
<div class="clearfix" id="col1_content">
<div>
<button class="btn_add_form">
<button class="btn_add_form" style="display:none;">
<s:text name="addNew" />
</button>
<button class="btn_select_guest" id="btnselectG">
<button class="btn_select_guest" style="display:none;" id="btnselectG">
<s:text name="selectGuest" />
</button>
</div>
Expand Down
16 changes: 14 additions & 2 deletions webroot/WEB-INF/jsp/export.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,22 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script>
Entity = {
name : "export",
model : null,
collection : null,
editView : null,
idStructure : <s:property value="#session.user.structure.id"/>
};
</script>

<jsp:include page="layout/header_menu.jsp"/>


<jsp:include page="templates/export.mustache.jsp"/>

<div id="main">
<div id="export-widget"></div>
</div>

<jsp:include page="layout/footer.jsp" />
46 changes: 46 additions & 0 deletions webroot/WEB-INF/jsp/templates/export.mustache.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<%--
*
* Copyright 2011 - Sardegna Ricerche, Distretto ICT, Pula, Italy
*
* Licensed under the EUPL, Version 1.1.
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://www.osor.eu/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and limitations under the Licence.
* In case of controversy the competent court is the Court of Cagliari (Italy).
--%>
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script id="export-template" type="text/x-handlebars-template">
<div class="float_left">
<div class="clear">
<select id="exportsList">
<option value="">Fake select</option>
<option value="1">Fake select</option>
</select>
</div>
<div class="clear">
<input type="text" id="dateExport" name="dateExport" value="" class="datepicker required hasDatepicker" readonly="readonly">
</div>
<div class="clear">
<label id="startexportdate">Dalle...</label>
<label id="endexportdate">Alle...</label>
</div>
</div>
<div class="float_left">
<button class="btn_export_questura">
<s:text name="exportQuestura" />
</button>
<button class="btn_export_sired">
<s:text name="exportSired" />
</button>
</div>
</script>
39 changes: 27 additions & 12 deletions webroot/WEB-INF/jsp/templates/guest.mustache.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script id="edit-template" type="text/x-handlebars-template">
<form id="edit-form" class="yform json full" role="application" style="max-height:400px; overflow-y:scroll;">
<form id="edit-form" class="yform json full" role="application" style="max-height:300px; overflow-y:scroll;">
<div class="c50l">
<div class="type-text">
<label for="FormFirstName"><s:text name="firstName"/><sup title="<s:text name="thisFileMandatory"/>.">*</sup></label>
Expand All @@ -40,22 +40,37 @@
<label for="FormBirthDay"><s:text name="birthDay"/>:</label>
<input type="text" name="birthDate" value="{{birthDate}}" class="datepicker"/>
</div>
<div class="type-select">
<label><s:text name="Citizenship"/>:</label>
<select name="id_citizenship" id="FormCitizenship" size="1" aria-required="true">
{{#availableCitizenships}}<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{description}}</option>{{/availableCitizenships}}
<div class="type-select">
<label><s:text name="Citizenship"/>:</label>
<select name="id_citizenship" id="Formid_countryOfCitizenship" size="1" aria-required="true">
{{#availableCountriesCitizenship}}<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{description}}</option>{{/availableCountriesCitizenship}}
</select>
</div>
<div class="type-select">
<label><s:text name="IdentificationType"/>:</label>
</div>
<div class="type-select" id="FormIdentificationTypeContainer">
<label><s:text name="IdentificationType"/>:</label>
<select name="id_idType" id="IdentificationTypeSelector">
<option value="">Seleziona il tipo di documento</option>
{{#availableIdentificationTypes}}<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{description}}</option>{{/availableIdentificationTypes}}
</select>
<label for="FormIdNumber"><s:text name="idNumber"/></label>
<input type="text"name="idNumber" id="FormIdNumber" value="{{idNumber}}" aria-required="true"/>
</div>
<div class="type-text">
<label for="FormIdNumber"><s:text name="idNumber"/></label>
<input type="text"name="idNumber" id="FormIdNumber" value="{{idNumber}}" aria-required="true"/>
</div>
<div class="type-select" id="FormIdentificationType">
<input type="hidden" name="id_idPlace" id="id_idPlace" value="{{#id_idPlace}}{{id_idPlace}}{{/id_idPlace}}" />
<div id="IdentificationTypeProvinceSelector" class="clear none">
<label><s:text name="IdentificationTypeProvince"/>:</label>
<select name="FormIdentificationTypeProvince" id="FormIdentificationTypeProvinceSelector">
<option value="">Seleziona la provincia</option>
{{#ITProvinces}}
<option value="{{code}}">{{description}}</option>
{{/ITProvinces}}
</select>
</div>
<div id="IdentificationTypePlaceSelector" class="clear none">
<label><s:text name="IdentificationTypePlace"/>:</label>
<select id="FormIdentificationTypePlace" aria-required="true"></select>
</div>
</div>
<div class="type-button">
<button class="btn_save"><s:text name="save"/></button>
<button class="btn_reset"><s:text name="cancel"/></button>
Expand Down
13 changes: 9 additions & 4 deletions webroot/WEB-INF/jsp/templates/housed.mustache.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<script id="selectbooker-template" type="text/x-handlebars-template">
<a class="set_booker" href="#"><s:text name="selectBooker" /></a>
{{#data}}
<div class="clear">
<div class="clear bookerdetails">
<ul>
<li>
<b><s:text name="firstName"/>:</b> {{firstName}}<br/>
Expand Down Expand Up @@ -56,7 +56,7 @@
<input type="radio" name="groupType" value="CAPOFAMIGLIA" {{#data.family}}checked="checked"{{/data.family}} /> Famiglia<br/>
<input type="radio" name="groupType" value="CAPOGRUPPO" {{#data.group}}checked="checked"{{/data.group}} /> Gruppo
</div>
<div class="float_left">
<div class="float_left groupleaderdetails">
<ul>
<li>
<b><s:text name="firstName"/>:</b> {{firstName}}<br/>
Expand All @@ -75,6 +75,9 @@
</li>
</ul>
</div>
<div class="float_left">
<img title="Rimuovi" alt="Rimuovi" src="images/delete.png" class="groupleader_clear">
</div>
</div>
{{/data}}
{{^data}}
Expand All @@ -99,9 +102,11 @@
<li>
<div class="row-item">
<input type="hidden" name="housedid" value="{{id}}"/>
<input type="hidden" name="guestid" value="{{guest.id}}"/>
<ul>
<li><b><s:text name="firstName"/>: </b>{{guest.firstName}}</li>
<li><b><s:text name="lastName"/>: </b>{{guest.lastName}}</li><li><b><s:text name="notes"/>: </b>{{guest.notes}}</li>
<li class="houseddetails"><b><s:text name="firstName"/>: </b>{{guest.firstName}}</li>
<li class="houseddetails"><b><s:text name="lastName"/>: </b>{{guest.lastName}}</li>
<li class="houseddetails"><b><s:text name="notes"/>: </b>{{guest.notes}}</li>
<li>
<div class="housed_accordion">
<h2><a href="#"><s:text name="selectHousedDates" /></a></h2>
Expand Down
12 changes: 12 additions & 0 deletions webroot/css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ text-align:left;
float:right;
}

.clear {
clear:both;
}

.none {
display:none;
}
Expand Down Expand Up @@ -151,4 +155,12 @@ text-align:left;

#selecthouseds-list ul li {
margin: 0px !important;
}

.bookerdetails {
cursor:pointer;
}

.groupleaderdetails {
cursor:pointer;
}
Empty file.
2 changes: 2 additions & 0 deletions webroot/js/collections/guest.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ window.Guests = Backbone.Collection.extend({
url: function () {
if (GetQueryStringParams('housed')=='true') {
return 'rest/guests/structure/' + this.idWrapper + '/search' + this.from + this.to + '?term=' + this.term +"&housed=true";
} else if (GetQueryStringParams('id')) {
return 'rest/guests/'+GetQueryStringParams('id');
} else {
return 'rest/guests/structure/' + this.idWrapper + '/search' + this.from + this.to + '?term=' + this.term ;
}
Expand Down
1 change: 1 addition & 0 deletions webroot/js/helpers/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,5 @@ function GetQueryStringParams(sParam) {
return sParameterName[1];
}
}
return null;
}
Empty file added webroot/js/models/export.js
Empty file.
57 changes: 57 additions & 0 deletions webroot/js/views/export.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* @class ExportView
* @parent Backbone.View
* @constructor
* View for export.
* @tag views
* @author LabOpenSource
*/
window.ExportView = Backbone.View.extend({
el: $('#export-widget'),
events: {
'change #exportsList':'selectedExport',
'click .btn_export_questura':'doExportQuestura',
'click .btn_export_sired':'doExportSired',
},
initialize: function(options) {
this.render();
},
render: function() {
$(this.el).html(Mustache.to_html($('#export-template').html(), {}));
$(".btn_export_questura").button({
icons: {
primary: "ui-icon-check"
}
});
$(".btn_export_sired").button({
icons: {
primary: "ui-icon-check"
}
});

// initialize and render datepickers.
this.$(".datepicker").removeClass('hasDatepicker').datepicker("destroy");
this.$( 'input[name="dateExport"]' ).datepicker({
maxDate: new Date(),
changeMonth: true,
changeYear: true,
showOn: "both",
buttonImage: "images/calendar.gif",
buttonImageOnly: true,
dateFormat: 'dd/mm/yy',
});
},
selectedExport: function(e) {
alert('sssssssse');
},
doExportQuestura: function(e) {
alert('Ti arresto!');
},
doExportSired: function(e) {
alert('boooo');
}
});

window.ExportWidget = new ExportView({

});
Loading

0 comments on commit 993fdb3

Please sign in to comment.