Added: ofbiz/branches/ofbiz-new-website/index.html
URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/index.html?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/index.html (added) +++ ofbiz/branches/ofbiz-new-website/index.html Mon Mar 20 12:28:40 2017 @@ -0,0 +1,484 @@ +<!DOCTYPE html> +<html lang="en"> +<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> +<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> +<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> +<!--[if (gte IE 9)|!(IE)]><!--> +<head> +<meta charset="utf-8"> +<title>The Apache OFBiz ™ Project</title> +<meta name="description" content="Apache OFBiz (The Apache Open For Business + Project) is an open source enterprise automation software project licensed + under the Apache License Version 2.0. Being open source under the Apache 2.0 + license and driven by a community Apache OFBiz offers both flexibility by + design and by access to code, and a solution where you're not alone but + rather can work with many others to get things done."> +<meta name="keywords" content="Open Source ERP,Open Source CRM, + Open Source E-Commerce,Open Source eCommerce,Open Source POS,Open Source SCM, + Open Source MRP,Open Source CMMS,Open Source EAM,web services,workflow, + ebusiness,e-business,ecommerce,e-commerce,automation,enterprise software, + open source,entity engine,service engine,erp,crm,party,accounting,facility, + supply,chain,management,catalog,order,project,task,work effort,financial, + ledger,content management,customer,inventory"/> + +<meta name="Robots" content="index,follow" /> +<!-- Mobile Specific Metas + ================================================== --> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<!-- CSS + ================================================== --> +<!-- Bootstrap --> +<link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> +<!-- web font --> +<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,800" rel="stylesheet" type="text/css"> +<!-- plugin css --> +<link rel="stylesheet" type="text/css" href="js-plugin/pretty-photo/css/prettyPhoto.css" /> +<link rel="stylesheet" type="text/css" href="js-plugin/rs-plugin/css/settings.css" media="screen" /> +<link type="text/css" rel="stylesheet" href="js-plugin/hoverdir/css/style.css"> +<!-- icon fonts --> +<link type="text/css" rel="stylesheet" href="font-icons/custom-icons/css/custom-icons.css"> +<link type="text/css" rel="stylesheet" href="font-icons/custom-icons/css/custom-icons-ie7.css"> +<!-- Custom css --> +<link type="text/css" rel="stylesheet" href="css/layout.css"> +<link type="text/css" id="colors" rel="stylesheet" href="css/colors.css"> +<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> +<!--[if gte IE 9]><style type="text/css">.iconBig, .active, .hover a , .Shover a { filter: none !important; } </style> <![endif]--> +<script src="js/modernizr-2.6.1.min.js"></script> +<!-- Favicons + ================================================== --> +<link rel="shortcut icon" href="images/favicon.ico"> +<link rel="apple-touch-icon" href="images/apple-touch-icon.png"> +<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png"> +<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png"> +<link rel="apple-touch-icon" sizes="144x144" href="images/apple-touch-icon-144x144.png"> +</head> +<body> +<!-- header --> +<header id="mainHeader" class="clearfix"> + <div class="navbar navbar-fixed-top"> + <div class="navbar-inner"> + <div class="container"> <a href="index.html" class="brand"><img src="images/OFBiz-logoV3-apache.png" alt="Apache OFBiz Logo"/></a> + <nav id="mainMenu" class="clearfix"> + <ul> + <li><a href="index.html" class="firstLevel active">Home</a></li> + <li><a href="" class="firstLevel">Getting Started</a> + <ul> + <li><a href="developers.html" class="">Developers</a></li> + <li><a href="business-users.html" class="last">Business Users</a></li> + </ul> + </li> + <li><a href="" class="firstLevel">News</a> + <ul> + <li><a href="https://twitter.com/apacheofbiz">Twitter</a></li> + <li><a href="https://blogs.apache.org/ofbiz/">Blog</a></li> + <li><a href="user-stories.html">User Stories and References</a></li> + <li><a href="" class="last">Press</a></li> + </ul> + </li> + <li><a href="" class="firstLevel">Documentation</a> + <ul> + <li><a href="" class="">User Documentation</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Technical+Documentation+-+Home+Page" class="">Technical Documentation</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/OFBIZ/Home" class="">Wiki</a></li> + <li><a href="https://ci.apache.org/projects/ofbiz/site/javadocs/" class="last">API Reference</a></li> + </ul> + </li> + <li><a href="" class="firstLevel">Community</a> + <ul> + <li><a href="getting-involved.html">Getting Involved</a></li> + <li><a href="https://cwiki.apache.org/confluence/display/OFBIZ/Events">Meetups / Events</a></li> + <li><a href="mailinglists.html">Mailing Lists</a></li> + <li><a href="">Source Repository</a></li> + <li><a href="https://issues.apache.org/jira/browse/OFBIZ/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel">Issue Tracker</a></li> + <li><a href="service-providers.html">Service Providers</a></li> + <li><a href="faqs.html" class="last">FAQ</a></li> + </ul> + </li> + <li><a href="" class="firstLevel">Users</a> + <ul> + <li><a href="our-users.html">e-Commerce / e-business</a></li> + <li><a href="our-users.html">Manufacturing</a></li> + <li><a href="our-users.html">Retail</a></li> + <li><a href="our-users.html">Distribution</a></li> + <li><a href="our-users.html">Service Industries</a></li> + <li><a href="our-users.html" class="last">Other</a></li> + </ul> + </li> + </ul> + </nav> + </div> + </div> + </div> +</header> +<!-- header --> +<!-- globalWrapper --> +<div id="globalWrapper"> + +<!-- slider --> +<section id="sliderWrapperRS"> + <!-- background slider dark bloc --> + <div id="bgSliderBlocWrapper"> + <div class="container"> + <div id="bgSliderBloc"> </div> + </div> + </div> + <!-- background slider dark bloc --> + <div class="fullwidthbanner-container"> + <div class="fullwidthbanner" > + <ul> + <li data-transition="fade" data-slotamount="1" data-masterspeed="2000"> <img src="images/slider/rs/thumb.png" alt="slide"/> + <div class="caption lfr" data-x="50" data-y="26" data-speed="1000" data-start="300" data-easing="easeOutExpo"><img src="images/slider/rs/ofbiz1.png" alt="slide" class="ie8PngFix"/></div> + <div class="caption sft" data-x="495" data-y="50" data-speed="300" data-start="600" data-easing="easeOutExpo" > + <h2>What our users are saying..</h2> + </div> + <div class="caption sfb hidden-phone" data-x="495" data-y="125" data-speed="300" data-start="700" data-easing="easeOutExpo"> + <h3><i class="icon-right-circle"></i> Powerful, flexible and free....what more could a developer ask for?</h3> + </div> + <div class="caption sfl hidden-phone" data-x="495" data-y="159" data-speed="500" data-start="1000" data-easing="easeOutBounce" > + <h3><i class="icon-right-circle"></i> I highly recommend OFBiz. I finished my project in 6 months working solo</h3> + </div> + <div class="caption sfl hidden-phone" data-x="495" data-y="193" data-speed="500" data-start="1250" data-easing="easeOutBounce" > + <h3><i class="icon-right-circle"></i> I love this framework and the freedom it gives</h3> + </div> + <div class="caption sfb hidden-phone" data-x="495" data-y="270" data-speed="900" data-start="2000" data-easing="easeOutExpo" > <a href="https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+User+Stories" class="btn btn-3d btn-3d-medium">Read More</a> </div> + <div class="caption sfl hidden-phone" data-x="495" data-y="227" data-speed="500" data-start="1500" data-easing="easeOutBounce" > + <h3><i class="icon-right-circle"></i> the community support is amazing...</h3> + </div> + </li> + <li data-transition="fade" data-slotamount="2"> <img src="images/slider/rs/thumb.png" alt="slide"/> + <div class="caption lfl" data-x="450" data-y="65" data-speed="900" data-start="800" data-easing="easeOutBack"><img src="images/slider/rs/ofbiz3.png" alt="slide" class="ie8PngFix"/></div> + <div class="caption sft" data-x="70" data-y="120" data-speed="300" data-start="1600" data-easing="easeOutExpo" > + <h2>Enjoy the benefits</h2> + </div> + <div class="caption sfb hidden-phone" data-x="72" data-y="271" data-speed="900" data-start="2500" data-easing="easeOutExpo" > </div> + <div class="caption lfr hidden-phone" data-x="72" data-y="194" data-speed="500" data-start="1500" data-easing="easeInExpo" > + <h3><i class="icon-right-circle"></i> Freedom from vendor lock-in</h3> + </div> + <div class="caption lfr hidden-phone" data-x="72" data-y="228" data-speed="500" data-start="1700" data-easing="easeInExpo" > + <h3><i class="icon-right-circle"></i> Flexible enough to fit any business</h3> + </div> + </li> + <li data-transition="fade" data-slotamount="1"> <img src="images/slider/rs/thumb.png" alt="slide"/> + <div class="caption lfr" data-x="0" data-y="60" data-speed="800" data-start="300" data-easing="easeOutBack"><img src="images/slider/rs/screen1.png" alt="slide" class="ie8PngFix"/></div> + <div class="caption lfl" data-x="150" data-y="200" data-speed="600" data-start="700" data-easing="easeOutExpo"><img src="images/slider/rs/screen2.png" alt="slide" class="ie8PngFix"/></div> + <div class="caption lfb" data-x="250" data-y="300" data-speed="400" data-start="1000" data-easing="easeOutBack"><img src="images/slider/rs/screen3.png" alt="slide" class="ie8PngFix"/></div> + <div class="caption sft" data-x="465" data-y="48" data-speed="300" data-start="500" data-easing="easeOutExpo" > + <h2>Flexible OFBiz Solutions, </h2> + </div> + <div class="caption sft" data-x="465" data-y="102" data-speed="300" data-start="700" data-easing="easeOutExpo" > + <h2>choose yours...</h2> + </div> + <div class="caption sfb hidden-phone" data-x="467" data-y="287" data-speed="900" data-start="1500" data-easing="easeOutExpo" > </div> + <div class="caption sfl hidden-phone" data-x="467" data-y="176" data-speed="500" data-start="900" data-easing="easeOutBounce" > + <h3><i class="icon-right-circle"></i> ERP with integrated E-Commerce</h3> + </div> + <div class="caption sfl hidden-phone" data-x="467" data-y="210" data-speed="500" data-start="1100" data-easing="easeOutBounce" > + <h3><i class="icon-right-circle"></i> Manufacturing and Warehouse Management</h3> + </div> + <div class="caption sfl hidden-phone" data-x="467" data-y="244" data-speed="500" data-start="1300" data-easing="easeOutBounce" > + <h3><i class="icon-right-circle"></i> CRM,Human Resources,WebPOS and much more </h3> + </div> + </li> + <li data-transition="fade" data-slotamount="2"> <img src="images/slider/rs/thumb.png" alt="slide"/> + <div class="caption lfl" data-x="400" data-y="30" data-speed="900" data-start="800" data-easing="easeOutBack"><img src="images/slider/rs/ofbiz2.png" alt="slide" class="ie8PngFix"/></div> + <div class="caption sft" data-x="50" data-y="60" data-speed="300" data-start="1600" data-easing="easeOutExpo" > + <h2>The best things in life are free!</h2> + </div> + <div class="caption lfr hidden-phone" data-x="52" data-y="134" data-speed="500" data-start="1500" data-easing="easeInExpo" > + <h3><i class="icon-right-circle"></i> Download and it's yours....free</h3> + </div> + <div class="caption lfr hidden-phone" data-x="52" data-y="168" data-speed="500" data-start="1700" data-easing="easeInExpo" > + <h3><i class="icon-right-circle"></i> Enjoy the benefits and freedom</h3> + </div> + <div class="caption sfb hidden-phone" data-x="52" data-y="246" data-speed="900" data-start="2500" data-easing="easeOutExpo" > </div> + <div class="caption lfr hidden-phone" data-x="52" data-y="202" data-speed="500" data-start="1800" data-easing="easeInExpo" > + <h3><i class="icon-right-circle"></i> No licensing fees....ever</h3> + </div> + </li> + </ul> + <div class="tp-bannertimer"></div> + </div> + </div> +</section> +<!-- slider --> +<!-- content --> +<!-- Call to download action --> +<!-- three blocs --> + <section class="sliceTop"> + <div class="container"> + <div class="row"> + <div class="span12 drop-shadow lifted"> + <div class="topQuote"> + <h1> <strong>Apache OFBiz</strong> is a suite of business + applications flexible enough to be used across any industry. + A common architecture allows developers to easily extend or + enhance it to create custom features. + </h1> + </div> + <div class="topBox clearfix"> + <div class="bigIconsColumnsWrapper"> + <article class="one_third"> <a href="" class="iconWrapper iconBig ch-item"> <i class=" icon-cog-alt"></i> + <div class="ch-info"> <span> Java </span> </div> + </a> + <h2 class="smallHeading"><span>Powerful Java Web Framework</h2> + <p> + OFBiz is a Java based web framework including an entity engine, + a service engine and a widget based UI allowing you to + quickly prototype and develop your web application. + </p> + </article> + <article class="one_third"> <a href="" class="iconWrapper iconBig ch-item"> <i class=" icon-th-list"></i> + <div class="ch-info"> <span> CRM & ERP </span> </div> + </a> + <h2 class="smallHeading">Mature ERP Solution</h2> + <p>An Apache top level project for 10 years, OFBiz has shown it's stability and maturity as an enterprise-wide + ERP solution that is flexible enough to change with your business.</p> + </article> + <article class="one_third last"> <a href="" class="iconWrapper iconBig ch-item"> <i class=" icon-edit"></i> + <div class="ch-info"> <span> Develop </span> </div> + </a> + <h2 class="smallHeading">Developer Friendly</h2> + <p> + OFBiz architecture is extremely flexible allowing developers + to quickly and easily extend and enhance the framework with + custom features. + </p> + </article> + </div> + </div> + </div> + </div> + </div> + </section> + <!-- Call to download action --> + <section class="slice"> + <div class="container"> + <div class="row-fluid callToActionBoxed"> + <div class="span7"> + <div class="ctaText"> + <h3>Go ahead and take OFBiz for a spin!</h3> + <p>Download <strong>OFBiz</strong> and try it out for yourself. + All you is need is to install the Java Development Kit and then follow + the instructions in the README file.</p> + </div> + </div> + <div class="span5"> + <div class="btnWrapper"> + <a href="download.html" class="iconBtn" title="Download OFBiz"> + <i class="icon-download"></i>Download OFBiz + </a> + </div> + </div> + </div> + </div> + </section> + <!-- Call to download action --> + <!-- three blocs --> + <!-- carousel works--> + <section class="slice"> + <div class="container"> + <div class="row"> + <div class="span12"> + <h2><span>Our </span>Users</h2> + <div class="divider"><span></span></div> + </div> + <div class="span12"> + <div id="projectCarousel" class="carousel slide"> + <div class="carousel-inner da-thumbs"> + <div class="active item"> + <div class="row"> + <div class="span3" > + <article> <a href="images/works/work1-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work1.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g Stannah, UK ?</h3> + <p>OFBiz Modules used </p> + </section> + </article> + </div> + <div class="span3"> + <article> <a href="images/works/work8-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work8.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g. Scarpa</h3> + <p>OFBiz Modules used</p> + </section> + </article> + </div> + <div class="span3"> + <article> <a href="images/works/work3-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work3.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g French User ?</h3> + <p>OFBiz Modules used</p> + </section> + </article> + </div> + <div class="span3" > + <article> <a href="images/works/work2-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work2.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g German User ?</h3> + <p>OFBiz Modules used</p> + </section> + </article> + </div> + </div> + </div> + <div class="item"> + <div class="row"> + <div class="span3" > + <article> <a href="images/works/work4-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work4.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g. Chinese User ?</h3> + <p>OFBiz Modules used</p> + </section> + </article> + </div> + <div class="span3" > + <article> <a href="images/works/work5-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work5.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g. Thai user?</h3> + <p>OFBiz Modules used</p> + </section> + </article> + </div> + <div class="span3" > + <article> <a href="images/works/work6-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work6.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g Government User</h3> + <p>OFBiz Modules Used</p> + </section> + </article> + </div> + <div class="span3" > + <article> <a href="images/works/work7-big.jpg" class="prettyPhoto"> + <section> <img alt="" src="images/works/work7.jpg" /> </section> + <div> <span class="iconWrapper iconLink"><i class="icon-search"></i></span> </div> + </a> + <section class="projectInfo"> + <h3>e.g Charity or Foundation User ?</h3> + <p>OFBiz Modules Used</p> + </section> + </article> + </div> + </div> + </div> + </div> + <a class="left carousel-control" href="#projectCarousel" data-slide="prev"><i class="icon-left-circle"></i></a> <a class="right carousel-control" href="#projectCarousel" data-slide="next"><i class="icon-right-circle"></i></a> </div> + </div> + </div> + </div> + </section> + <!-- carousel works--> +</section> +<!-- content --> +<!-- footer --> +<footer class="footer1"> + <div class="container" id="footer"> + <div class="row"> + <div class="span6 timelineWidget"> + <h2>Latest tweets</h2> + <div class="divider"><span></span></div> + <ul class="socialNetwork nav"> + <li> + <a href="https://twitter.com/ApacheOfbiz" class="icon-twitter-bird socialIcon tips" + target="_blank" title="follow us on Twitter"><span>twitter</span></a> + </li> + <li><a href="https://www.youtube.com/user/ofbiz" class="icon-play socialIcon tips" title="follow us on Youtube"><span>Youtube</span></a></li> + <!--<li><a href="#" class="icon-rss socialIcon tips" title="Our rss feed"><span>rss feed</span></a></li> + <li><a href="#" class="icon-facebook socialIcon tips" title="follow us on Facebook"><span>facebook</span></a></li> + <li><a href="#" class="icon-gplus socialIcon tips" title="follow us on Google +"><span>google +</span></a></li> + <li><a href="#" class="icon-instagram socialIcon tips" title="follow us on Instagram"><span>instagram</span></a></li> + <li><a href="#" class="icon-linkedin socialIcon tips" title="follow us on Linkedin"><span>linkedin</span></a></li> + <li><a href="#" class="icon-pinterest-circled socialIcon tips" title="follow us on Pinterest"><span>Pinterest</span></a></li>--> + </ul> + <div id="twitterFrame"> <a class="twitter-timeline" href="https://twitter.com/ApacheOfbiz?height=250" data-widget-id="588661945194192896" data-tweet-limit="2" data-theme="dark" data-chrome="nofooter noheader transparent" >Tweets by @ApacheOfbiz</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + </div> + <div class="span3 contactWidget"> + <h2>Contact Community</h2> + <div class="divider"><span></span></div> + <ul> + <li><a href="mailinglists.html">Mailing Lists</a></li> + <li><a href="source-repositories.html">Source Repository (SVN)</a></li> + <li><a href="https://issues.apache.org/jira/browse/OFBIZ" target="external">Issue Tracker (Jira)</a></li> + <li><a href="https://www.youtube.com/user/ofbiz" target="external">OFBiz Youtube Channel</a></li> + <li><a href="https://www.hipchat.com/g4vOayvmc" target="external">OFBiz HipChat Room</a></li> + </ul> + </div> + <div class="span3 sociallWidget"> + <h2>ASF Information</h2> + <div class="divider"><span></span></div> + <ul> + <li><a href="#">Apache Software Foundation</a></li> + <li><a href="#">Sponsorship</a></li> + <li><a href="#">Thanks</a></li> + <li><a href="#">Security</a></li> + </ul> + </div> + </div> + </div> +</footer> +<footer class="footer2" id="footerRights"> + <div class="container"> + <div class="row"> + <div class="span12"> + <p> + Copyright © 2016 The Apache Software Foundation. Licensed under the + Apache License, Version 2.0. Apache OFBiz, OFBiz, the project logo + and the Apache feather logo are trademarks of The Apache Software + Foundation. + </p> + </div> + </div> + </div> +</footer> +<!-- footer --> +</div> +<!-- globalWrapper --> +<script type="text/javascript" src="js-plugin/respond/respond.min.js"></script> +<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> +<script type="text/javascript" src="js-plugin/jquery-ui/jquery-ui-1.8.23.custom.min.js"></script> +<!-- third party plugins --> +<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script> +<script type="text/javascript" src="bootstrap/js/bootstrap-carousel.js"></script> +<script type="text/javascript" src="js-plugin/easing/jquery.easing.1.3.js"></script> +<script type="text/javascript" src="js-plugin/pretty-photo/js/jquery.prettyPhoto.js"></script> +<script type="text/javascript" src="js-plugin/hoverdir/jquery.hoverdir.js"></script> +<!-- jQuery KenBurn Slider --> +<script type="text/javascript" src="js-plugin/rs-plugin/js/jquery.themepunch.plugins.min.js"></script> +<script type="text/javascript" src="js-plugin/rs-plugin/js/jquery.themepunch.revolution.min.js"></script> +<!-- Custom --> +<script type="text/javascript" src="js/custom.js"></script> +<script type="text/javascript"> + var _gaq = _gaq || []; + _gaq.push(['_setAccount', UA]); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); +</script> +</body> +</html> Propchange: ofbiz/branches/ofbiz-new-website/index.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/index.html ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/index.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css Mon Mar 20 12:28:40 2017 @@ -0,0 +1,44 @@ +#contact h1 { margin: 10px 0 10px; font-size: 24px; color: #333333; } +#contact hr { color: inherit; height: 0; margin: 6px 0 6px 0; padding: 0; border: 1px solid #d9d9d9; border-style: none none solid; } + +#contact { display: block; margin: 50px auto; padding: 35px; border: 1px solid #cbcbcb; background-color: #FFF; -moz-border-radius:5px; -webkit-border-radius:5px; } + +/* Form style */ + +#contact label { display: inline-block; float: left; height: 26px; line-height: 26px; width: 155px; font-size: 1.5em; -moz-border-radius:5px; -webkit-border-radius:5px; } +#contact input, textarea, select { width: 280px; margin: 0; color: #666; background: #f5f5f5; border: 1px solid #ccc; margin: 5px 0; -moz-border-radius:5px; -webkit-border-radius:5px; } +#contact input:focus, textarea:focus, select:focus { border: 1px solid #999; background-color: #fff; color:#333; } +#contact input.submit { width: 85px; cursor: pointer; border: 1px solid #222; background:#333; color:#fff; } +#contact input.submit:hover { background:#444; } +#contact input[type="submit"][disabled] { background:#888; cursor: default; } +#contact fieldset { padding:20px; border:1px solid #eee; moz-border-radius:5px; -webkit-border-radius:5px; } +#contact legend { padding:7px 10px; font-weight:bold; color:#000; border:1px solid #eee; -moz-border-radius:5px; -webkit-border-radius:5px; margin-bottom:0 !important; margin-bottom:20px; } +#contact label.radio { display:block; width:100%; margin-top:10px; margin-bottom:5px; } +#contact span.required{ font-size: 13px; color: #ff0000; } /* Select the colour of the * if the field is required. */ + +#message { margin: 10px 0 0 0; padding: 0; } + +.error_message { display: block; line-height: 22px; background: #FBE3E4 url('../img/error.gif') no-repeat 10px 6px; padding: 3px 10px 3px 35px; color:#8a1f11;border: 1px solid #FBC2C4; -moz-border-radius:5px; -webkit-border-radius:5px; } + +ul.error_messages { margin: 0 0 0 15px; padding: 0; } +ul.error_messages li { height: 22px; line-height: 22px; color:#333; } + +.loader { padding: 0 10px; } + +#success_page h1 { background: url('../img/success.gif') left no-repeat; padding-left:22px; color:#5E5E5E} + +acronym { border-bottom:1px dotted #ccc; } + +input[type="checkbox"] { + width:20px !important; + margin: 4px 0 0; + margin-top: 1px \9; + float: left; + *margin-top: 0; + line-height: normal; + cursor: pointer; +} + +input[type="radio"] { + width:20px !important; +} \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/css/contact.css ------------------------------------------------------------------------------ svn:mime-type = text/css Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/ajax-loader.gif URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/ajax-loader.gif?rev=1787742&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/ajax-loader.gif ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/ajax-loader.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/error.gif URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/error.gif?rev=1787742&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/error.gif ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/error.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/success.gif URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/success.gif?rev=1787742&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/success.gif ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/success.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/1.png URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/1.png?rev=1787742&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/1.png ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/1.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/2.png URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/2.png?rev=1787742&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/2.png ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/2.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/3.png URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/3.png?rev=1787742&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/3.png ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/img/verify/3.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js Mon Mar 20 12:28:40 2017 @@ -0,0 +1,34 @@ +jQuery(document).ready(function() { + + $('#contactform').submit(function() { + + var action = $(this).attr('action'); + var values = $(this).serialize(); + + $('#submit').attr('disabled', 'disabled').after('<img src="js-plugin/ajax-contact-extend/assets/img/ajax-loader.gif" class="loader" />'); + + $("#message").slideUp(750, function() { + + $('#message').hide(); + + $.post(action, values, function(data) { + + $('#message').html(data); + + $('#message').slideDown('slow'); + + $('#contactform img.loader').fadeOut('fast', function() { + $(this).remove() + }); + $('#submit').removeAttr('disabled'); + if (data.match('success') != null) $('#contactform').slideUp('slow'); + + }); + + }); + + return false; + + }); + +}); \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/assets/js/jquery.jigowatt.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php Mon Mar 20 12:28:40 2017 @@ -0,0 +1,204 @@ +<?php if ( !isset( $_SESSION ) ) session_start(); + +if ( !$_POST ) exit; + +if ( !defined( "PHP_EOL" ) ) define( "PHP_EOL", "\r\n" ); + +/////////////////////////////////////////////////////////////////////////// + +// Simple Configuration Options + +// Enter the email address that you want to emails to be sent to. +// Example $address = "[hidden email]"; + +$address = "[hidden email]"; +$subject = " Website contact form "; +// Twitter Direct Message notification control. +// Set $twitter_active to 0 to disable Twitter Notification +$twitter_active = 0; + +// Get your consumer key and consumer secret from http://dev.twitter.com/apps/new +// Notes: +// Application Name: Jigowatt Contact Form +// Description: Jigowatt Contact Form Direct Messaging Funcionality +// Application Website: (your website address) +// Application Type: Browser +// Callback URL: (Blank) +// Default Access type: Read and Write +$twitter_user = ""; // Your user name +$consumer_key = ""; +$consumer_secret = ""; + +// Access Token and Access Token Secret is under "My Access Token" (right menu). +$token = ""; +$secret = ""; + +// END OF Simple Configuration Options + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////// +// +// Do not edit the following lines +// +/////////////////////////////////////////////////////////////////////////// + +$postValues = array(); +foreach ( $_POST as $name => $value ) { + $postValues[$name] = trim( $value ); +} +extract( $postValues ); + + +// Important Variables +$posted_verify = isset( $postValues['verify'] ) ? md5( $postValues['verify'] ) : ''; +$session_verify = !empty($_SESSION['jigowatt']['ajax-extended-form']['verify']) ? $_SESSION['jigowatt']['ajax-extended-form']['verify'] : ''; + +$error = ''; + +/////////////////////////////////////////////////////////////////////////// +// +// Begin verification process +// +// You may add or edit lines in here. +// +// To make a field not required, simply delete the entire if statement for that field. +// +/////////////////////////////////////////////////////////////////////////// + + +//////////////////////// +// Name field is required +if ( empty( $name ) ) { + $error .= '<li>Your name is required.</li>'; +} +//////////////////////// + + +//////////////////////// +// Email field is required +if ( empty( $email ) ) { + $error .= '<li>Your e-mail address is required.</li>'; +} elseif ( !isEmail( $email ) ) { + $error .= '<li>You have entered an invalid e-mail address.</li>'; +} +//////////////////////// + + +//////////////////////// +// Phone field is required +if ( empty( $phone ) ) { + $error .= '<li>Your phone number is required.</li>'; +} elseif ( !is_numeric( $phone ) ) { + $error .= '<li>Your phone number can only contain digits.</li>'; +} +//////////////////////// + + +//////////////////////// +// Comments field is required +if ( empty( $comments ) ) { + $error .= '<li>You must enter a message to send.</li>'; +} +//////////////////////// + + +//////////////////////// +// Agree to terms checkbox is required +if ( empty( $agree ) ) { + $error .= '<li>You must agree to our terms.</li>'; +} +//////////////////////// + + +//////////////////////// +// Verification code is required +if ( $session_verify != $posted_verify ) { + $error .= '<li>The verification code you entered is incorrect.</li>'; +} +//////////////////////// + +if ( !empty($error) ) { + echo '<div class="error_message">Attention! Please correct the errors below and try again.'; + echo '<ul class="error_messages">' . $error . '</ul>'; + echo '</div>'; + + // Important to have return false in here. + return false; + +} + +// Advanced Configuration Option. +// i.e. The standard subject will appear as, "You've been contacted by John Doe." + +$e_subject = "You've been contacted by: " . $name; + +// Advanced Configuration Option. +// You can change this if you feel that you need to. +// Developers, you may wish to add more fields to the form, in which case you must be sure to add them here. + +$msg = "You have been contacted by $name with regards to $subject, they passed verification and their message is as follows." . PHP_EOL . PHP_EOL; +$msg .= $comments . PHP_EOL . PHP_EOL; +$msg .= "You can contact $name via email, $email or via phone $phone." . PHP_EOL . PHP_EOL; +/*$msg .= "$name chose option: $optionsRadios";*/ +$msg .= "-------------------------------------------------------------------------------------------" . PHP_EOL; + + +if ( $twitter_active == 1 ) { + + $twitter_msg = $name . " - " . $comments . ". You can contact " . $name . " via email, " . $email ." or via phone " . $phone . "."; + twittermessage( $twitter_user, $twitter_msg, $consumer_key, $consumer_secret, $token, $secret ); + +} + +$msg = wordwrap( $msg, 70 ); + +$headers = "From: $email" . PHP_EOL; +$headers .= "Reply-To: $email" . PHP_EOL; +$headers .= "MIME-Version: 1.0" . PHP_EOL; +$headers .= "Content-type: text/plain; charset=utf-8" . PHP_EOL; +$headers .= "Content-Transfer-Encoding: quoted-printable" . PHP_EOL; + +if ( mail( $address, $e_subject, $msg, $headers ) ) { + + echo "<fieldset>"; + echo "<div id='success_page'>"; + echo "<h1>Email Sent Successfully.</h1>"; + echo "<p>Thank you <strong>$name</strong>, your message has been submitted to us.</p>"; + echo "</div>"; + echo "</fieldset>"; + + // Important to have return false in here. + return false; + +} + + +/////////////////////////////////////////////////////////////////////////// +// +// Do not edit below this line +// +/////////////////////////////////////////////////////////////////////////// +echo 'ERROR! Please confirm PHP mail() is enabled.'; +return false; + +function twittermessage( $user, $message, $consumer_key, $consumer_secret, $token, $secret ) { // Twitter Direct Message function, do not edit. + + require_once 'twitter/EpiCurl.php'; + require_once 'twitter/EpiOAuth.php'; + require_once 'twitter/EpiTwitter.php'; + + $Twitter = new EpiTwitter( $consumer_key, $consumer_secret ); + $Twitter->setToken( $token, $secret ); + + $direct_message = $Twitter->post_direct_messagesNew( array( 'user' => $user, 'text' => $message ) ); + $tweet_info = $direct_message->responseText; + +} + +function isEmail( $email ) { // Email address verification, do not edit. + + return preg_match( "/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0- 4][0-9]|[2][5][0-5]))$/i", $email ); + +} +?> Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/contact.php ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php Mon Mar 20 12:28:40 2017 @@ -0,0 +1,36 @@ +<?php if ( !isset( $_SESSION ) ) session_start(); header( "(anti-spam-content-type:) image/png" ); + +$enc_num = rand( 0, 9999 ); +$key_num = rand( 0, 24 ); +$hash_string = substr( md5( $enc_num ), $key_num, 5 ); // Length of String +$hash_md5 = md5( $hash_string ); + +$_SESSION['jigowatt']['ajax-extended-form']['verify'] = $hash_md5; + +// Verification Image Background Selection +$dir = dirname( dirname( __FILE__ ) ) . '/assets/'; +$bgs = array( + $dir . 'img/verify/1.png', + $dir . 'img/verify/2.png', + $dir . 'img/verify/3.png' +); +$background = array_rand( $bgs, 1 ); + +// Verification Image Variables +$img_handle = imagecreatefrompng( $bgs[$background] ); +$text_colour = imagecolorallocate( $img_handle, 108, 127, 6 ); +$font_size = 5; + +$size_array = getimagesize( $bgs[$background] ); +$img_w = $size_array[0]; +$img_h = $size_array[1]; + +$horiz = round( ( $img_w/2 )-( ( strlen( $hash_string )*imagefontwidth( 5 ) )/2 ), 1 ); +$vert = round( ( $img_h/2 )-( imagefontheight( $font_size )/2 ) ); + +// Make the Verification Image +imagestring( $img_handle, $font_size, $horiz, $vert, $hash_string, $text_colour ); +imagepng( $img_handle ); + +// Destroy the Image to keep Server Space +imagedestroy( $img_handle ); Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/image.php ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php Mon Mar 20 12:28:40 2017 @@ -0,0 +1,38 @@ +<html> + <head> + </head> + <body> + <h2>Send Direct Messages on Twitter</h2> + + <?php if (!isset($_POST['submit'])) { ?> + <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> + Direct message: <br/> + <textarea name="message" cols="15"></textarea><br/> + <input type="submit" name="submit" value="Send" /> + </form> + + <?php } else { + + function twittermessage($user,$pass,$message) { + $url = "http://twitter.com/direct_messages/new.xml"; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + curl_setopt($ch, CURLOPT_USERPWD, "$user:$pass"); + curl_setopt($ch, CURLOPT_URL,$url); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS,"user=$user&text=$message"); + $results = curl_exec ($ch); + curl_close ($ch); + } + + $user = "jigowatt"; + $pass = "xxxxxx"; + $message = $_POST['message']; + + twittermessage($user,$pass,$message); + + } + ?> + </body> +</html> \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter.php ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php Mon Mar 20 12:28:40 2017 @@ -0,0 +1,128 @@ +<?php +class EpiCurl +{ + const timeout = 3; + static $inst = null; + static $singleton = 0; + private $mc; + private $msgs; + private $running; + private $requests = array(); + private $responses = array(); + private $properties = array(); + + function __construct() + { + if(self::$singleton == 0) + { + throw new Exception('This class cannot be instantiated by the new keyword. You must instantiate it using: $obj = EpiCurl::getInstance();'); + } + + $this->mc = curl_multi_init(); + $this->properties = array( + 'code' => CURLINFO_HTTP_CODE, + 'time' => CURLINFO_TOTAL_TIME, + 'length'=> CURLINFO_CONTENT_LENGTH_DOWNLOAD, + 'type' => CURLINFO_CONTENT_TYPE + ); + } + + public function addCurl($ch) + { + $key = (string)$ch; + $this->requests[$key] = $ch; + + $res = curl_multi_add_handle($this->mc, $ch); + + // (1) + if($res === CURLM_OK || $res === CURLM_CALL_MULTI_PERFORM) + { + do { + $mrc = curl_multi_exec($this->mc, $active); + } while ($mrc === CURLM_CALL_MULTI_PERFORM); + + return new EpiCurlManager($key); + } + else + { + return $res; + } + } + + public function getResult($key = null) + { + if($key != null) + { + if(isset($this->responses[$key])) + { + return $this->responses[$key]; + } + + $running = null; + do + { + $resp = curl_multi_exec($this->mc, $runningCurrent); + if($running !== null && $runningCurrent != $running) + { + $this->storeResponses($key); + if(isset($this->responses[$key])) + { + return $this->responses[$key]; + } + } + $running = $runningCurrent; + }while($runningCurrent > 0); + } + + return false; + } + + private function storeResponses() + { + while($done = curl_multi_info_read($this->mc)) + { + $key = (string)$done['handle']; + $this->responses[$key]['data'] = curl_multi_getcontent($done['handle']); + foreach($this->properties as $name => $const) + { + $this->responses[$key][$name] = curl_getinfo($done['handle'], $const); + curl_multi_remove_handle($this->mc, $done['handle']); + } + } + } + + static function getInstance() + { + if(self::$inst == null) + { + self::$singleton = 1; + self::$inst = new EpiCurl(); + } + + return self::$inst; + } +} + +class EpiCurlManager +{ + private $key; + private $epiCurl; + + function __construct($key) + { + $this->key = $key; + $this->epiCurl = EpiCurl::getInstance(); + } + + function __get($name) + { + $responses = $this->epiCurl->getResult($this->key); + return $responses[$name]; + } +} + +/* + * Credits: + * - (1) Alistair pointed out that curl_multi_add_handle can return CURLM_CALL_MULTI_PERFORM on success. + */ +?> Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiCurl.php ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php Mon Mar 20 12:28:40 2017 @@ -0,0 +1,234 @@ +<?php +class EpiOAuth +{ + public $version = '1.0'; + + protected $requestTokenUrl; + protected $accessTokenUrl; + protected $authorizeUrl; + protected $consumerKey; + protected $consumerSecret; + protected $token; + protected $tokenSecret; + protected $signatureMethod; + + public function getAccessToken() + { + $resp = $this->httpRequest('GET', $this->accessTokenUrl); + return new EpiOAuthResponse($resp); + } + + public function getAuthorizationUrl() + { + $retval = "{$this->authorizeUrl}?"; + + $token = $this->getRequestToken(); + return $this->authorizeUrl . '?oauth_token=' . $token->oauth_token; + } + + public function getRequestToken() + { + $resp = $this->httpRequest('GET', $this->requestTokenUrl); + return new EpiOAuthResponse($resp); + } + + public function httpRequest($method = null, $url = null, $params = null) + { + if(empty($method) || empty($url)) + return false; + + if(empty($params['oauth_signature'])) + $params = $this->prepareParameters($method, $url, $params); + + switch($method) + { + case 'GET': + return $this->httpGet($url, $params); + break; + case 'POST': + return $this->httpPost($url, $params); + break; + } + } + + public function setToken($token = null, $secret = null) + { + $params = func_get_args(); + $this->token = $token; + $this->tokenSecret = $secret; + } + + public function encode($string) + { + return rawurlencode(utf8_encode($string)); + } + + protected function addOAuthHeaders(&$ch, $url, $oauthHeaders) + { + $_h = array('Expect:'); + $urlParts = parse_url($url); + $oauth = 'Authorization: OAuth realm="' . $urlParts['path'] . '",'; + foreach($oauthHeaders as $name => $value) + { + $oauth .= "{$name}=\"{$value}\","; + } + $_h[] = substr($oauth, 0, -1); + + curl_setopt($ch, CURLOPT_HTTPHEADER, $_h); + } + + protected function generateNonce() + { + if(isset($this->nonce)) // for unit testing + return $this->nonce; + + return md5(uniqid(rand(), true)); + } + + protected function generateSignature($method = null, $url = null, $params = null) + { + if(empty($method) || empty($url)) + return false; + + + // concatenating + $concatenatedParams = ''; + foreach($params as $k => $v) + { + $v = $this->encode($v); + $concatenatedParams .= "{$k}={$v}&"; + } + $concatenatedParams = $this->encode(substr($concatenatedParams, 0, -1)); + + // normalize url + $normalizedUrl = $this->encode($this->normalizeUrl($url)); + $method = $this->encode($method); // don't need this but why not? + + $signatureBaseString = "{$method}&{$normalizedUrl}&{$concatenatedParams}"; + return $this->signString($signatureBaseString); + } + + protected function httpGet($url, $params = null) + { + if(count($params['request']) > 0) + { + $url .= '?'; + foreach($params['request'] as $k => $v) + { + $url .= "{$k}={$v}&"; + } + $url = substr($url, 0, -1); + } + $ch = curl_init($url); + $this->addOAuthHeaders($ch, $url, $params['oauth']); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $resp = $this->curl->addCurl($ch); + + return $resp; + } + + protected function httpPost($url, $params = null) + { + $ch = curl_init($url); + $this->addOAuthHeaders($ch, $url, $params['oauth']); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params['request'])); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $resp = $this->curl->addCurl($ch); + return $resp; + } + + protected function normalizeUrl($url = null) + { + $urlParts = parse_url($url); + $scheme = strtolower($urlParts['scheme']); + $host = strtolower($urlParts['host']); + $port = intval($urlParts['port']); + + $retval = "{$scheme}://{$host}"; + if($port > 0 && ($scheme === 'http' && $port !== 80) || ($scheme === 'https' && $port !== 443)) + { + $retval .= ":{$port}"; + } + $retval .= $urlParts['path']; + if(!empty($urlParts['query'])) + { + $retval .= "?{$urlParts['query']}"; + } + + return $retval; + } + + protected function prepareParameters($method = null, $url = null, $params = null) + { + if(empty($method) || empty($url)) + return false; + + $oauth['oauth_consumer_key'] = $this->consumerKey; + $oauth['oauth_token'] = $this->token; + $oauth['oauth_nonce'] = $this->generateNonce(); + $oauth['oauth_timestamp'] = !isset($this->timestamp) ? time() : $this->timestamp; // for unit test + $oauth['oauth_signature_method'] = $this->signatureMethod; + $oauth['oauth_version'] = $this->version; + + // encoding + array_walk($oauth, array($this, 'encode')); + if(is_array($params)) + array_walk($params, array($this, 'encode')); + $encodedParams = array_merge($oauth, (array)$params); + + // sorting + ksort($encodedParams); + + // signing + $oauth['oauth_signature'] = $this->encode($this->generateSignature($method, $url, $encodedParams)); + return array('request' => $params, 'oauth' => $oauth); + } + + protected function signString($string = null) + { + $retval = false; + switch($this->signatureMethod) + { + case 'HMAC-SHA1': + $key = $this->encode($this->consumerSecret) . '&' . $this->encode($this->tokenSecret); + $retval = base64_encode(hash_hmac('sha1', $string, $key, true)); + break; + } + + return $retval; + } + + public function __construct($consumerKey, $consumerSecret, $signatureMethod='HMAC-SHA1') + { + $this->consumerKey = $consumerKey; + $this->consumerSecret = $consumerSecret; + $this->signatureMethod = $signatureMethod; + $this->curl = EpiCurl::getInstance(); + } +} + +class EpiOAuthResponse +{ + private $__resp; + + public function __construct($resp) + { + $this->__resp = $resp; + } + + public function __get($name) + { + if($this->__resp->code < 200 || $this->__resp->code > 299) + return false; + + parse_str($this->__resp->data, $result); + foreach($result as $k => $v) + { + $this->$k = $v; + } + + return $result[$name]; + } +} +?> \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiOAuth.php ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php Mon Mar 20 12:28:40 2017 @@ -0,0 +1,49 @@ +<?php +class EpiTwitter extends EpiOAuth +{ + const EPITWITTER_SIGNATURE_METHOD = 'HMAC-SHA1'; + protected $requestTokenUrl = 'http://twitter.com/oauth/request_token'; + protected $accessTokenUrl = 'http://twitter.com/oauth/access_token'; + protected $authorizeUrl = 'http://twitter.com/oauth/authorize'; + protected $apiUrl = 'http://twitter.com'; + + public function __call($name, $params = null) + { + $parts = explode('_', $name); + $method = strtoupper(array_shift($parts)); + $parts = implode('_', $parts); + $url = $this->apiUrl . '/' . preg_replace('/[A-Z]|[0-9]+/e', "'/'.strtolower('\\0')", $parts) . '.json'; + if(!empty($params)) + $args = array_shift($params); + + return new EpiTwitterJson(call_user_func(array($this, 'httpRequest'), $method, $url, $args)); + } + + public function __construct($consumerKey = null, $consumerSecret = null, $oauthToken = null, $oauthTokenSecret = null) + { + parent::__construct($consumerKey, $consumerSecret, self::EPITWITTER_SIGNATURE_METHOD); + $this->setToken($oauthToken, $oauthTokenSecret); + } +} + +class EpiTwitterJson +{ + private $resp; + + public function __construct($resp) + { + $this->resp = $resp; + } + + public function __get($name) + { + $this->responseText = $this->resp->data; + $this->response = (array)json_decode($this->responseText, 1); + foreach($this->response as $k => $v) + { + $this->$k = $v; + } + + return $this->$name; + } +} Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/ajax-contact-extend/classes/twitter/EpiTwitter.php ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md Mon Mar 20 12:28:40 2017 @@ -0,0 +1,53 @@ +bootstrap-select +================ + +A custom select for @twitter bootstrap using button dropdown, designed to behave like regular Bootstrap selects; + +## Demo + +See an [example](http://caseyjhol.github.com/bootstrap-select/). + +## Authors + +[Silvio Moreto](http://github.com/silviomoreto), +[Ana Carolina](http://github.com/anacarolinats), and +[caseyjhol](https://github.com/caseyjhol). + +## Usage + +Create your `<select>` with the `.selectpicker` class. + + <select class="selectpicker"> + <option>Mustard</option> + <option>Ketchup</option> + <option>Barbecue</option> + </select> + +Enable Bootstrap-Select via JavaScript: + + $('.selectpicker').selectpicker(); + +Or just + + $('select').selectpicker(); + +Options can be passed via data attributes or JavaScript. + + $('.selectpicker').selectpicker({ + style: 'btn-info', + size: 4 + }); + +You can set different Bootstrap classes on the button via the `data-style` attribute. Classes are applied to `.btn-group`.Apply `.span*` class to the selects to set the width. Add the `disabled` attribute to the select to apply the `.disabled` class. The `size` option is set to `'auto'` by default. When `size` is set to `'auto'`, the menu always opens up to show as many items as the window will allow without being cut off. Set `size` to `false` to always show all items. The size of the menu can also be specifed using the `data-size` attribute. Specify a number for `data-size` to choose the maximum number of items to show in the menu. Make the select a dropup menu by adding the `.dropup` class to the select. + +## Copyright and license + +Copyright (C) 2013 bootstrap-select + +Licensed under the MIT license. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/README.md ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css Mon Mar 20 12:28:40 2017 @@ -0,0 +1,50 @@ +.clearfix:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +.bootstrap-select.btn-group, .bootstrap-select.btn-group[class*="span"] { + float:none; + display: inline-block; + margin-bottom: 10px; + margin-left:0; +} +.bootstrap-select {width: 220px;} +.bootstrap-select .btn {width: 220px;} +.bootstrap-select .btn:focus { + outline: thin dotted #333333 !important; + outline: 5px auto -webkit-focus-ring-color !important; + outline-offset: -2px; +} +.bootstrap-select.btn-group .btn .filter-option { + overflow:hidden; + position:absolute; + left:12px; + right:25px; + text-align:left; +} +.bootstrap-select.btn-group .btn .caret { + position:absolute; + right:12px; +} +.bootstrap-select.btn-group .disabled, .bootstrap-select.btn-group .dropdown-menu li.disabled > a {cursor: not-allowed;} +.bootstrap-select.btn-group[class*="span"] .btn { + width:100%; +} +.bootstrap-select.btn-group .dropdown-menu { + min-width:100%; + -moz-box-sizing:border-box; + -webkit-box-sizing:border-box; + box-sizing:border-box; +} +.bootstrap-select.btn-group .dropdown-menu dt { + display:block; + padding:3px 20px; + cursor:default; +} +.bootstrap-select.btn-group .dropdown-menu li > a.opt {padding-left:35px;} +.bootstrap-select.btn-group .dropdown-menu .optgroup-div {border-top:1px solid #e5e5e5;} +.bootstrap-select.btn-group .dropdown-menu li > a {cursor: pointer;} \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.css ------------------------------------------------------------------------------ svn:mime-type = text/css Added: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js Mon Mar 20 12:28:40 2017 @@ -0,0 +1,280 @@ +!function($) { + var Selectpicker = function(element, options, e) { + if (e ) { + e.stopPropagation(); + e.preventDefault(); + } + this.$element = $(element); + this.$newElement = null; + this.button = null; + this.options = $.extend({}, $.fn.selectpicker.defaults, this.$element.data(), typeof options == 'object' && options); + this.style = this.options.style; + this.size = this.options.size; + this.init(); + }; + + Selectpicker.prototype = { + + constructor: Selectpicker, + + init: function (e) { + this.$element.hide(); + var classList = this.$element.attr('class') !== undefined ? this.$element.attr('class').split(/\s+/) : ''; + var template = this.getTemplate(); + var id = this.$element.attr('id'); + template = this.createLi(template); + this.$element.after(template); + this.$newElement = this.$element.next('.bootstrap-select'); + var select = this.$newElement; + var menu = this.$newElement.find('.dropdown-menu'); + var menuA = this.$newElement.find('.dropdown-menu li > a'); + var liHeight = parseInt(menuA.css('line-height')) + menuA.outerHeight(); + var selectOffset_top = this.$newElement.offset().top; + var size = 0; + var menuHeight = 0; + var selectHeight = this.$newElement.outerHeight(); + this.button = this.$newElement.find('> button'); + if (id !== undefined) { + this.button.attr('id', id); + $('label[for="' + id + '"]').click(function(){ select.find('button#'+id).focus(); }) + } + for (var i = 0; i < classList.length; i++) { + if(classList[i] != 'selectpicker') { + this.$newElement.addClass(classList[i]); + } + } + this.button.addClass(this.style); + this.checkDisabled(); + this.checkTabIndex(); + this.clickListener(); + var menuPadding = parseInt(menu.css('padding-top')) + parseInt(menu.css('padding-bottom')) + parseInt(menu.css('border-top-width')) + parseInt(menu.css('border-bottom-width')); + if (this.size == 'auto') { + function getSize() { + var selectOffset_top_scroll = selectOffset_top - $(window).scrollTop(); + var windowHeight = window.innerHeight; + var menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2; + var selectOffset_bot = windowHeight - selectOffset_top_scroll - selectHeight - menuExtras; + if (!select.hasClass('dropup')) { + size = Math.floor(selectOffset_bot/liHeight); + } else { + size = Math.floor((selectOffset_top_scroll - menuExtras)/liHeight); + } + if (size < 4) {size = 3}; + menuHeight = liHeight*size + menuPadding; + if (menu.find('li').length + menu.find('dt').length > size) { + menu.css({'max-height' : menuHeight + 'px', 'overflow-y' : 'scroll'}); + } else { + menu.css({'max-height' : 'none', 'overflow-y' : 'auto'}); + } + } + getSize(); + $(window).resize(getSize); + $(window).scroll(getSize); + this.$element.bind('DOMNodeInserted', getSize); + } else if (this.size && this.size != 'auto' && menu.find('li').length > this.size) { + menuHeight = liHeight*this.size + menuPadding; + if (this.size == 1) {menuHeight = menuHeight + 8} + menu.css({'max-height' : menuHeight + 'px', 'overflow-y' : 'scroll'}); + } + + this.$element.bind('DOMNodeInserted', $.proxy(this.reloadLi, this)); + }, + + getTemplate: function() { + var template = + "<div class='btn-group bootstrap-select'>" + + "<button class='btn dropdown-toggle clearfix' data-toggle='dropdown'>" + + "<span class='filter-option pull-left'>__SELECTED_OPTION</span> " + + "<span class='caret'></span>" + + "</button>" + + "<ul class='dropdown-menu' role='menu'>" + + "__ADD_LI" + + "</ul>" + + "</div>"; + + return template; + }, + + reloadLi: function() { + var _li = []; + var _liA = []; + var _liHtml = ''; + + this.$newElement.find('li').remove(); + + this.$element.find('option').each(function(){ + _li.push($(this).text()); + }); + + this.$element.find('option').each(function() { + var optionClass = $(this).attr("class") !== undefined ? $(this).attr("class") : ''; + if ($(this).parent().is('optgroup')) { + if ($(this).index() == 0) { + if ($(this)[0].index != 0) { + _liA.push( + '<dt class="optgroup-div">'+$(this).parent().attr('label')+'</dt>'+ + '<a tabindex="-1" class="opt '+optionClass+'">'+$(this).text()+'</a>' + ); + } else { + _liA.push( + '<dt>'+$(this).parent().attr('label')+'</dt>'+ + '<a tabindex="-1" class="opt '+optionClass+'">'+$(this).text()+'</a>' + ); + } + } else { + _liA.push('<a tabindex="-1" class="opt '+optionClass+'">'+$(this).text()+'</a>'); + } + } else { + _liA.push('<a tabindex="-1" class="'+optionClass+'">'+$(this).text()+'</a>'); + } + }); + + if(_li.length > 0) { + for (var i = 0; i < _li.length; i++) { + var disabled = this.$element.find('option').eq(i).is(':disabled') ? 'class="disabled"' : ''; + this.$newElement.find('ul').append( + '<li rel=' + i + ' '+ disabled +'>' + _liA[i] + '</li>' + ); + } + } + + this.$newElement.find('li dt').on('click', function(e) { + e.stopPropagation(); + $select = $(this).parent().parents('.bootstrap-select'); + $select.find('button').focus(); + }); + this.$newElement.find('li.disabled a').on('click', function(e) { + e.stopPropagation(); + $select = $(this).parent().parents('.bootstrap-select'); + $select.find('button').focus(); + }); + }, + + createLi: function(template) { + + var _li = []; + var _liA = []; + var _liHtml = ''; + var _this = this; + var _selected_index = this.$element[0].selectedIndex ? this.$element[0].selectedIndex : 0; + + this.$element.find('option').each(function(){ + _li.push($(this).text()); + }); + + this.$element.find('option').each(function() { + var optionClass = $(this).attr("class") !== undefined ? $(this).attr("class") : ''; + if ($(this).parent().is('optgroup')) { + if ($(this).index() == 0) { + if ($(this)[0].index != 0) { + _liA.push( + '<dt class="optgroup-div">'+$(this).parent().attr('label')+'</dt>'+ + '<a tabindex="-1" class="opt '+optionClass+'">'+$(this).text()+'</a>' + ); + } else { + _liA.push( + '<dt>'+$(this).parent().attr('label')+'</dt>'+ + '<a tabindex="-1" class="opt '+optionClass+'">'+$(this).text()+'</a>' + ); + } + } else { + _liA.push('<a tabindex="-1" class="opt '+optionClass+'">'+$(this).text()+'</a>'); + } + } else { + _liA.push('<a tabindex="-1" class="'+optionClass+'">'+$(this).text()+'</a>'); + } + }); + + if (_li.length > 0) { + template = template.replace('__SELECTED_OPTION', _li[_selected_index]); + for (var i = 0; i < _li.length; i++) { + var disabled = this.$element.find('option').eq(i).is(':disabled') ? 'class="disabled"' : ''; + _liHtml += "<li rel=" + i + " "+ disabled +">" + _liA[i] + "</li>"; + } + } + + this.$element.find('option').eq(_selected_index).prop('selected',true); + + template = template.replace('__ADD_LI', _liHtml); + + return template; + }, + + checkDisabled: function() { + if (this.$element.is(':disabled')) { + this.button.addClass('disabled'); + this.button.click(function(e) { + e.preventDefault(); + }); + } + }, + + checkTabIndex: function() { + if (this.$element.is('[tabindex]')) { + var tabindex = this.$element.attr("tabindex"); + this.button.attr('tabindex', tabindex); + } + }, + + clickListener: function() { + $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); }); + this.$newElement.find('li dt').on('click', function(e) { + e.stopPropagation(); + $select = $(this).parent().parents('.bootstrap-select'); + $select.find('button').focus(); + }); + this.$newElement.find('li.disabled a').on('click', function(e) { + e.stopPropagation(); + $select = $(this).parent().parents('.bootstrap-select'); + $select.find('button').focus(); + }); + this.$newElement.on('click', 'li a', function(e){ + e.preventDefault(); + var selected = $(this).parent().index(), + $this = $(this).parent(), + $select = $this.parents('.bootstrap-select'); + + if ($select.prev('select').not(':disabled')){ + + $select.prev('select').find('option').removeAttr('selected'); + + $select.prev('select').find('option').eq(selected).prop('selected', true).attr('selected', 'selected'); + $select.find('.filter-option').html($this.text()); + $select.find('button').focus(); + + // Trigger select 'change' + $select.prev('select').trigger('change'); + } + + }); + this.$element.on('change', function(e) { + if($(this).find('option:selected').attr('title')!=undefined){ + $(this).next('.bootstrap-select').find('.filter-option').html($(this).find('option:selected').attr('title')); + }else{ + $(this).next('.bootstrap-select').find('.filter-option').html($(this).find('option:selected').text()); + } + }); + } + + }; + + $.fn.selectpicker = function(option, event) { + return this.each(function () { + var $this = $(this), + data = $this.data('selectpicker'), + options = typeof option == 'object' && option; + if (!data) { + $this.data('selectpicker', (data = new Selectpicker(this, options, event))); + } + if (typeof option == 'string') { + data[option](); + } + }); + }; + + $.fn.selectpicker.defaults = { + style: null, + size: 'auto' + } + +}(window.jQuery); \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.js ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css URL: http://svn.apache.org/viewvc/ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css?rev=1787742&view=auto ============================================================================== --- ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css (added) +++ ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css Mon Mar 20 12:28:40 2017 @@ -0,0 +1 @@ +.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.bootstrap-select.btn-group,.bootstrap-select.btn-group[class*="span"]{float:none;display:inline-block;margin-bottom:10px;margin-left:0}.bootstrap-select{width:220px}.bootstrap-select .btn{width:220px}.bootstrap-select .btn:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.btn-group .btn .filter-option{overflow:hidden;position:absolute;left:12px;right:25px;text-align:left}.bootstrap-select.btn-group .btn .caret{position:absolute;right:12px}.bootstrap-select.btn-group .disabled,.bootstrap-select.btn-group .dropdown-menu li.disabled>a{cursor:not-allowed}.bootstrap-select.btn-group[class*="span"] .btn{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu dt{display:block;padding:3p x 20px;cursor:default}.bootstrap-select.btn-group .dropdown-menu li>a.opt{padding-left:35px}.bootstrap-select.btn-group .dropdown-menu .optgroup-div{border-top:1px solid #e5e5e5}.bootstrap-select.btn-group .dropdown-menu li>a{cursor:pointer} \ No newline at end of file Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css ------------------------------------------------------------------------------ svn:keywords = Date Rev Author URL Id Propchange: ofbiz/branches/ofbiz-new-website/js-plugin/bootstrap-select/bootstrap-select.min.css ------------------------------------------------------------------------------ svn:mime-type = text/css |
Free forum by Nabble | Edit this page |