Check in minimized JS and updated HTML. Remove jPicker (now included as part of jGraduate)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@571 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-09-04 21:23:54 +00:00
parent 40e51e83c2
commit bc7b1880f8
17 changed files with 13 additions and 1913 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,227 +0,0 @@
.jPicker_Picker {
display: inline-block;
height: 24px; /* change this value if using a different sized color picker icon */
position: relative; /* make this element an absolute positioning container */
text-align: left; /* make the zero width children position to the left of container */
width: 25px; /* change this value if using a different sized color picker icon */
}
.jPicker_Color {
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker_Icon {
background-repeat: no-repeat;
cursor: pointer;
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker_Container {
display: none;
z-index: 10; /* make sure container draws above color picker icon in Firefox/Safari/Chrome/Opera/etc. -
IE calculates z-index so this won't work - we will hide all color picker icons placed after the selected one in code when shown in IE */
}
.jPicker_table {
background-color: #efefef;
border: 1px outset #666;
font-family: Arial, Helvetica, Sans-Serif;
font-size: 12px;
height: 330px;
margin: 0px;
padding: 5px;
width: 550px;
}
.jPicker_table td {
margin: 0px;
padding: 0px;
vertical-align: top;
}
.jPicker_MoveBar {
background-color: #dddddd;
border: 1px outset #aaa;
cursor: move;
height: 12px;
}
.jPicker_Title {
font-size: 11px !important;
font-weight: bold;
margin: -2px 0px 0px 0px;
padding: 0px;
text-align: center;
width: 100%;
}
.jPicker_ColorMap {
border: 2px inset #eee;
cursor: crosshair;
height: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
margin: 0px 5px 0px 5px;
overflow: hidden; /* hide the overdraw of the Color Map icon when at edge of viewing box */
padding: 0px;
position: relative; /* make this element an absolute positioning container */
width: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
}
div[class="jPicker_ColorMap"] {
height: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker_ColorMap_l1, .jPicker_ColorMap_l2, .jPicker_ColorMap_l3, .jPicker_ColorBar_l1, .jPicker_ColorBar_l2, .jPicker_ColorBar_l3, .jPicker_ColorBar_l4, .jPicker_ColorBar_l5, .jPicker_AlphaBar_l1, .jPicker_AlphaBar_l2 {
background-repeat: no-repeat;
display: block;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
.jPicker_ColorMap_l1 {
background-color: #000000;
background-image: none;
}
.jPicker_ColorMap_l2 {
background-color: transparent;
}
.jPicker_ColorMap_l3 {
background-repeat: repeat;
}
.jPicker_ColorMap_Arrow {
display: block;
position: absolute;
}
.jPicker_ColorBar {
border: 2px inset #eee;
cursor: n-resize;
height: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
margin: 12px 10px 0px 5px;
padding: 0px;
position: relative;
width: 24px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 20px later */
}
div[class="jPicker_ColorBar"] {
height: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 20px; /* correct to 20px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker_ColorBar_l1, .jPicker_ColorBar_l2, .jPicker_ColorBar_l3 {
background-color: transparent;
background-image: none;
background-repeat: repeat-x;
}
.jPicker_ColorBar_l4 {
background-color: transparent;
background-repeat: repeat-x;
}
.jPicker_ColorBar_l5 {
background-color: transparent;
background-repeat: repeat;
}
.jPicker_ColorBar_Arrow {
display: block;
left: -10px; /* (arrow width / 2) - (element width / 2) - position arrows' center in elements' center */
position: absolute;
}
.jPicker_AlphaBar {
border: 2px inset #eee;
cursor: e-resize;
display: none;
height: 24px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 20px later */
margin: 10px 5px 4px 5px;
padding: 0px;
position: relative;
width: 260px; /* IE 6 incorrectly draws border inside the width and height instead of outside - We will fix this to 256px later */
}
div[class="jPicker_AlphaBar"] {
height: 20px; /* correct to 20px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
width: 256px; /* correct to 256px for browsers that support the "[class="xxx"]" selector (IE7+,Firefox,Safari,Chrome,Opera,etc.) */
}
.jPicker_AlphaBar_Arrow {
display: block;
top: -10px; /* (arrow height / 2) - (element height / 2) - position arrows' center in elements' center */
position: absolute;
}
.jPicker_EnableAlpha {
text-align: left;
}
.jPicker_Preview {
font-size: x-small;
text-align: center;
}
.jPicker_Preview div {
border: 2px inset #eee;
height: 62px;
margin: 0px auto;
padding: 0px;
width: 62px;
}
.jPicker_Preview div span {
border: 1px solid #000;
display: block;
height: 30px;
margin: 0px auto;
padding: 0px;
width: 60px;
}
.jPicker_Preview div span.jPicker_Active {
border-bottom-width: 0px;
}
.jPicker_Preview div span.jPicker_Current {
border-top-width: 0px;
cursor: pointer;
}
.jPicker_OkCancel {
text-align: center;
width: 120px;
}
.jPicker_OkCancel input {
width: 100px;
}
.jPicker_OkCancel input.jPicker_Ok {
margin: 12px 0px 5px 0px;
}
.jPicker_Spacer {
height: 10px;
}
.jPicker_HueText, .jPicker_SaturationText, .jPicker_BrightnessText, .jPicker_RedText, .jPicker_GreenText, .jPicker_BlueText, .jPicker_AlphaText {
background-color: #fff;
border: 1px inset #aaa;
margin: 0px 0px 0px 5px;
width: 30px;
}
.jPicker_EnterHex {
text-align: right;
}
.jPicker_HexText {
background-color: #fff;
border: 1px inset #aaa;
margin: 0px 19px 0px 5px;
width: 50px;
}
td.jPicker_OpacityCol {
padding-top: 12px;
text-indent: -8px;
}
td.jPicker_OpacityCol * {
display: none;
}
td.jPicker_HexCol {
text-align: left;
}
.jPicker_Grid {
text-align: center;
}
.jPicker_QuickColor {
border: 1px inset #aaa;
cursor: pointer;
display: block;
float: left;
height: 12px;
line-height: 12px;
margin: 2px 3px 1px 3px;
padding: 0px;
width: 12px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
editor/spinbtn/JQuerySpinBtn.min.js vendored Normal file
View File

@@ -0,0 +1 @@
$.fn.SpinButton=function(a){return this.each(function(){this.repeating=false;this.spinCfg={min:a&&!isNaN(parseFloat(a.min))?Number(a.min):null,max:a&&!isNaN(parseFloat(a.max))?Number(a.max):null,step:a&&a.step?Number(a.step):1,page:a&&a.page?Number(a.page):10,upClass:a&&a.upClass?a.upClass:"up",downClass:a&&a.downClass?a.downClass:"down",reset:a&&a.reset?a.reset:this.value,delay:a&&a.delay?Number(a.delay):500,interval:a&&a.interval?Number(a.interval):100,_btn_width:20,_btn_height:12,_direction:null,_delay:null,_repeat:null,callback:a&&a.callback?a.callback:null,};this.adjustValue=function(d){var c=(isNaN(this.value)?this.spinCfg.reset:Number(this.value))+Number(d);if(this.spinCfg.min!==null){c=Math.max(c,this.spinCfg.min)}if(this.spinCfg.max!==null){c=Math.min(c,this.spinCfg.max)}this.value=c;if($.isFunction(this.spinCfg.callback)){this.spinCfg.callback(this)}};$(this).addClass(a&&a.spinClass?a.spinClass:"spin-button").mousemove(function(g){var c=g.pageX||g.x;var h=g.pageY||g.y;var d=g.target||g.srcElement;var f=(c>b(d,"offsetLeft")+d.offsetWidth-this.spinCfg._btn_width)?((h<b(d,"offsetTop")+this.spinCfg._btn_height)?1:-1):0;if(f!==this.spinCfg._direction){switch(f){case 1:$(this).removeClass(this.spinCfg.downClass).addClass(this.spinCfg.upClass);break;case -1:$(this).removeClass(this.spinCfg.upClass).addClass(this.spinCfg.downClass);break;default:$(this).removeClass(this.spinCfg.upClass).removeClass(this.spinCfg.downClass)}this.spinCfg._direction=f}}).mouseout(function(){$(this).removeClass(this.spinCfg.upClass).removeClass(this.spinCfg.downClass);this.spinCfg._direction=null}).mousedown(function(f){if(this.spinCfg._direction!=0){var c=this;var d=function(){c.adjustValue(c.spinCfg._direction*c.spinCfg.step)};d();c.spinCfg._delay=window.setTimeout(function(){d();c.spinCfg._repeat=window.setInterval(d,c.spinCfg.interval)},c.spinCfg.delay)}}).mouseup(function(c){window.clearInterval(this.spinCfg._repeat);window.clearTimeout(this.spinCfg._delay)}).dblclick(function(c){if($.browser.msie){this.adjustValue(this.spinCfg._direction*this.spinCfg.step)}}).keydown(function(c){switch(c.keyCode){case 38:this.adjustValue(this.spinCfg.step);break;case 40:this.adjustValue(-this.spinCfg.step);break;case 33:this.adjustValue(this.spinCfg.page);break;case 34:this.adjustValue(-this.spinCfg.page);break}}).keypress(function(c){if(this.repeating){switch(c.keyCode){case 38:this.adjustValue(this.spinCfg.step);break;case 40:this.adjustValue(-this.spinCfg.step);break;case 33:this.adjustValue(this.spinCfg.page);break;case 34:this.adjustValue(-this.spinCfg.page);break}}else{this.repeating=true}}).keyup(function(c){this.repeating=false;this.adjustValue(0)}).bind("mousewheel",function(c){if(c.wheelDelta>=120){this.adjustValue(this.spinCfg.step)}else{if(c.wheelDelta<=-120){this.adjustValue(-this.spinCfg.step)}}c.preventDefault()}).change(function(c){this.adjustValue(0)});if(this.addEventListener){this.addEventListener("DOMMouseScroll",function(c){if(c.detail>0){this.adjustValue(-this.spinCfg.step)}else{if(c.detail<0){this.adjustValue(this.spinCfg.step)}}c.preventDefault()},false)}});function b(e,g){var f=e[g],d=document.body;while((e=e.offsetParent)&&(e!=d)){if(!$.browser.msie||(e.currentStyle.position!="relative")){f+=e[g]}}return f}};

View File

@@ -7,19 +7,18 @@
<link rel="stylesheet" href="jgraduate/css/jGraduate-0.2.0.css" type="text/css"/>
<link rel="stylesheet" href="svg-editor.css" type="text/css"/>
<link rel="stylesheet" href="spinbtn/JQuerySpinBtn.css" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<!--script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript" src="js-hotkeys/jquery.hotkeys.min.js"></script>
<!--script type="text/javascript" src="js-hotkeys/jquery.hotkeys-0.7.9.js"></script-->
<script type="text/javascript" src="jgraduate/jpicker-1.0.9.min.js"></script>
<script type="text/javascript" src="jgraduate/jquery.jgraduate.js"></script>
<script type="text/javascript" src="spinbtn/JQuerySpinBtn.js"></script>
<!--script type="text/javascript" src="spinbtn/JQuerySpinBtn.min.js"></script-->
<!--script type="text/javascript" src="jgraduate/jquery.jgraduate.min.js"></script-->
<script type="text/javascript" src="svgcanvas.js"></script>
<!--script type="text/javascript" src="svgcanvas.min.js"></script-->
<script type="text/javascript" src="svg-editor.js"></script>
<!--script type="text/javascript" src="svg-editor.min.js"></script-->
<!--script type="text/javascript" src="jgraduate/jquery.jgraduate.js"></script-->
<script type="text/javascript" src="jgraduate/jquery.jgraduate.min.js"></script>
<!--script type="text/javascript" src="spinbtn/JQuerySpinBtn.js"></script-->
<script type="text/javascript" src="spinbtn/JQuerySpinBtn.min.js"></script>
<!--script type="text/javascript" src="svgcanvas.js"></script-->
<script type="text/javascript" src="svgcanvas.min.js"></script>
<!--script type="text/javascript" src="svg-editor.js"></script-->
<script type="text/javascript" src="svg-editor.min.js"></script>
<!-- Add script with custom handlers here -->
<title>SVG-edit demo</title>

1
editor/svg-editor.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
editor/svgcanvas.min.js vendored Normal file

File diff suppressed because one or more lines are too long