test/dummy/tmp/cache/assets/D78/840/sprockets%2F326ec6387a9d1b45ec2cdf7093b79f0e in cytoplasm-0.4.0 vs test/dummy/tmp/cache/assets/D78/840/sprockets%2F326ec6387a9d1b45ec2cdf7093b79f0e in cytoplasm-0.4.1

- old
+ new

@@ -1,16 +1,25 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1360872736.0128808: @value"Ö#{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1361731467.98596: @value"3&{I" class:EFI"BundledAsset;FI"logical_path;FI"!cytoplasm/cytoColorPicker.js;FI" pathname;FI"l/Applications/XAMPP/xamppfiles/htdocs/cytoplasm/app/assets/javascripts/cytoplasm/cytoColorPicker.js.erb;FI"content_type;FI"application/javascript;FI" -mtime;FI"2013-02-14T15:12:14-05:00;FI" length;FiÝ!I" digest;F"%39d6adb1e5038015c28e778f629099beI" source;FI"Ý!// CytoColorPicker v0.5 +mtime;FI"2013-02-24T13:44:26-05:00;FI" length;Fi:$I" digest;F"%1ffdd686b33d4f8fd079591a217ade55I" source;FI":$// CytoColorPicker v0.5 // By MacKinley Smith (function($){ var defaults = { format:'hsla', // hsla, hex, rgba events:{ change:function(color){} }, widget:{ + label:{ + css:{ + display:'block', + font:"13px TitilliumTextThin", + "margin-bottom":10 + }, + element:false, + text:false + }, previewer:{ css:{ width:'100%', height:'100%', "border-top-left-radius":10, @@ -48,11 +57,17 @@ css:{ display:'inline-block', 'vertical-align':'top' }, cytoTable:{ - + widget:{ + table:{ + css:{ + "margin-bottom":0 + } + } + } }, element:null, sliders:{ elements:[], settings:{ @@ -83,18 +98,20 @@ var $this = $(this); // Instantiate settings var settings = $.extend(true,{},defaults,options); $this.data('cytoColorPicker',settings); + if ($this.data('label')!=null) settings.widget.label.text = $this.data('label')+":"; // Generate widget $this.addClass('cytoColorPicker').css({display:'none'}); settings.widget.wrapper.element = $this.wrap("<div class='cytoColorPicker-wrapper' />").parent().css(settings.widget.wrapper.css); settings.widget.previewer.wrapper.element = $('<div />').addClass('cytoColorPicker-previewer-wrapper').css(settings.widget.previewer.wrapper.css).appendTo(settings.widget.wrapper.element); settings.widget.previewer.element = $('<div />').addClass('cytoColorPicker-previewer').css(settings.widget.previewer.css).appendTo(settings.widget.previewer.wrapper.element).click(function(e){ }); + if (settings.widget.label.text) settings.widget.label.element = $('<label />').attr("for",$this.attr("name")).html(settings.widget.label.text).css(settings.widget.label.css).prependTo(settings.widget.wrapper.element); // Generate slider table settings.widget.slider_table.element = $('<table />').cytoTable(settings.widget.slider_table.cytoTable).css(settings.widget.slider_table.css).appendTo(settings.widget.wrapper.element); $.each(attrs,function(i,attr){ var letter = attr.charAt(0); @@ -105,11 +122,14 @@ settings.widget.slider_table.sliders.elements.push(slider); }); settings.widget.slider_table.element.find('td').css({'padding':"5px 10px"}).filter('.labelcell').width(50); // Set dimensions of previewer - settings.widget.previewer.wrapper.element.width(settings.widget.slider_table.element.outerHeight()+5).height(settings.widget.slider_table.element.outerHeight()+5); + var h = 0; + settings.widget.slider_table.element.find("tr").each(function(){h += $(this).children("td").first().outerHeight(true);}); + console.log(h); + settings.widget.previewer.wrapper.element.width(h).height(h); // Get initial value as color settings.value = $.Color(($this.val()!=null && $this.val()!="") ? $this.val() : settings.default_value); // Commit settings to data-cytoColorPicker attribute @@ -230,6 +250,6 @@ } }); $('.cytoColorPicker').cytoColorPicker(); }); })(jQuery); -;FI"required_assets_digest;F"%c36e6d86bbf1df48d00931f57f84c824I" _version;F"%6776f581a4329e299531e1d52aa59832 +;FI"required_assets_digest;F"%14f10953274a284eac4ade2144201f01I" _version;F"%6776f581a4329e299531e1d52aa59832 \ No newline at end of file