Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
saltybeagle committed Jan 19, 2012
2 parents 5f6f462 + 9ad73ac commit 39e5761
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 24 deletions.
2 changes: 1 addition & 1 deletion config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$itemElements = array(
'water_af' => 'Volume of water in acre-feet (af)',
'water_cfs' => 'Speed of water in cubic feet per second (cfs)',
'media_creation_date' => 'Date of the creation of the media',
'creation_date' => 'Date of the creation of the media',
);

UNL_MediaHub_Feed_Media_NamespacedElements_mediahub::setCustomElements($itemElements);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<li>
<label for="media_creation_date" class="element">Media Creation Date<span class="helper">The date that the media was created.</span></label>
<div class="element">
<input name="UNL_MediaHub_Feed_Media_NamespacedElements_mediahub[0][element]" type="hidden" value="media_creation_date"/>
<input id="media_creation_date" name="UNL_MediaHub_Feed_Media_NamespacedElements_mediahub[0][value]" type="text" value="<?php echo getFieldValue($context, 'mediahub', 'media_creation_date'); ?>"/>
<input name="UNL_MediaHub_Feed_Media_NamespacedElements_mediahub[2][element]" type="hidden" value="media_creation_date"/>
<input id="media_creation_date" name="UNL_MediaHub_Feed_Media_NamespacedElements_mediahub[2][value]" type="text" value="<?php echo getFieldValue($context, 'mediahub', 'media_creation_date'); ?>"/>
</div>
</li>
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
<script type="text/javascript">
//<![CDATA[
WDN.jQuery(document).ready(function() {
//water info.
if (WDN.jQuery('#water_cfs').val() == '') {
WDN.jQuery('#water_cfs_form').hide();
}

if (WDN.jQuery('#water_maf').val() == '') {
WDN.jQuery('#water_maf_form').hide();
}

WDN.jQuery('#show_cfs').click(function() {
WDN.jQuery('#water_cfs_form').show();
WDN.jQuery('#water_maf_form').hide();
return false;
});

WDN.jQuery('#show_maf').click(function() {
WDN.jQuery('#water_maf_form').show();
WDN.jQuery('#water_cfs_form').hide();
return false;
});

//Only one of water_maf or water_cfs should be filled out at once.
WDN.jQuery('#water_maf').change(function() {
WDN.jQuery('#water_cfs').val('');
});

WDN.jQuery('#water_cfs').change(function() {
WDN.jQuery('#water_maf').val('');
});
});
//]]>
</script>

<label for="water_flow_type" class="element">Water Quantity Type:</label>
<div class="element">
<a href='#' id='show_maf'>Volume</a> or <a href='#' id='show_cfs'>Flow?</a>
Expand Down
21 changes: 0 additions & 21 deletions www/templates/html/scripts/mediaDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,27 +168,6 @@ WDN.jQuery(document).ready(function() {
WDN.jQuery.validation.addMethod('geo_lat', 'This must be a valid latitude.', {min:-90, max:90});
WDN.jQuery('#media_form').validation();

//water info.
if (WDN.jQuery('#water_cfs').val() == '') {
WDN.jQuery('#water_cfs_form').hide();
}

if (WDN.jQuery('#water_maf').val() == '') {
WDN.jQuery('#water_maf_form').hide();
}

WDN.jQuery('#show_cfs').click(function(){
WDN.jQuery('#water_cfs_form').show();
WDN.jQuery('#water_maf_form').hide();
return false;
});

WDN.jQuery('#show_maf').click(function(){
WDN.jQuery('#water_maf_form').show();
WDN.jQuery('#water_cfs_form').hide();
return false;
});

WDN.jQuery('#media_form').submit(function() {
WDN.jQuery('#continue3').attr('disabled', 'disabled');
})
Expand Down

0 comments on commit 39e5761

Please sign in to comment.