spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 in curate-0.1.3 vs spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 in curate-0.2.0
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1366998624.612197:@value"k{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1367348144.853334:@value"µ®{I"
class:ETI"BundledAsset; FI"logical_path; TI"application.js; TI"
pathname; TI"0$root/app/assets/javascripts/application.js; FI"content_type; TI"application/javascript; TI"
-mtime; TI"2013-04-19T13:36:17-04:00; TI"length; Ti««I"digest; TI"%a79b183fbf2442ae5ad32c816697e017; FI"source; TI"««/*!
+mtime; TI"2013-04-23T13:24:55-04:00; TI"length; Tiõ¬I"digest; TI"%3fc18b5c180c9002a4f3c6ed5fda547f; FI"source; TI"õ¬/*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
@@ -14802,20 +14802,25 @@
var $activeField = $(event.target).parents('.field-wrapper'),
$activeFieldControls = $activeField.children('.field-controls'),
$removeControl = this.remover.clone(),
$newField = $activeField.clone(),
- $listing = $('.listing', this.element);
-
- $('.add', $activeFieldControls).remove();
- $activeFieldControls.prepend($removeControl);
-
- $newField.children('input').val('');
- $newField.children('input').focus()
- $listing.append($newField);
-
- this._trigger("add");
+ $listing = $('.listing', this.element),
+ $warningSpan = $("<span class=\'message warning\'>cannot add new empty field</span>");
+ if ($activeField.children('input').val() == '') {
+ $listing.children('.warning').remove();
+ $listing.append($warningSpan);
+ }
+ else{
+ $listing.children('.warning').remove();
+ $('.add', $activeFieldControls).remove();
+ $activeFieldControls.prepend($removeControl);
+ $newField.children('input').val('');
+ $newField.children('input').focus()
+ $listing.append($newField);
+ this._trigger("add");
+ }
},
remove_from_list: function( event ) {
event.preventDefault();
@@ -14941,6 +14946,6 @@
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
;
-; TI"required_assets_digest; TI"%f61c5615595cce7c85b25439e16230e4; FI"
_version; TI"%ffd318ca8b794f42f5029101c2cf5d91; F
+; TI"required_assets_digest; TI"%2fdcb3d7eba92b61586732cb84839dd7; FI"
_version; TI"%ffd318ca8b794f42f5029101c2cf5d91; F
\ No newline at end of file