Browse files

minify, fix approved for stats_group import

  • Loading branch information...
1 parent 04f8a25 commit 7624ee8e0842914bc32293821439057e14439ccc @flavour flavour committed Oct 3, 2012
View
2 VERSION
@@ -1 +1 @@
-a1ee30c (2012-10-03 17:05:19)
+04f8a25 (2012-10-03 17:32:28)
View
17 controllers/vulnerability.py
@@ -864,8 +864,7 @@ def getReportDetails(id, buttonsRequired):
value = IS_INT_AMOUNT().represent(row.stats_demographic_data.value)
tr.append(TD(value, _class = "demoStatistic"))
location = s3db.gis_location_represent(row.stats_demographic_data.location_id,
- show_link = False
- )
+ show_link = False)
tr.append(TD(location, _class = "demoSource"))
table.append(tr)
elif reportType == "stats_map" or reportType == "stats_image":
@@ -908,7 +907,7 @@ def getReportDetails(id, buttonsRequired):
desc = DIV(record.name, _class="imageDesc")
url = URL(c="default", f="download", args=record.file)
download = A(T("Download"), _class="download", _href=url)
- table = TABLE(_class = "imageTable")
+ table = TABLE(_class="imageTable")
table.append(TR(TD(desc),
TD(download),
_class="mapRow"))
@@ -917,17 +916,17 @@ def getReportDetails(id, buttonsRequired):
else:
valid = False
# Place the table in a form and attach the buttons (if required)
- form = FORM(_id = "form%s" % id)
+ form = FORM(_id="form%s" % id)
if valid:
form.append(table)
else:
- form.append(DIV(T("No data available"),_class="mapRow"))
+ form.append(DIV(T("No data available"), _class="mapRow"))
if buttonsRequired:
if valid:
- form.append(INPUT(_type = "button", _name = "Approve%s" % id,
- _value = "Approve", _class = "approveButton"))
- form.append(INPUT(_type = "button", _name = "Decline%s" % id,
- _value = "Decline", _class = "declineButton"))
+ form.append(INPUT(_type="button", _name="Approve%s" % id,
+ _value="Approve", _class="approveButton"))
+ form.append(INPUT(_type="button", _name="Decline%s" % id,
+ _value="Decline", _class="declineButton"))
return str(form)
# -----------------------------------------------------------------------------
View
8 modules/eden/stats.py
@@ -1103,7 +1103,7 @@ def stats_parameter_represent(id, row=None):
db = current.db
table = db.stats_parameter
r = db(table._id == id).select(table.name,
- limitby = (0, 1)).first()
+ limitby=(0, 1)).first()
try:
return r.name
except:
@@ -1124,7 +1124,7 @@ def stats_group_type_represent(id, row=None):
db = current.db
table = db.stats_group_type
r = db(table._id == id).select(table.display,
- limitby = (0, 1)).first()
+ limitby=(0, 1)).first()
try:
return r.display
except:
@@ -1147,7 +1147,7 @@ def stats_group_represent(id, row=None):
query = (table._id == id) & \
(stable._id == table.source_id)
r = current.db(query).select(stable.name,
- limitby = (0, 1)).first()
+ limitby=(0, 1)).first()
try:
return r.name
except:
@@ -1193,7 +1193,7 @@ def group(self):
sgtype = current.s3db.stats_group_type
query = (self.stats_group.group_type_id == sgtype.id)
r = current.db(query).select(sgtype.name,
- limitby = (0, 1)).first()
+ limitby=(0, 1)).first()
if (r.name == "stats_vca"):
return "VCA Report"
# @todo: add conditional branch for VCA report
View
19 static/formats/s3csv/vulnerability/data.xsl
@@ -132,8 +132,6 @@
<data field="value"><xsl:value-of select="col[@field='Value']"/></data>
<data field="date"><xsl:value-of select="$date"/></data>
- <!-- Bad to hardcode a created_by to an ID in an .xsl!
- <data field="created_by">1</data> -->
<!-- Link to Indicator -->
<reference field="parameter_id" resource="vulnerability_indicator">
@@ -182,15 +180,22 @@
<xsl:variable name="date" select="col[@field='Date']"/>
<xsl:variable name="status" select="col[@field='Status']"/>
- <resource name="stats_group">
+ <xsl:variable name="approved">
+ <xsl:choose>
+ <xsl:when test="col[@field='Approved']='false'">
+ <xsl:text>false</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>true</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <resource name="stats_group" approved="$approved">
<xsl:attribute name="tuid">
<xsl:value-of select="concat('stats_group/',$locationPath,'/',$date)"/>
</xsl:attribute>
<data field="date"><xsl:value-of select="$date"/></data>
- <xsl:if test="$status='Approved'">
- <data field="approved_by">0</data>
- </xsl:if>
- <data field="created_by">0</data>
<!-- Link to Location -->
<reference field="location_id" resource="gis_location">
View
354 static/scripts/S3/s3.dataTables.js
@@ -694,7 +694,7 @@ $(document).ready(function() {
}
} // end of loop through for each table
- function setSpecialSortRules(t){
+ function setSpecialSortRules(t) {
var titles = aoTableConfig[t]['groupTitles'];
var order = Array();
var fname = 'group-title-' + t;
@@ -703,208 +703,208 @@ $(document).ready(function() {
title = titles[0][cnt][0];
order[title] = cnt;
}
- jQuery.fn.dataTableExt.oSort[fname + '-asc'] = function(x,y) {
+ jQuery.fn.dataTableExt.oSort[fname + '-asc'] = function(x, y) {
return ((order[x] < order[y]) ? -1 : ((order[x] > order[y]) ? 1 : 0));
};
- jQuery.fn.dataTableExt.oSort[fname + '-desc'] = function(x,y) {
+ jQuery.fn.dataTableExt.oSort[fname + '-desc'] = function(x, y) {
return ((order[x] < order[y]) ? 1 : ((order[x] > order[y]) ? -1 : 0));
};
- ColumnSettings[t][aoTableConfig[t]['group'][0][0]] = { "sType": fname };
+ ColumnSettings[t][aoTableConfig[t]['group'][0][0]] = {"sType": fname};
}
function initDataTable(oTable, t, bReplace) {
- var config_id = tableId[t] + '_configurations'
+ var config_id = tableId[t] + '_configurations';
if ($(config_id).length > 0) {
config = jQuery.parseJSON($(config_id).val());
} else {
oDataTable[t] = null;
return;
}
- aoTableConfig[t]['groupTitles'] = config['groupTitles'];
- if (config['groupTitles'].length > 0){
- setSpecialSortRules(t);
- }
- aoTableConfig[t]['groupTotals'] = config['groupTotals'];
- aoTableConfig[t]['displayLength'] = config['displayLength'];
- oDataTable[t] = $(oTable).dataTable({
- 'bDestroy': bReplace,
- 'sDom': sDom[t],
- 'sPaginationType': sPaginationType[t],
- 'bServerSide': bServerSide,
- 'bAutoWidth' : false,
- 'bFilter': aoTableConfig[t]['bFilter'] == 'true',
- 'bSort': true,
- 'bDeferRender': true,
- 'aaSorting': aoTableConfig[t]['aaSort'],
- "aaSortingFixed": aoTableConfig[t]['group'],
- "aoColumnDefs": [ oGroupColumns[t] ],
- 'aoColumns': ColumnSettings[t],
- 'iDisplayLength': aoTableConfig[t]['displayLength'],
- 'aLengthMenu': [[ 25, 50, -1], [ 25, 50, S3.i18n.all]],
- 'bProcessing': bProcessing,
- 'sAjaxSource': aoTableConfig[t]['ajaxUrl'],
- 'fnServerData': fnAjaxCallback[t],
- 'fnHeaderCallback' : function (nHead, aasData, iStart, iEnd, aiDisplay) {
- $('#modeSelectionAll').on('click', setModeSelectionAll);
- $('#modeSelectionNone').on('click', setModeSelectionNone);
- },
- 'fnRowCallback': function(nRow, aData, iDisplayIndex) {
- // Extract the id # from the link
- t = tableIdReverse(this.selector);
- var actionCol = aoTableConfig[t]['actionCol'];
- var re = />(.*)</i;
- var result = re.exec(aData[actionCol]);
- if (result == null) {
- var id = aData[actionCol];
- } else {
- var id = result[1];
- }
- // Set the action buttons in the id column for each row
- if (aoTableConfig[t]['rowActions'].length > 0 || aoTableConfig[t]['bulkActions']) {
- var Buttons = '';
- if (aoTableConfig[t]['rowActions'].length > 0) {
- var Actions = aoTableConfig[t]['rowActions'];
- // Loop through each action to build the button
- for (var i=0; i < Actions.length; i++) {
+ aoTableConfig[t]['groupTitles'] = config['groupTitles'];
+ if (config['groupTitles'].length > 0) {
+ setSpecialSortRules(t);
+ }
+ aoTableConfig[t]['groupTotals'] = config['groupTotals'];
+ aoTableConfig[t]['displayLength'] = config['displayLength'];
+ oDataTable[t] = $(oTable).dataTable({
+ 'bDestroy': bReplace,
+ 'sDom': sDom[t],
+ 'sPaginationType': sPaginationType[t],
+ 'bServerSide': bServerSide,
+ 'bAutoWidth' : false,
+ 'bFilter': aoTableConfig[t]['bFilter'] == 'true',
+ 'bSort': true,
+ 'bDeferRender': true,
+ 'aaSorting': aoTableConfig[t]['aaSort'],
+ "aaSortingFixed": aoTableConfig[t]['group'],
+ "aoColumnDefs": [ oGroupColumns[t] ],
+ 'aoColumns': ColumnSettings[t],
+ 'iDisplayLength': aoTableConfig[t]['displayLength'],
+ 'aLengthMenu': [[ 25, 50, -1], [ 25, 50, S3.i18n.all]],
+ 'bProcessing': bProcessing,
+ 'sAjaxSource': aoTableConfig[t]['ajaxUrl'],
+ 'fnServerData': fnAjaxCallback[t],
+ 'fnHeaderCallback' : function (nHead, aasData, iStart, iEnd, aiDisplay) {
+ $('#modeSelectionAll').on('click', setModeSelectionAll);
+ $('#modeSelectionNone').on('click', setModeSelectionNone);
+ },
+ 'fnRowCallback': function(nRow, aData, iDisplayIndex) {
+ // Extract the id # from the link
+ t = tableIdReverse(this.selector);
+ var actionCol = aoTableConfig[t]['actionCol'];
+ var re = />(.*)</i;
+ var result = re.exec(aData[actionCol]);
+ if (result == null) {
+ var id = aData[actionCol];
+ } else {
+ var id = result[1];
+ }
+ // Set the action buttons in the id column for each row
+ if (aoTableConfig[t]['rowActions'].length > 0 || aoTableConfig[t]['bulkActions']) {
+ var Buttons = '';
+ if (aoTableConfig[t]['rowActions'].length > 0) {
+ var Actions = aoTableConfig[t]['rowActions'];
+ // Loop through each action to build the button
+ for (var i=0; i < Actions.length; i++) {
- $('th:eq(0)').css( { 'width': 'auto' } );
+ $('th:eq(0)').css( { 'width': 'auto' } );
- // Check if action is restricted to a subset of records
- if ('restrict' in Actions[i]) {
- if (inList(id, Actions[i].restrict) == -1) {
- continue;
+ // Check if action is restricted to a subset of records
+ if ('restrict' in Actions[i]) {
+ if (inList(id, Actions[i].restrict) == -1) {
+ continue;
+ }
}
- }
- var c = Actions[i]._class;
- var label = S3.Utf8.decode(Actions[i].label);
- re = /%5Bid%5D/g;
- if (Actions[i]._onclick) {
- var oc = Actions[i]._onclick.replace(re, id);
- Buttons = Buttons + '<a class="' + c + '" onclick="' + oc + '">' + label + '</a>' + '&nbsp;';
- } else if (Actions[i]._jqclick) {
- Buttons = Buttons + '<span class="' + c + '" id="' + id + '">' + label + '</span>' + '&nbsp;';
- fnActionCallBacks[t].push([id, S3ActionCallBack]);
- }else {
- if (Actions[i].icon) {
- label = '<img src="'+Actions[i].icon+'" alt="'+label+'" title="'+label+'">';
+ var c = Actions[i]._class;
+ var label = S3.Utf8.decode(Actions[i].label);
+ re = /%5Bid%5D/g;
+ if (Actions[i]._onclick) {
+ var oc = Actions[i]._onclick.replace(re, id);
+ Buttons = Buttons + '<a class="' + c + '" onclick="' + oc + '">' + label + '</a>' + '&nbsp;';
+ } else if (Actions[i]._jqclick) {
+ Buttons = Buttons + '<span class="' + c + '" id="' + id + '">' + label + '</span>' + '&nbsp;';
+ fnActionCallBacks[t].push([id, S3ActionCallBack]);
+ }else {
+ if (Actions[i].icon) {
+ label = '<img src="'+Actions[i].icon+'" alt="'+label+'" title="'+label+'">';
+ }
+ var url = Actions[i].url.replace(re, id);
+ Buttons = Buttons + '<a class="'+ c + '" href="' + url + '">' + label + '</a>' + '&nbsp;';
}
- var url = Actions[i].url.replace(re, id);
- Buttons = Buttons + '<a class="'+ c + '" href="' + url + '">' + label + '</a>' + '&nbsp;';
- }
- } // end of loop through for each row Action for this table
- } // end of if there are to be Row Actions for this table
- // Put the actions buttons in the actionCol
- if ((aoTableConfig[t]['group'].length > 0) && (aoTableConfig[t]['group'][0][0] < actionCol)) {
- actionCol -= 1;
- }
- $('td:eq(' + actionCol + ')', nRow).html( Buttons );
- } // end of processing for the action and bulk buttons
+ } // end of loop through for each row Action for this table
+ } // end of if there are to be Row Actions for this table
+ // Put the actions buttons in the actionCol
+ if ((aoTableConfig[t]['group'].length > 0) && (aoTableConfig[t]['group'][0][0] < actionCol)) {
+ actionCol -= 1;
+ }
+ $('td:eq(' + actionCol + ')', nRow).html( Buttons );
+ } // end of processing for the action and bulk buttons
- // Code to toggle the selection of the row
- if (aoTableConfig[t]['bulkActions']) {
- setSelectionClass(t, nRow, inList(id, selectedRows[t]));
- }
- // Code to add special CSS styles to a row
- styles = aoTableConfig[t]['rowStyles'];
- for (style in styles) {
- if (inList(id, styles[style]) > -1) {
- $(nRow).addClass( style );
+ // Code to toggle the selection of the row
+ if (aoTableConfig[t]['bulkActions']) {
+ setSelectionClass(t, nRow, inList(id, selectedRows[t]));
}
- }
- // Code to condense any text that is longer than the display limits
- tdposn = 0;
- gList = [];
- if (aoTableConfig[t]['group'].length > 0) {
- groupList = aoTableConfig[t]['group'];
- var gList = [];
- for (var gCnt=0; gCnt < groupList.length; gCnt++) {
- gList.push(groupList[gCnt][0]);
- }
- }
- for (var i=0; i < aData.length; i++) {
- // Ignore any columns used for groups
- if ($.inArray(i, gList) != -1) { continue; }
- // Ignore if the data starts with an html open tag
- if (aData[i][0] == '<') {
- tdposn++;
- continue;
- }
- if (aData[i].length > textDisplay[t][0]) {
- uniqueid = '_' + t + iDisplayIndex + i;
- icon = '<a href="javascript:toggleDiv(\''+uniqueid+'\');" class="ui-icon ui-icon-zoomin" style="float:right"></a>';
- display = '<div id="display'+uniqueid+'">' + icon + aData[i].substr(0,textDisplay[t][1]) + "&hellip;</div>";
- icon = '<a href="javascript:toggleDiv(\''+uniqueid+'\');" class="ui-icon ui-icon-zoomout" style="float:right"></a>';
- display += '<div style="display:none" id="full'+uniqueid+'">' + icon + aData[i] + "</div>";
- $('td:eq(' + tdposn + ')', nRow).html( display );
+ // Code to add special CSS styles to a row
+ styles = aoTableConfig[t]['rowStyles'];
+ for (style in styles) {
+ if (inList(id, styles[style]) > -1) {
+ $(nRow).addClass( style );
+ }
}
- tdposn++; // increment the count of the td tags (don't do this for groups)
- } // end of code to condense 'long text' in a cell
- return nRow;
- }, // end of fnRowCallback
- 'fnDrawCallback': function(oSettings) {
- table = '#' + oSettings.nTable.id;
- t = tableIdReverse(table);
- bindButtons(t);
- if (oSettings.aiDisplay.length == 0) {
- return;
- }
- if (aoTableConfig[t]['group'].length > 0) {
- groupList = aoTableConfig[t]['group'];
- for (var gCnt=0; gCnt < groupList.length; gCnt++) {
- // The prefixID is used to identify what will be added to the key for the
- // groupTotals, typically it will be a comma separated list of the groups
- prefixID = [];
- for (var pixidCnt = 0; pixidCnt < gCnt; pixidCnt++) {
- prefixID.push(groupList[pixidCnt][0]);
+ // Code to condense any text that is longer than the display limits
+ tdposn = 0;
+ gList = [];
+ if (aoTableConfig[t]['group'].length > 0) {
+ groupList = aoTableConfig[t]['group'];
+ var gList = [];
+ for (var gCnt=0; gCnt < groupList.length; gCnt++) {
+ gList.push(groupList[gCnt][0]);
}
- group = groupList[gCnt];
- groupTotals = [];
- if (aoTableConfig[t]['groupTotals'].length > gCnt) {
- groupTotals = aoTableConfig[t]['groupTotals'][gCnt];
+ }
+ for (var i=0; i < aData.length; i++) {
+ // Ignore any columns used for groups
+ if ($.inArray(i, gList) != -1) { continue; }
+ // Ignore if the data starts with an html open tag
+ if (aData[i][0] == '<') {
+ tdposn++;
+ continue;
}
- groupTitles = [];
- if (aoTableConfig[t]['groupTitles'].length > gCnt) {
- groupTitles = aoTableConfig[t]['groupTitles'][gCnt];
+ if (aData[i].length > textDisplay[t][0]) {
+ uniqueid = '_' + t + iDisplayIndex + i;
+ icon = '<a href="javascript:toggleDiv(\''+uniqueid+'\');" class="ui-icon ui-icon-zoomin" style="float:right"></a>';
+ display = '<div id="display'+uniqueid+'">' + icon + aData[i].substr(0,textDisplay[t][1]) + "&hellip;</div>";
+ icon = '<a href="javascript:toggleDiv(\''+uniqueid+'\');" class="ui-icon ui-icon-zoomout" style="float:right"></a>';
+ display += '<div style="display:none" id="full'+uniqueid+'">' + icon + aData[i] + "</div>";
+ $('td:eq(' + tdposn + ')', nRow).html( display );
}
- buildGroups(oSettings,
- t,
- group[0],
- groupTotals,
- prefixID,
- groupTitles,
- gCnt + 1
- );
+ tdposn++; // increment the count of the td tags (don't do this for groups)
+ } // end of code to condense 'long text' in a cell
+ return nRow;
+ }, // end of fnRowCallback
+ 'fnDrawCallback': function(oSettings) {
+ table = '#' + oSettings.nTable.id;
+ t = tableIdReverse(table);
+ bindButtons(t);
+ if (oSettings.aiDisplay.length == 0) {
+ return;
}
- // Now loop through each row and add the subLevel controls for row collapsing
- var shrink = aoTableConfig[t]['shrinkGroupedRows'] == 'individual';
- var accordion = aoTableConfig[t]['shrinkGroupedRows'] == 'accordion';
- if (shrink || accordion) {
- var nTrs = $(tableId[t] + ' tbody tr');
- var sublevel = '';
- for (var i=0; i < nTrs.length; i++) {
- obj = $(nTrs[i]);
- // If the row is a headerRow get the level
- if (obj.hasClass('headerRow')) {
- item = getElementClass(obj, 'group_');
- sublevel = 'sublevel' + item.substr(6);
- } else {
- $(nTrs[i]).addClass(sublevel);
- $(nTrs[i]).addClass('collapsable');
+ if (aoTableConfig[t]['group'].length > 0) {
+ groupList = aoTableConfig[t]['group'];
+ for (var gCnt=0; gCnt < groupList.length; gCnt++) {
+ // The prefixID is used to identify what will be added to the key for the
+ // groupTotals, typically it will be a comma separated list of the groups
+ prefixID = [];
+ for (var pixidCnt = 0; pixidCnt < gCnt; pixidCnt++) {
+ prefixID.push(groupList[pixidCnt][0]);
}
- } // end of loop through each row adding controls to collapse & expand the grouped table
- $('.collapsable').hide();
- if (accordion) {
- accordionRow(t, 'level_1', 'group_' + t + '11');
+ group = groupList[gCnt];
+ groupTotals = [];
+ if (aoTableConfig[t]['groupTotals'].length > gCnt) {
+ groupTotals = aoTableConfig[t]['groupTotals'][gCnt];
+ }
+ groupTitles = [];
+ if (aoTableConfig[t]['groupTitles'].length > gCnt) {
+ groupTitles = aoTableConfig[t]['groupTitles'][gCnt];
+ }
+ buildGroups(oSettings,
+ t,
+ group[0],
+ groupTotals,
+ prefixID,
+ groupTitles,
+ gCnt + 1
+ );
}
- } // end of collapsable rows
- }
- if (Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength) > 1) {
- $(tableId[t] + '_paginate').css('display', 'block');
- } else {
- $(tableId[t] + '_paginate').css('display', 'none');
- }
- } // end of fnDrawCallback
- }); // end of call to $(oTable).datatable()
+ // Now loop through each row and add the subLevel controls for row collapsing
+ var shrink = aoTableConfig[t]['shrinkGroupedRows'] == 'individual';
+ var accordion = aoTableConfig[t]['shrinkGroupedRows'] == 'accordion';
+ if (shrink || accordion) {
+ var nTrs = $(tableId[t] + ' tbody tr');
+ var sublevel = '';
+ for (var i=0; i < nTrs.length; i++) {
+ obj = $(nTrs[i]);
+ // If the row is a headerRow get the level
+ if (obj.hasClass('headerRow')) {
+ item = getElementClass(obj, 'group_');
+ sublevel = 'sublevel' + item.substr(6);
+ } else {
+ $(nTrs[i]).addClass(sublevel);
+ $(nTrs[i]).addClass('collapsable');
+ }
+ } // end of loop through each row adding controls to collapse & expand the grouped table
+ $('.collapsable').hide();
+ if (accordion) {
+ accordionRow(t, 'level_1', 'group_' + t + '11');
+ }
+ } // end of collapsable rows
+ }
+ if (Math.ceil((oSettings.fnRecordsDisplay()) / oSettings._iDisplayLength) > 1) {
+ $(tableId[t] + '_paginate').css('display', 'block');
+ } else {
+ $(tableId[t] + '_paginate').css('display', 'none');
+ }
+ } // end of fnDrawCallback
+ }); // end of call to $(oTable).datatable()
} // end of initDataTable function
// Allow dataTables to be initialised outside of this function.
View
310 static/scripts/S3/s3.dataTables.min.js
155 additions, 155 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
12 static/scripts/S3/s3.vulnerability.js
@@ -2380,9 +2380,9 @@ function showReports(pSection) {
url: 'report/'
}).done(function(data) {
prepareReport(data);
- if (pSection == "pending"){
+ if (pSection == 'pending') {
accordionRow(0, 'level_1', 'group_011');
- }else if (pSection == "VCA"){
+ }else if (pSection == 'VCA') {
accordionRow(0, 'level_1', 'group_012');
} else {
accordionRow(0, 'level_1', 'group_013');
@@ -2463,8 +2463,9 @@ function getFilteredReport() {
data['demographics'] = true;
}
data['text'] = $('#reportTextSearch').val();
- if ($('#reportsToggle .active').hasClass('myReports'))
+ if ($('#reportsToggle .active').hasClass('myReports')) {
data['myReports'] = true;
+ }
return data;
}
@@ -3012,9 +3013,6 @@ function moreSubmitData() {
$('#newSubmissionRegions, #dataSubmissionRegion .submissionContent').empty();
$('#dataSubmissionRegion').removeClass('mapSubmission imageSubmission otherSubmission demographicsSubmission vcaSubmission loaded').removeAttr('style');
$('#dataSubmissionRegion input').attr('disabled', false).attr('checked', false);
- // @ToDo: Where are these used? Global scope?
- //numberSubmissions = 2;
- //numberSubmissionsDeleted = 0;
//$('.dataSubmissionRegion.generic').removeAttr('style')
$('#dataAndReportsSubmissionViews .dataUploadContainer').fadeIn(300);
$('.fileType, .labelFile, .remove, .imgDesc, .fakePlaceholder, .labelHangRight, .checkHangRight').fadeIn(300);
@@ -3027,7 +3025,7 @@ function moreSubmitData() {
function indicatorsCheckCommune() {
switch($('#l3_datas').val()) {
case null:
- case "":
+ case '':
$('#submitOnlineButton').addClass('disabled');
$('#submitDataContent .indicatorsStart p').filter(':first').show(200);
$('#selectCommune').show(200);
View
28 static/scripts/S3/s3.vulnerability.min.js
@@ -50,12 +50,11 @@ try{lx_select(a,1,3)}catch(c){readHierarchy(a,1,3)}});$("#l2_analysis1s").change
2,2)}catch(c){readHierarchy(a,2,2)}});$("#l2_analysis3s").change(function(){var a=this.value,b=hdata[$("#l0_analysis3s").val()];$("#l3_analysis3s").html('<option value="" selected="selected" class="none">Choose '+b.l3+"</option>");try{lx_select(a,2,3)}catch(c){readHierarchy(a,2,3)}});updateSelectMenus(!1);$("#analysisControl2 select, #analysisControl3 select").selectmenu("destroy").selectmenu({style:"popup",maxHeight:280,width:165,menuWidth:165});$("#analysisToggle").selectmenu("destroy").selectmenu({maxHeight:60,
width:145,menuWidth:145});resizeSubmitData();TypeHelpers.insertClasses();$(".closechromeframe").click(function(){$(".chromeframe").hide()});$("#globalBreadCrumb").click(function(){globalView()});$("#show-hide").click(function(){drawerSlide()});$("#risingTab").click(function(){drawerSlide()});$("#newRegion").click(function(){goToRegion()});$("#analysisLink").click(function(){analysisView()});$("#analysisToggle select").click(function(){toggleAnalysis()});$("#backToMap").click(function(){hideAnalysis()});
$("#analysisReset1").click(function(){analysisReset(1)});$("#analysisReset2").click(function(){analysisReset(2)});$("#analysisReset3").click(function(){analysisReset(3)});$(".calculationLink").click(function(){$("#lightbox, #calculationView").fadeIn(300)});$("#calculationView .closePanel").click(function(){$("#lightbox, #calculationView").fadeOut(300)});$(".headerRow").click(function(){$(".rowForApproval").hide();$(".rowForApproval").prev().find(".closeReviewButton").hide();$(".rowForApproval").prev().find(".reviewButton").show();
-$(".headerRow.activeSection td.arrowCell .arrow").html("&rarr;");$(".headerRow.activeSection").removeClass("activeSection");$(this).addClass("activeSection");$(".headerRow.activeSection .arrow").html("&darr;");$(".activeContent").hide("slow");$(".activeContent").removeClass("activeContent");$(this).next().addClass("activeContent");$(this).parent().next().addClass("activeContent");$(".activeContent").fadeIn(200);resizeReports()});$("#filterSubmit").click(function(){displayThanks(S3.i18n.loading_report_details,
-null);$("#table-container").empty();hideReportDetails(id);var a=getFilteredReport();$.ajax({type:"POST",url:"report/filter",data:a}).done(function(a){$(".approvalScreen").hide();displayReport(a)}).fail(function(){alert("error");$(".approvalScreen").hide()})});$("#l3_datas").change(indicatorsCheckCommune);$("#submitIndicators").click(function(){showSubmitData("indicators")});$("#submitReports").click(function(){showSubmitData("reports")});$("#uploadIndicatorsButton").click(uploadSubmitDataIndicators);
-$("#submitDataFooter .reviewNextButton").click(nextSubmitDataReview);$("#submitDataFooter .backButton").click(backSubmitDataReview);$("#submitDataFooter .cancelButton").click(cancelSubmitDataTypeSelection);$("#submitDataFooter .submitAllButton").click(submitImportSubmitData);$("#submitDataFooter .submitMoreButton").click(moreSubmitData);$("#submitOnlineButton").click(function(){$(this).hasClass("disabled")||displaySubmitOnline()});$("#submitDataFooter .reviewSubmissionButton").click(reviewSubmitData);
-$("#submitDataFooter .submitButton").click(function(){$(".submitIndicatorsForm").is(":visible")?submitSubmitData():uploadSubmitDataReport(this)});$(".submitIndicatorsForm input").change(function(){10==$(".submitIndicatorsForm input:radio:checked").length&&$("#submitDataFooter .reviewSubmissionButton").removeClass("disabled")});$(".dataSubmissionRegion input:radio").change(selectOptionSubmitData);$("#lightbox").click(function(){$("#lightbox, #reportsSection, #calculationView, #photoPanel, #submitDataSection").fadeOut(300)});
-$("#reportsSection .closePanel").click(function(){$("#lightbox, #reportsSection").fadeOut(300)});$("#submitDataSection .closePanel").click(function(){$("#submitDataContent").animate({scrollTop:0},100);$("#lightbox, #submitDataSection").fadeOut(300)});$(".listText").hover(function(){$(this).siblings(".popup").show()},function(){$(this).siblings(".popup").hide()});$("#subGeo, .currentQuality").hover(function(){var a=$(this).find(".popup");$(a).data("timeout",setTimeout(function(){showSubGeo(a,200)},
-200))},function(){var a=$(this).find(".popup");hideSubGeo(a,200);clearTimeout($(a).data("timeout"))})});function showSubGeo(a,b){"undefined"!==typeof activeWindow&&(clearTimeout(activeWindow.data("timeout")),activeWindow.fadeOut(b));a.fadeIn(b);activeWindow=a}function hideSubGeo(a,b){a.fadeOut(b)}
+$(".headerRow.activeSection td.arrowCell .arrow").html("&rarr;");$(".headerRow.activeSection").removeClass("activeSection");$(this).addClass("activeSection");$(".headerRow.activeSection .arrow").html("&darr;");$(".activeContent").hide("slow");$(".activeContent").removeClass("activeContent");$(this).next().addClass("activeContent");$(this).parent().next().addClass("activeContent");$(".activeContent").fadeIn(200);resizeReports()});$("#filterSubmit, .panelSearchSubmit").click(filterReport);$("#l3_datas").change(indicatorsCheckCommune);
+$("#submitIndicators").click(function(){showSubmitData("indicators")});$("#submitReports").click(function(){showSubmitData("reports")});$("#uploadIndicatorsButton").click(uploadSubmitDataIndicators);$("#submitDataFooter .reviewNextButton").click(nextSubmitDataReview);$("#submitDataFooter .backButton").click(backSubmitDataReview);$("#submitDataFooter .cancelButton").click(cancelSubmitDataTypeSelection);$("#submitDataFooter .submitAllButton").click(submitImportSubmitData);$("#submitDataFooter .submitMoreButton").click(moreSubmitData);
+$("#submitOnlineButton").click(function(){$(this).hasClass("disabled")||displaySubmitOnline()});$("#submitDataFooter .reviewSubmissionButton").click(reviewSubmitData);$("#submitDataFooter .submitButton").click(function(){$(".submitIndicatorsForm").is(":visible")?submitSubmitData():uploadSubmitDataReport(this)});$(".submitIndicatorsForm input").change(function(){10==$(".submitIndicatorsForm input:radio:checked").length&&$("#submitDataFooter .reviewSubmissionButton").removeClass("disabled")});$(".dataSubmissionRegion input:radio").change(selectOptionSubmitData);
+$("#lightbox").click(function(){$("#lightbox, #reportsSection, #calculationView, #photoPanel, #submitDataSection").fadeOut(300)});$("#reportsSection .closePanel").click(function(){$("#lightbox, #reportsSection").fadeOut(300)});$("#submitDataSection .closePanel").click(function(){$("#submitDataContent").animate({scrollTop:0},100);$("#lightbox, #submitDataSection").fadeOut(300)});$(".listText").hover(function(){$(this).siblings(".popup").show()},function(){$(this).siblings(".popup").hide()});$("#subGeo, .currentQuality").hover(function(){var a=
+$(this).find(".popup");$(a).data("timeout",setTimeout(function(){showSubGeo(a,200)},200))},function(){var a=$(this).find(".popup");hideSubGeo(a,200);clearTimeout($(a).data("timeout"))})});function showSubGeo(a,b){"undefined"!==typeof activeWindow&&(clearTimeout(activeWindow.data("timeout")),activeWindow.fadeOut(b));a.fadeIn(b);activeWindow=a}function hideSubGeo(a,b){a.fadeOut(b)}
function readHierarchy(a,b,d){$.ajax({url:S3.Ap.concat("/vulnerability/vdata/"+a),success:function(){for(var c in n)vdata[c]=n[c];n=null;lx_select(a,b,d)},error:function(a,b,d){msg="UNAUTHORIZED"==d?S3.i18n.gis_requires_login:a.responseText},dataType:"script"})}
function lx_select(a,b,d){if(0==b)if(d)$("#l"+b+"_analysis"+d+"s").val(a);else{$("#l0_select, #l0_reports, #l0_datas, #l0_analysis1s").val(a);var c=hdata[a];$("#l1 label, #l1_report label, #l1_data label").html(c.l1.toUpperCase()+":");$("#l2 label, #l2_report label, #l2_data label").html(c.l2.toUpperCase()+":");$("#l3 label, #l3_report label, #l3_data label").html(c.l3.toUpperCase()+":")}b+=1;d?$("#l"+b+"_analysis"+d).show():$("#l"+b+", #l"+b+"_report, #l"+b+"_data, #l"+b+"_analysis1").show();var e,
f;for(f in vdata)if(c=vdata[f],null!=c.f&&c.f==a){switch(c.r){case 1:e="one";break;case 2:e="two";break;case 3:e="three";break;case 4:e="four";break;case 5:e="five";break;default:e="none"}c='<option value="'+f+'" class="'+e+'">'+c.n+"</option>";d?$("#l"+b+"_analysis"+d+"s").append(c):$("#l"+b+"_select, #l"+b+"_reports, #l"+b+"_datas, #l"+b+"_analysis1s").append(c)}updateSelectMenus(d)}
@@ -118,9 +117,11 @@ drawerOpen=!0}}function goToRegion(){var a;(a=$("#l3_select").val())?v_select_re
function markersOn(){map.addLayer(volunteerLayer);var a=S3.Ap.concat("/static/themes/Vulnerability/img/mapIconOnPng8.png");$("#mapSection").css("background","url("+a+") no-repeat center top transparent");a=S3.Ap.concat("/static/themes/Vulnerability/img/volunteerIconOnPng8.png");$("#volunteerSection").css("background","url("+a+") no-repeat center top transparent");$(".iconSection").css("color","#565656")}
function markersOff(){try{map.removeLayer(volunteerLayer)}catch(a){}var b=S3.Ap.concat("/static/themes/Vulnerability/img/mapIconOffPng8.png");$("#mapSection").css("background","url("+b+") no-repeat center top transparent");b=S3.Ap.concat("/static/themes/Vulnerability/img/volunteerIconOffPng8.png");$("#volunteerSection").css("background","url("+b+") no-repeat center top transparent");$(".iconSection").css("color","#ccc")}
function resizeReports(){reportsHeight=window.innerHeight-111;activeContentHeight=0;$(".activeContent.contentTable .content").children("tr:visible").each(function(){activeContentHeight+=$(this).innerHeight()});507>reportsHeight&&(reportsHeight=507);activeContentHeight>reportsHeight-180&&(activeContentHeight=reportsHeight-180);$("#lightbox").css("height",$("#vulnerability").innerHeight()+"px");$("#reportsContent, #reportFilters").css("height",reportsHeight+"px");$(".activeContent.contentTable").css("height",
-activeContentHeight+"px").css("display","block")}function showReports(a){$("#table-container").empty();displayThanks(S3.i18n.loading_report_details,null);rep_section=a;$.ajax({type:"GET",url:"report/"}).done(function(a){prepareReport(a)}).fail(function(){alert("error")})}
+activeContentHeight+"px").css("display","block")}function showReports(a){$("#table-container").empty();displayThanks(S3.i18n.loading_report_details,null);rep_section=a;$.ajax({type:"GET",url:"report/"}).done(function(b){prepareReport(b);"pending"==a?accordionRow(0,"level_1","group_011"):"VCA"==a?accordionRow(0,"level_1","group_012"):accordionRow(0,"level_1","group_013")}).fail(function(){alert("error")})}
+function toggleReports(a){switch(a){case "myReports":$(".allReports").removeClass("active").html("<a href=\"javascript:toggleReports('allReports')\" title='All Reports'>"+S3.i18n.all_reports.toUpperCase()+"</a>");$(".myReports").addClass("active").html(S3.i18n.my_reports.toUpperCase());break;case "allReports":$(".myReports").removeClass("active").html("<a href=\"javascript:toggleReports('myReports')\" title='My Reports'>"+S3.i18n.my_reports.toUpperCase()+"</a>"),$(".allReports").addClass("active").html(S3.i18n.all_reports.toUpperCase())}filterReport()}
+function filterReport(){displayThanks(S3.i18n.loading_report_details,null);$("#table-container").empty();hideReportDetails(id);var a=getFilteredReport();$.ajax({type:"POST",url:"report/filter",data:a}).done(function(a){$(".approvalScreen").hide();displayReport(a)}).fail(function(){alert("error");$(".approvalScreen").hide()})}
function getFilteredReport(){var a={};a.location_id=$("#l3_reports").val()?$("#l3_reports").val():$("#l2_reports").val()?$("#l2_reports").val():$("#l1_reports").val()?$("#l1_reports").val():$("#l0_reports").val()?$("#l0_reports").val():-1;a.from_date=$("#dateFromReports").val();a.to_date=$("#dateToReports").val();$("#indicatorsCheckbox").is(":checked")&&(a.indicator=!0);$("#mapCheckbox").is(":checked")&&(a.map=!0);$("#imagesCheckbox").is(":checked")&&(a.images=!0);$("#reportsCheckbox").is(":checked")&&
-(a.reports=!0);$("#demographicsCheckbox").is(":checked")&&(a.demographics=!0);return a}
+(a.reports=!0);$("#demographicsCheckbox").is(":checked")&&(a.demographics=!0);a.text=$("#reportTextSearch").val();$("#reportsToggle .active").hasClass("myReports")&&(a.myReports=!0);return a}
function prepareReport(a){$("#dateFromReports").datepicker({dateFormat:"yy-mm-dd",changeYear:!0,changeMonth:!0,maxDate:"+0d",minDate:"-20y"});$("#dateToReports").datepicker({dateFormat:"yy-mm-dd",changeYear:!0,changeMonth:!0,maxDate:"+0d",minDate:"-20y"});$(".rowForApproval").hide();$(".rowForApproval").prev().find(".closeReviewButton").hide();$(".rowForApproval").prev().find(".reviewButton").show();$(".headerRow.activeSection td.arrowCell .arrow").html("&rarr;");$(".headerRow.activeSection").removeClass("activeSection");
$("."+rep_section+"Header").addClass("activeSection");$(".headerRow.activeSection .arrow").html("&darr;");$(".activeContent").hide();$(".activeContent").removeClass("activeContent");$(".activeSection").next().addClass("activeContent");$(".activeSection").parent().next().addClass("activeContent");$(".activeContent").css("display","block");$(".approvalScreen").hide();$("#lightbox, #reportsSection").fadeIn(300);$("#table-container").empty();a?($("#table-container").append(a.report),fnInitDataTable($("#report"),
0,!0),formatTable(a),openReportRow("group_011")):$("#numberReports").html(S3.i18n.no_entries_found);resizeReports()}function displayReport(a){$("#table-container").empty();a?($("#table-container").append(a),fnInitDataTable($("#report"),0,!0),formatTable(a),openReportRow("group_011")):$("#numberReports").html(S3.i18n.no_entries_found);resizeReports()}
@@ -132,16 +133,15 @@ function displayReportDetails(a,b){var d=$("#"+a).parent().parent(),c=document.c
function displayThanks(a,b){$(".approvalScreen .thanks").html(a);$(".approvalScreen").fadeIn(300);$(".approvalScreen .return2reports").hide();b&&($(".approvalScreen").data("approvalTimeout",setTimeout(function(){$(".approvalScreen").fadeOut(300)},b)),$(".approvalScreen .return2reports").show());resizeReports()}
function processReportDetails(){id=this.name.substr(7);$("#table-container").empty();hideReportDetails(id);var a=$("#form"+id).serialize(),b=getFilteredReport();b.id=id;b.report=a;$("#"+id).parent().parent();$(this).hasClass("approveButton")?(displayThanks(S3.i18n.approval_request_submitted,null),$.ajax({type:"POST",url:"report/approve",data:b}).done(function(a){$(".approvalScreen").hide();displayThanks(S3.i18n.thankyou_for_your_approval,5E3);displayReport(a)}).fail(function(){alert("error");$(".approvalScreen").hide()})):
(displayThanks(S3.i18n.reject_request_submitted,null),$.ajax({type:"POST",url:"report/decline",data:b}).done(function(a){$(".approvalScreen").hide();displayThanks(S3.i18n.submission_has_been_declined,5E3);displayReport(a)}).fail(function(){alert("error");$(".approvalScreen").hide()}))}
-function toggleReports(a){switch(a){case "myReports":$(".allReports").removeClass("active").html("<a href=\"javascript:toggleReports('allReports')\" title='All Reports'>"+S3.i18n.all_reports.toUpperCase()+"</a>");$(".myReports").addClass("active").html(S3.i18n.my_reports.toUpperCase());break;case "allReports":$(".myReports").removeClass("active").html("<a href=\"javascript:toggleReports('myReports')\" title='My Reports'>"+S3.i18n.my_reports.toUpperCase()+"</a>"),$(".allReports").addClass("active").html(S3.i18n.all_reports.toUpperCase())}}
-function uploadSubmitDataIndicators(){var a=new FormData($("#uploadIndicatorsForm")[0]);a.file?(a.append("action","vulnerability_part1"),a.append("approach","ajax"),$.ajax({url:"submitData/import.aadata",type:"POST",data:a,cache:!1,contentType:!1,processData:!1}).done(function(a){submitDataJobID=a.upload_id;submitDataItemIDs=a.items;submitedData=a.data;submitedDataPage=0;$(".indicatorsStart").fadeOut(300);displaySubmitDataIndicators()}).fail(function(){alert("error")})):alert("Please, select a file")}
-function displaySubmitDataIndicators(){submitedData&&(total_pages=submitedData.length,page_data=submitedData[submitedDataPage],page=submitedDataPage+1);$("#submitDataUpload").html($("#submitDataUpload").html());$("#submitDataContent .reviewIndicatorsView h3").html(S3.i18n.review+" <span class='currentPage'>"+page+"</span> "+S3.i18n.of+"<span class='totalPages'>"+total_pages+"<span>");$(".reviewIndicatorsView h4 mark").html(page_data.location);$(".reviewIndicatorsView .indicatorReviewTable tbody tr").each(function(){var a=
+function uploadSubmitDataIndicators(){var a=new FormData($("#uploadIndicatorsForm")[0]);a.append("action","vulnerability_part1");a.append("approach","ajax");$.ajax({url:"submitData/import.aadata",type:"POST",data:a,cache:!1,contentType:!1,processData:!1}).done(function(a){a.Error?alert(a.Error):(submitDataJobID=a.upload_id,submitDataItemIDs=a.items,submitedData=a.data,submitedDataPage=0,$(".indicatorsStart").fadeOut(300),displaySubmitDataIndicators())}).fail(function(){alert("error")})}
+function displaySubmitDataIndicators(){submitedData&&(total_pages=submitedData.length,page_data=submitedData[submitedDataPage],page=submitedDataPage+1);$("#submitDataUpload").html($("#submitDataUpload").html());$("#submitDataContent .reviewIndicatorsView h3").html(S3.i18n.review+" <span class='currentPage'>"+page+"</span> "+S3.i18n.of+" <span class='totalPages'>"+total_pages+"<span>");$(".reviewIndicatorsView h4 mark").html(page_data.location);$(".reviewIndicatorsView .indicatorReviewTable tbody tr").each(function(){var a=
$(this).find("td.indicatorLabels").html().substr(14),a=page_data.data[a];$(this).find("input[value='"+a+"']").attr("checked",true)});$(".reviewIndicatorsView.firstPage").fadeIn(300);$("#submitDataFilters").animate({"background-color":"#f7941d"},500);$("#submitDataFilters h3").hide(300);$("#submissionToggle").hide(300);1==page&&($("#submitDataFooter mark, #submitDataFooter .reviewNextButton").fadeIn(300),$(".backButton").hide());1<page&&!$(".backButton").is(":visible")&&$(".backButton").fadeIn(300);
page==total_pages?($(".reviewNextButton").hide(),$(".submitAllButton").show()):($(".reviewNextButton").show(),$(".submitAllButton").hide())}function nextSubmitDataReview(){submitedDataPage+=1;total_pages=submitedData.length;submitedDataPage>=total_pages&&(submitedDataPage=total_pages-1);displaySubmitDataIndicators()}function backSubmitDataReview(){submitedDataPage-=1;0>submitedDataPage&&(submitedDataPage=0);displaySubmitDataIndicators()}
function submitImportSubmitData(){details={approach:"ajax",action:"vulnerability_part2",job:submitDataJobID,mode:"Inclusive",selected:JSON.stringify(submitDataItemIDs)};$.ajax({url:"submitData/import",type:"POST",data:details}).done(function(){$(".reviewIndicatorsView").fadeOut(300);$("#indicatorsSubmissionViews .thankyou").fadeIn(300);$("#submitDataFooter div, #submitDataFooter mark").fadeOut(300);$("#submitDataFooter .submitMoreButton").fadeIn(300)}).fail(function(){alert("error")})}
-function moreSubmitData(){$(".thankyou, #submitDataFooter .submitMoreButton").fadeOut(300);$("#submitDataFilters").animate({"background-color":"#c6c6c6"},500);$("#submitDataFilters h3").fadeIn(300);$("#submissionToggle").fadeIn(300);$("#submitDataContent .dataUploadContainer h4").html(S3.i18n.select_data_type);$("#submitDataContent .dataUploadContainer h3, .delete, .reviewTitling").hide();$("#indicatorsSubmissionViews").is(":visible")?($("#submitDataContent .indicatorsStart").fadeIn(300),$("#submitDataContent .indicatorsStart p").filter(":first").show()):
-($("#newSubmissionRegions, #dataSubmissionRegion .submissionContent").empty(),$("#dataSubmissionRegion").removeClass("mapSubmission imageSubmission otherSubmission demographicsSubmission vcaSubmission loaded").removeAttr("style"),$("#dataSubmissionRegion input").attr("disabled",!1).attr("checked",!1),numberSubmissions=2,numberSubmissionsDeleted=0,$("#dataAndReportsSubmissionViews .dataUploadContainer").fadeIn(300),$(".fileType, .labelFile, .remove, .imgDesc, .fakePlaceholder, .labelHangRight, .checkHangRight").fadeIn(300),
+function moreSubmitData(){$(".thankyou, #submitDataFooter .submitMoreButton").fadeOut(300);$("#submitDataFilters").animate({"background-color":"#c6c6c6"},500);$("#submitDataFilters h3").fadeIn(300);$("#submissionToggle").fadeIn(300);$("#submitDataContent .dataUploadContainer h4").html(S3.i18n.select_data_type);$("#submitDataContent .dataUploadContainer h3, .delete, .reviewTitling").hide();$("#indicatorsSubmissionViews").is(":visible")?($("#uploadIndicatorsForm").html($("#uploadIndicatorsForm").html()),
+$("#submitDataContent .indicatorsStart").fadeIn(300),$("#submitDataContent .indicatorsStart p").filter(":first").show()):($("#newSubmissionRegions, #dataSubmissionRegion .submissionContent").empty(),$("#dataSubmissionRegion").removeClass("mapSubmission imageSubmission otherSubmission demographicsSubmission vcaSubmission loaded").removeAttr("style"),$("#dataSubmissionRegion input").attr("disabled",!1).attr("checked",!1),$("#dataAndReportsSubmissionViews .dataUploadContainer").fadeIn(300),$(".fileType, .labelFile, .remove, .imgDesc, .fakePlaceholder, .labelHangRight, .checkHangRight").fadeIn(300),
$(".dataSubmissionRegion input:radio").each(function(){$(this).parent().removeAttr("style")}))}
-function indicatorsCheckCommune(){switch($("#l3_datas").val()){case null:$("#submitOnlineButton").addClass("disabled");$("#submitDataContent .indicatorsStart p").filter(":first").show(200);$("#selectCommune").show(200);$("#dataSubmissionRegion").hide();break;default:$("#submitOnlineButton").removeClass("disabled"),$("#submitDataContent .indicatorsStart p").filter(":first").hide(200),$("#selectCommune").hide(200),$("#dataSubmissionRegion").show()}}
+function indicatorsCheckCommune(){switch($("#l3_datas").val()){case null:case "":$("#submitOnlineButton").addClass("disabled");$("#submitDataContent .indicatorsStart p").filter(":first").show(200);$("#selectCommune").show(200);$("#dataSubmissionRegion").hide();break;default:$("#submitOnlineButton").removeClass("disabled"),$("#submitDataContent .indicatorsStart p").filter(":first").hide(200),$("#selectCommune").hide(200),$("#dataSubmissionRegion").show()}}
function displaySubmitOnline(){$("#submitDataContent .submitIndicatorsForm input").attr("checked",!1);$("#submitDataContent .submitIndicatorsForm, #submitDataFooter mark").fadeIn(300);$("#submitDataContent .indicatorsStart").fadeOut(300);$("#submitDataFooter .reviewSubmissionButton").addClass("disabled").fadeIn(300)}
function reviewSubmitData(){var a=hdata[$("#l0_datas").val()];if($("#l3_datas").val())var b=$("#l3_datas option:selected").html()+" "+a.l3+".";else $("#l2_datas").val()?b=$("#l2_datas option:selected").html()+" "+a.l2+".":$("#l1_datas").val()?b=$("#l1_datas option:selected").html()+" "+a.l1+".":$("#l0_datas").val()&&(b=$("#l0_datas option:selected").html()+" "+S3.i18n.country+".");$("#submitDataContent .submitIndicatorsForm").is(":visible")&&($("#submitDataContent .submitIndicatorsForm h3").html(S3.i18n.review),
$("#submitDataContent .submitIndicatorsForm h4").filter(":first").html(S3.i18n.about_to_submit_indicator_ratings+" <mark>"+b+"</mark>"),$(".submitIndicatorsForm h3, .submitIndicatorsForm h4").fadeIn(300),$("#submitDataFooter .reviewSubmissionButton, .submitIndicatorsForm .indicatorLabels div").fadeOut(300),$("#submitDataFilters").animate({"background-color":"#f7941d"},500),$("#submitDataFilters h3").hide(300),$("#submissionToggle").fadeOut(200),setTimeout(function(){$("#submitDataFooter .submitButton").fadeIn(300)},
View
2 views/vulnerability/report.html
@@ -74,7 +74,7 @@
<div class='myReports'><a href="javascript:toggleReports('myReports')" title='My Reports'>{{=T("MY REPORTS")}}</a></div>
</div>
<div class='panelSearch'>
- <input id='reportTextSearch' class='rounded' type='text' name='reportsSearch' />
+ <input id='reportTextSearch' class='rounded' type='text' name='reportsSearch' />
<div class='panelSearchSubmit'></div>
</div>
<div class='closePanel'></div>

0 comments on commit 7624ee8

Please sign in to comment.