Commit 96278372 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-11-02 gabriel

* The initial commit

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39791 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2283e291
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>spinbtn</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>JQuerySpinBtn.css</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
\tStyles to make ordinary <INPUT type="text"/> look like a spinbutton/spinbox control.\n
\tUse with JQuerySpinBtn.js to provide the spin functionality by reacting to mouse etc.\n
\t(Requires a reference to the JQuery library found at http://jquery.com/src/latest/)\n
\t(Hats-off to John Resig for creating the excellent JQuery library. It is fab.)\n
\n
\tThis control is achieved with no extra html markup whatsoever and uses unobtrusive javascript.\n
\n
\tWritten by George Adamson, Software Unity (george.jquery@softwareunity.com) September 2006.\n
\tBig improvements added by Mark Gibson, (mgibson@designlinks.net) September 2006.\n
\n
\tDo contact me with comments and suggestions but please don\'t ask for support.\n
\tAs much as I\'d love to help with specific problems I have plenty to get on with already!\n
\n
\tGo ahead and use it in your own projects. This code is provided \'as is\'.\n
\tSure I\'ve tested in heaps of ways. Its good for me, but you use it at your own risk.\n
\tSoftwareUnity and I are certainly not responsible if your computer sets fire to the sofa,\n
\thacks into the pentagon, hijacks a plane or gives you any kind of hassle whatsoever.\n
\n
\tIf you\'d like your spin-button image in a different place then you\'ll need to alter both\n
\tthe CSS below and the javascript isMouseOverUpDn() function to accommodate the new position.\n
\tYou could even have left and right buttons either side of the textbox.\n
*/\n
\n
INPUT.spin-button {\n
\t/* explicitly put padding for top/bottom/left in here so that Opera displays it better */\n
\tpadding: 2px 20px 2px 2px;\n
\tbackground-repeat:no-repeat;\t\t/* Warning: Img may disappear in Firefox if you use \'background-attachment:fixed\' ! */\n
\tbackground-position:100% 0%;\n
\tbackground-image:url(\'spinbtn_updn.png\');\n
\tbackground-color:white; /* Needed for Opera */\n
}\n
\n
INPUT.spin-button.up {\t\t\t\t\t/* Change button img when mouse is over the UP-arrow */\n
\tcursor:pointer;\n
\tbackground-position:100% -18px;\t\t/* 18px matches height of 2 visible buttons */\n
}\n
INPUT.spin-button.down {\t\t\t\t/* Change button img when mouse is over the DOWN-arrow */\n
\tcursor:pointer;\n
\tbackground-position:100% -36px;\t\t/* 36px matches height of 2x2 visible buttons */\n
}\n
]]></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts80003855.69</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>JQuerySpinBtn.min.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/x-javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
;$.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,stepfunc:a&&a.stepfunc?a.stepfunc:false,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,_direction:null,_delay:null,_repeat:null,callback:a&&a.callback?a.callback:null};this.spinCfg.smallStep=a&&a.smallStep?a.smallStep:this.spinCfg.step/2;this.adjustValue=function(d){var c;if(isNaN(this.value)){c=this.spinCfg.reset}else{if($.isFunction(this.spinCfg.stepfunc)){c=this.spinCfg.stepfunc(this,d)}else{c=Number((Number(this.value)+Number(d)).toFixed(5))}}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(h){var d=h.pageX||h.x;var i=h.pageY||h.y;var f=h.target||h.srcElement;var c=$(f).outerHeight()/2;var g=(d>b(f,"offsetLeft")+f.offsetWidth-this.spinCfg._btn_width)?((i<b(f,"offsetTop")+c)?1:-1):0;if(g!==this.spinCfg._direction){switch(g){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=g}}).mouseout(function(){$(this).removeClass(this.spinCfg.upClass).removeClass(this.spinCfg.downClass);this.spinCfg._direction=null;window.clearInterval(this.spinCfg._repeat);window.clearTimeout(this.spinCfg._delay)}).mousedown(function(g){if(g.button===0&&this.spinCfg._direction!=0){var d=this;var c=g.shiftKey?d.spinCfg.smallStep:d.spinCfg.step;var f=function(){d.adjustValue(d.spinCfg._direction*c)};f();d.spinCfg._delay=window.setTimeout(function(){f();d.spinCfg._repeat=window.setInterval(f,d.spinCfg.interval)},d.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;switch(c.keyCode){case 38:case 40:case 33:case 34:case 13:this.adjustValue(0);break}}).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}};
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3677</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts80003854.11</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>spinbtn_updn.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABEAAAA2CAMAAAAWGoJGAAAAAXNSR0IArs4c6QAAAUdQTFRF6fT6
BhUdCyk4DC4/DS9ADzhMFBMSFlFvGFd3GVx+G2GEIXikIXmmI36sI4CuJIKxJSQjJ47CKI/DKJHF
KSgnKZPIKZbMKikoMC8uQ6bYRkVESklISqnZS0pJT05NT6zaUlJRVa/cYrXfZWRjZmVkZ2ZlZ7jg
aWlobGtqbLrhbm1scbzid3Z1eHd2eHd3eL/jeXl4enl4e3p6fn18h8bmisjnj4+Pj8rokcvok8zo
lJSTls3pmJeXm5qam5ubo6Oio9TspqWkqNbtqaioqamoq6uqsK+vstvvuLi3u7q6vr6+v+HywL+/
wMC/wcHBysrKzc3M09PS1ev21+z22O3329vb5vP55/T66Ojo6eno6urq7Pb77vf78Pf78fHx8vLy
8/Pz9PT09fX19vb29/f3+Pj4+Pv9+/3+/Pz8/f39/f7+/v7+////0stKKAAAAAF0Uk5TAEDm2GYA
AAD0SURBVCjPY2AgHoTqBqIKREiwsUWhiMgJCAgoIAsYSck6S0sZIwTslVUCGPyVlR3hIsrKnkDS
Q1kZLuLjC6a8/OAitrZgysYOLsLGZgUkzdjY4CI6bGxuDK5sbAYIy1QFxK1EBNSRHaQhJSWlheoN
PWVDNJ9GukQx0AZ4C7mjCgSxMjKGIAtEczIxMXFFI4mIsnNocrCLIQSUuHmcGBy4udXgItzcpkDS
hJsbLmJhCabMrYdfGA5gOlRUBFPyinARRkYZICnJyAgXEWRk1GfQZmQURljGw8Qiw8zEi+wgPnZ2
dn4UN4cJcQuHo3osWDOEhHABANJgIXKLmJLiAAAAAElFTkSuQmCC</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>54</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>666</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>17</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-11-02 gabriel
* The initial commit
\ No newline at end of file
2010 (c) Nexedi SA
\ No newline at end of file
erp5_jquery
\ No newline at end of file
This Business Template contains only static files of Spinbtn Plugin. This plugin provides spin-button interface on your form.
\ No newline at end of file
GPL
\ No newline at end of file
gabriel
\ No newline at end of file
portal_skins/erp5_jquery/plugin/spinbtn
portal_skins/erp5_jquery/plugin/spinbtn/**
\ No newline at end of file
erp5_jquery_plugin_spinbtn
\ No newline at end of file
5.4.7
\ No newline at end of file
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