Sha256: 3585ee729441533b519b161db90ea36cb2baafee38634b52bf980580fd80e3ad

Contents?: true

Size: 1008 Bytes

Versions: 21

Compression:

Stored size: 1008 Bytes

Contents

<% color = value
	 html_id = '_' + id.to_s + '_' + field_name %>
<div <%= wrapper_id.nil? ? '' : "id=\"#{wrapper_id}\"" -%> class="form-row color-selector-container <%= wrapper_class %>">
	<%= render :partial => 'forms/base_field', :locals => local_assigns %>
	<div id="colorSelector<%=html_id%>" class="color-selector">
		<div id="colorSelectorDisplay<%=html_id%>" style="background-color:#<%=color%>;"></div>
	</div>
	<% content_for :javascript do -%>
	<script type="text/javascript" language="JavaScript">
	jQuery(document).ready(function() {
		jQuery('#colorSelector<%=html_id%>').ColorPicker({
			color: '#<%=color%>',
			onShow: function (colpkr) {
				jQuery(colpkr).fadeIn(100);
				return false;
			},
			onHide: function (colpkr) {
				jQuery(colpkr).fadeOut(100);
				return false;
			},
			onChange: function (hsb, hex, rgb) {
				jQuery('#colorSelectorDisplay<%=html_id%>').css('backgroundColor', '#' + hex);
				jQuery('#<%=field_name%>').val(hex);
			}
		});
	});
	</script>
	<% end -%>
</div>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
muck-engine-3.5.0 app/views/forms/_color_picker_field.erb
muck-engine-3.4.0 app/views/forms/_color_picker_field.erb
muck-engine-3.3.18 app/views/forms/_color_picker_field.erb
muck-engine-3.3.17 app/views/forms/_color_picker_field.erb
muck-engine-3.3.16 app/views/forms/_color_picker_field.erb
muck-engine-3.3.15 app/views/forms/_color_picker_field.erb
muck-engine-3.3.14 app/views/forms/_color_picker_field.erb
muck-engine-3.3.13 app/views/forms/_color_picker_field.erb
muck-engine-3.3.12 app/views/forms/_color_picker_field.erb
muck-engine-3.3.11 app/views/forms/_color_picker_field.erb
muck-engine-3.3.10 app/views/forms/_color_picker_field.erb
muck-engine-3.3.9 app/views/forms/_color_picker_field.erb
muck-engine-3.3.8 app/views/forms/_color_picker_field.erb
muck-engine-3.3.7 app/views/forms/_color_picker_field.erb
muck-engine-3.3.6 app/views/forms/_color_picker_field.erb
muck-engine-3.3.5 app/views/forms/_color_picker_field.erb
muck-engine-3.3.4 app/views/forms/_color_picker_field.erb
muck-engine-3.3.3 app/views/forms/_color_picker_field.erb
muck-engine-3.3.2 app/views/forms/_color_picker_field.erb
muck-engine-3.3.1 app/views/forms/_color_picker_field.erb