Permalink
Browse files

minify, cleanup

  • Loading branch information...
1 parent 764df2e commit 9c4c78f0808e53c52d3caa4fa68162cddc174547 @flavour committed Oct 7, 2012
View
@@ -1 +1 @@
-8276ad4 (2012-10-07 10:42:47)
+764df2e (2012-10-07 11:00:10)
@@ -116,7 +116,7 @@ def model(self):
Field("parking_tarmac_space", "double",
label=T("Parking/Tarmac Space Capacity")),
Field("capacity", "integer",
- label = T("Parking/Tarmac Space Units")
+ label = T("Parking/Tarmac Space Units"),
requires = IS_IN_SET(transport_airport_capacity_opts, zero=None),
default = 1,
represent = lambda opt: \
View
@@ -810,7 +810,7 @@ def widget(self, resource, vars):
_id="gis_search_polygon_input_clear"))
# Settings to be read by static/scripts/S3/s3.gis.js
- js_location_search = "S3.gis.draw_polygon = true;"
+ js_location_search = '''S3.gis.draw_polygon=true'''
# The overall layout of the components
return TAG[""](
View
@@ -78,46 +78,50 @@ S3.addTooltips = function() {
$('label[title]').cluetip({splitTitle: '|', showTitle:false});
$('.tooltipbody').cluetip({activation: 'hover', sticky: false, splitTitle: '|', showTitle: false});
var tipCloseText = '<img src="' + S3.Ap.concat('/static/img/cross2.png') + '" alt="close" />';
- $('.stickytip').cluetip( {
+ $('.stickytip').cluetip({
activation: 'hover',
sticky: true,
closePosition: 'title',
closeText: tipCloseText,
splitTitle: '|'
- } );
- $('.errortip').cluetip( {
+ });
+ $('.errortip').cluetip({
activation: 'click',
sticky: true,
closePosition: 'title',
closeText: tipCloseText,
splitTitle: '|'
- } );
- $('.ajaxtip').cluetip( {
+ });
+ $('.ajaxtip').cluetip({
activation: 'click',
sticky: true,
closePosition: 'title',
closeText: tipCloseText,
width: 380
- } );
+ });
}
$(document).ready(function() {
// Web2Py Layer
- $('.error').hide().slideDown('slow')
+ $('.error').hide().slideDown('slow');
$('.error').click(function() { $(this).fadeOut('slow'); return false; });
$('.warning').hide().slideDown('slow')
$('.warning').click(function() { $(this).fadeOut('slow'); return false; });
$('.information').hide().slideDown('slow')
$('.information').click(function() { $(this).fadeOut('slow'); return false; });
$('.confirmation').hide().slideDown('slow')
$('.confirmation').click(function() { $(this).fadeOut('slow'); return false; });
- $("input[type='checkbox'].delete").click(function() { if(this.checked) if(!confirm(S3.i18n.delete_confirmation)) this.checked=false; });
+ $("input[type='checkbox'].delete").click(function() {
+ if ((this.checked) && (!confirm(S3.i18n.delete_confirmation))) {
+ this.checked=false;
+ }
+ });
// If a form is submitted with errors, this will scroll
// the window to the first form error message
inputErrorId = $('form .error[id]').eq(0).attr('id');
if (inputErrorId != undefined) {
- inputName = inputErrorId.replace("__error", "");
+ inputName = inputErrorId.replace('__error', '');
inputId = $('[name=' + inputName + ']').attr('id');
inputLabel = $('[for=' + inputId + ']');
window.scrollTo(0, inputLabel.offset().top)

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -88,7 +88,7 @@ S3.search.AutocompleteAjax = function(selSearchDiv) {
var selInput = $('[name ^= "' + Fieldname + '_search_simple"]');
// Clear the current input
- selHiddenInput.val("");
+ selHiddenInput.val('');
selHiddenInput.change(); // Trigger other events
var selResultList = $('#' + Fieldname + '_result_list');
@@ -283,16 +283,14 @@ $(document).ready(function() {
// S3SearchLocationWidget
// Allow clearing of map polygons in search forms
- $('button#gis_search_polygon_input_clear')
- .on('click', function(event) {
- S3.search.clearMapPolygon();
- // prevent form submission
- event.preventDefault();
- });
- $('input#gis_search_polygon_input')
- .on('change', S3.search.toggleMapClearButton)
- .trigger('change');
- });
+ $('button#gis_search_polygon_input_clear').on('click', function(event) {
+ S3.search.clearMapPolygon();
+ // prevent form submission
+ event.preventDefault();
+ });
+ $('input#gis_search_polygon_input').on('change', S3.search.toggleMapClearButton)
+ .trigger('change');
+});
/*
* S3SearchLocationWidget
@@ -304,7 +302,7 @@ S3.search.clearMapPolygon = function() {
if (S3.gis.lastDraftFeature) {
S3.gis.lastDraftFeature.destroy();
}
- $('input#gis_search_polygon_input').val("").trigger('change');
+ $('input#gis_search_polygon_input').val('').trigger('change');
}
/*
@@ -316,11 +314,9 @@ S3.search.clearMapPolygon = function() {
S3.search.toggleMapClearButton = function(event) {
var inputElement = $(event.currentTarget);
var clearButton = inputElement.siblings('button#gis_search_polygon_input_clear');
-
if (inputElement.val()) {
clearButton.show();
- }
- else {
+ } else {
clearButton.hide();
}
}
Oops, something went wrong.

0 comments on commit 9c4c78f

Please sign in to comment.