class 명을 기존 jPicker 와 달리 써서 충돌 회피

혹시 한 페이지에 함께 불러오더라도 충돌을 회피함.
This commit is contained in:
MinSoo Kim 2016-02-06 18:46:02 +09:00
parent 3288d504d2
commit f9987347a5
12 changed files with 26 additions and 25 deletions

View file

@ -1,3 +1,3 @@
spectrum.css
spectrum.js
xe_spectrum.js
rx_spectrum.js

View file

@ -3,12 +3,12 @@
* @author MinSoo Kim <misol.kr@gmail.com>
**/
jQuery(function($){
$.fn.xe_spectrum = function(settings){
$.fn.rx_spectrum = function(settings){
return this.spectrum(settings);
}
// 컬러 피커가 내장된 브라우저에서는 내장된 컬러피커 이용 by misol 2016.02.05
if ( $("input.color-indicator").prop('type') != 'color' ) {
// 컬러 피커가 내장된 브라우저에서는 내장된 컬러피커 이용
if ( $("input.rx-spectrum").prop('type') != 'color' ) {
$.getScript(request_uri + "./common/js/plugins/spectrum/i18n/jquery.spectrum-"+ xe.current_lang.replace("jp", "ja").toLowerCase() +".js", function() {
var settings = {
showInput: true,
@ -42,7 +42,7 @@ jQuery(function($){
["#660000","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
]
}
$('input.color-indicator').xe_spectrum(settings);
$('input.rx-spectrum').rx_spectrum(settings);
});
}
});