Commit 29f4022b authored by targoo's avatar targoo

remove all the plugins

parent 65c51e08
.colorBox {
border: 1px solid #ffffff;
cursor: pointer;
font-family: monospace;
font-size: 1.2em;
margin: 0 3px;
padding: 2px 8px;
}
.colorBox.active,
.colorBox:hover {
padding: 9px 16px;
}
.transparentBox {
background-image: url("../images/transparentBox16.gif");
background-position: 0 3px;
background-repeat: no-repeat;
margin: 0 3px;
padding: 2px 8px;
}
.transparentBox.active,
.transparentBox:hover {
background-image: url(../images/transparentBox32.gif);
background-position: 0 3px;
background-repeat: no-repeat;
padding: 10px 16px;
}
.hide_input {
diplay: none;
}
/**
* @file
* Javascript for Color Field.
*/
(function ($) {
Drupal.behaviors.color_field = {
attach: function (context) {
$.each(Drupal.settings.color_field, function (selector) {
id = selector.replace("#div","edit");
value = $('#' + id).val();
if (value == '') value = this.value;
$(selector).empty().addColorPicker({
currentColor:value,
colors:this.colors,
clickCallback: function(c) {
id = selector;
id = id.replace("#div","edit");
$('#' + id).val(c);
}
});
});
}
};
})(jQuery);
/**
* Color Field jQuery
*/
(function ($) {
jQuery.fn.addColorPicker = function (props) {
if (!props) { props = []; }
props = jQuery.extend({
currentColor:'',
blotchElemType: 'span',
blotchClass:'colorBox',
clickCallback: function(ignoredColor) {},
iterationCallback: null,
fillString: ' ',
fillStringX: '?',
colors: [
'#AC725E','#D06B64','#F83A22', '#FA573C', '#FF7537', '#FFAD46',
'#42D692','#16A765', '#7BD148','#B3DC6C','#FBE983',
'#92E1C0', '#9FE1E7', '#9FC6E7', '#4986E7','#9A9CFF',
'#B99AFF','#C2C2C2','#CABDBF','#CCA6AC','#F691B2',
'#CD74E6','#A47AE2',
]
}, props);
var count = props.colors.length;
for (var i = 0; i < count; ++i) {
var color = props.colors[i];
var elem = jQuery('<' + props.blotchElemType + '/>')
.addClass(props.blotchClass)
.attr('color',color)
.css('background-color',color);
// jq bug: chaining here fails if color is null b/c .css() returns (new String('transparent'))!
if (props.currentColor == color) {
elem.addClass('active');
}
if (props.clickCallback) {
elem.click(function() {
jQuery(this).parent().children('.colorBox').removeClass('active');
jQuery(this).addClass('active');
props.clickCallback(jQuery(this).attr('color'));
});
}
this.append(elem);
if (props.iterationCallback) {
props.iterationCallback(this, elem, color, i);
}
}
var elem = jQuery('<' + props.blotchElemType + '/>')
.addClass('transparentBox')
.attr('color', '')
.css('background-color', '');
if (props.currentColor == '') {
elem.addClass('active');
}
if (props.clickCallback) {
elem.click(function() {
jQuery(this).parent().children('.colorBox').removeClass('active');
jQuery(this).addClass('active');
props.clickCallback(jQuery(this).attr('color'));
});
}
this.append(elem);
if (props.iterationCallback) {
props.iterationCallback(this, elem, color, i);
}
return this;
};
})(jQuery);
/**
* @file
* Javascript for Color Field.
*/
(function ($) {
Drupal.behaviors.color_field_farbtastic = {
attach: function (context) {
$.each(Drupal.settings.color_field_farbtastic, function (selector) {
$('#' + this.picker_id).farbtastic('#' + this.id);
});
}
};
})(jQuery);
/**
* @file
* Javascript for Color Field.
*/
(function ($) {
Drupal.behaviors.color_field_farbtastic = {
attach: function (context) {
$.each(Drupal.settings.color_field_farbtastic, function (selector) {
$('#' + this.picker_id).farbtastic('#' + this.id);
});
}
};
})(jQuery);
/**
* @file
* Javascript for Color Field.
*/
(function ($) {
Drupal.behaviors.color_field_farbtastic = {
attach: function (context) {
$.each(Drupal.settings.color_field_farbtastic, function (selector) {
$('#' + this.picker_id).farbtastic('#' + this.id);
});
}
};
})(jQuery);
.simpleColorDisplay {
float: left;
font-family: Helvetica;
}
.simpleColorContainer {
float: left;
}
/**
* @file
* Javascript for Color Field.
*/
(function ($) {
Drupal.behaviors.color_field_jquery_simple_color = {
attach: function (context) {
$.each(Drupal.settings.color_field_jquery_simple_color, function (selector) {
if (!$(selector).hasClass('jquery-simple-color-init')) {
$(selector).simpleColor({
cellWidth: this.cell_width,
cellHeight: this.cell_height,
cellMargin: this.cell_margin,
boxWidth: this.box_width,
boxHeight: this.box_height
});
$(selector).addClass('jquery-simple-color-init');
}
});
}
};
})(jQuery);
/**
* @file
* Javascript for Color Field.
*/
(function ($) {
Drupal.behaviors.color_field_spectrum = {
attach: function (context) {
$.each(Drupal.settings.color_field_spectrum, function (selector) {
$('#' + this.id).spectrum({
preferredFormat: "hex",
showInput: this.show_input,
showAlpha: false,
showInitial: true,
showPalette: this.show_palette,
showPaletteOnly: this.show_palette_only,
palette:[this.palette],
showButtons: this.show_buttons,
});
});
}
};
})(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment