r419 - in trunk: . chorem-webmotion/src/main/webapp/WEB-INF chorem-webmotion/src/main/webapp/WEB-INF/jsp chorem-webmotion/src/main/webapp/WEB-INF/jsp/salesReports chorem-webmotion/src/main/webapp/js
Author: ymartel Date: 2014-07-10 11:34:48 +0200 (Thu, 10 Jul 2014) New Revision: 419 Url: http://forge.chorem.org/projects/chorem/repository/revisions/419 Log: some dependencies upgrade and bootstrap migration Added: trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3-1.js Removed: trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3.js Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/salesReports/menu.jsp trunk/chorem-webmotion/src/main/webapp/WEB-INF/wro.xml trunk/chorem-webmotion/src/main/webapp/js/jquery.fn.gantt.js trunk/pom.xml Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp 2014-07-07 11:56:49 UTC (rev 418) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/decorator.jsp 2014-07-10 09:34:48 UTC (rev 419) @@ -59,44 +59,44 @@ <script type="text/javascript" src="<c:url value='/js/ng-select2.js'/>"></script> </head> <body> - <div class="navbar navbar-fixed-top"> + <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="navbar-inner"> <div class="container"> - <!-- .btn-navbar is used as the toggle for collapsed navbar content --> - <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> - </a> + </button> - <a class="brand" href="<c:url value="/"/>">Chorem</a> + <a class="navbar-brand" href="<c:url value="/"/>">Chorem</a> <!-- Everything you want hidden at 940px or less, place within here --> - <div class="nav-collapse"> + <div class="navbar-collapse collapse"> - <ul class="nav"> - <li class="dropdown nav-group"> + <ul class="nav navbar-nav"> + <li class="dropdown nav-group""> <a href="<c:url value="/wikitty/search?extension=Company&extension=Person&extension=Employee&extension=Touch"/>">Contact</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <b class="caret"></b> + <span class="caret"></span> </a> - <ul class="dropdown-menu"> - <li><a href="<c:url value="/wikitty/Company/search"/>"><i class="icon-th-list icon-black"></i> All company</a></li> - <li><a href="<c:url value="/wikitty/Company/edit/new"/>"><i class="icon-plus icon-black"></i> Add company</a></li> + <ul class="dropdown-menu" role="menu"> + <li><a href="<c:url value="/wikitty/Company/search"/>"><span class="glyphicon glyphicon-th-list"></span> All company</a></li> + <li><a href="<c:url value="/wikitty/Company/edit/new"/>"><span class="glyphicon glyphicon-plus glyphicon-black"></span> Add company</a></li> <li class="divider"></li> - <li><a href="<c:url value="/wikitty/Person/search"/>"><i class="icon-th-list icon-black"></i> All person</a></li> - <li><a href="<c:url value="/wikitty/Person/edit/new"/>"><i class="icon-plus icon-black"></i> Add person</a></li> + <li><a href="<c:url value="/wikitty/Person/search"/>"><span class="glyphicon glyphicon-th-list"></span> All person</a></li> + <li><a href="<c:url value="/wikitty/Person/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add person</a></li> <li class="divider"></li> - <li><a href="<c:url value="/wikitty/Employee/search"/>"><i class="icon-th-list icon-black"></i> All employee</a></li> - <li><a href="<c:url value="/wikitty/Employee/edit/new"/>"><i class="icon-plus icon-black"></i> Add employee</a></li> + <li><a href="<c:url value="/wikitty/Employee/search"/>"><span class="glyphicon glyphicon-th-list"></span> All employee</a></li> + <li><a href="<c:url value="/wikitty/Employee/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add employee</a></li> <li class="divider"></li> - <li><a href="<c:url value="/wikitty/ContactDetails/search"/>"><i class="icon-th-list icon-black"></i> All contact details</a></li> - <li><a href="<c:url value="/wikitty/ContactDetails/edit/new"/>"><i class="icon-plus icon-black"></i> Add contact details</a></li> + <li><a href="<c:url value="/wikitty/ContactDetails/search"/>"><span class="glyphicon glyphicon-th-list"></span> All contact details</a></li> + <li><a href="<c:url value="/wikitty/ContactDetails/edit/new"/>"><i class="glyphicon glyphicon-plus"></i> Add contact details</a></li> <li class="divider"></li> - <li><a href="<c:url value="/wikitty/Touch/search"/>"><i class="icon-th-list icon-black"></i> All touch</a></li> - <li><a href="<c:url value="/wikitty/Touch/edit/new"/>"><i class="icon-plus icon-black"></i> Add touch</a></li> + <li><a href="<c:url value="/wikitty/Touch/search"/>"><span class="glyphicon glyphicon-th-list"></span> All touch</a></li> + <li><a href="<c:url value="/wikitty/Touch/edit/new"/>"><i class="glyphicon glyphicon-plus"></i> Add touch</a></li> <li class="divider"></li> <li><a href="<c:url value="/crm/export"/>"> Export</li> </ul> @@ -105,31 +105,31 @@ <!-- around projects --> <a href="<c:url value="/report?report=quotation,projectOpen,projectClosed"/>">Project</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <b class="caret"></b> + <span class="caret"></span> </a> - <ul class="dropdown-menu"> + <ul class="dropdown-menu" role="menu"> <li>Current project</li> - <li><a href="<c:url value="/wikitty/Project/search"/>"><i class="icon-th-list icon-black"></i> All projects</a></li> - <li><a href="<c:url value="/wikitty/Project/edit/new"/>"><i class="icon-plus icon-black"></i> Add project</a></li> - <li><a href="<c:url value="/project"/>"><i class="icon-th-list icon-black"></i> Dashboard project</a></li> - <li><a href="<c:url value="/project/multi"/>"><i class="icon-th-list icon-black"></i> Dashboard multi-project</a></li> + <li><a href="<c:url value="/wikitty/Project/search"/>"><span class="glyphicon glyphicon-th-list"></span> All projects</a></li> + <li><a href="<c:url value="/wikitty/Project/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add project</a></li> + <li><a href="<c:url value="/project"/>"><span class="glyphicon glyphicon-th-list"></span> Dashboard project</a></li> + <li><a href="<c:url value="/project/multi"/>"><span class="glyphicon glyphicon-th-list"></span> Dashboard multi-project</a></li> <li class="divider"></li> <li>Propale</li> - <li><a href="<c:url value="/wikitty/Quotation/search"/>"><i class="icon-th-list icon-black"></i> All quotations</a></li> - <li><a href="<c:url value="/wikitty/Quotation/edit/new"/>"><i class="icon-plus icon-black"></i> Add quotation</a></li> + <li><a href="<c:url value="/wikitty/Quotation/search"/>"><span class="glyphicon glyphicon-th-list"></span> All quotations</a></li> + <li><a href="<c:url value="/wikitty/Quotation/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add quotation</a></li> <li class="divider"></li> <li>Task</li> - <li><a href="<c:url value="/wikitty/Task/search"/>"><i class="icon-th-list icon-black"></i> All tasks</a></li> - <li><a href="<c:url value="/wikitty/Task/edit/new"/>"><i class="icon-plus icon-black"></i> Add task</a></li> + <li><a href="<c:url value="/wikitty/Task/search"/>"><span class="glyphicon glyphicon-th-list"></span> All tasks</a></li> + <li><a href="<c:url value="/wikitty/Task/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add task</a></li> <li class="divider"></li> <li>Worker</li> - <li><a href="<c:url value="/wikitty/Worker/search"/>"><i class="icon-th-list icon-black"></i> All workers</a></li> - <li><a href="<c:url value="/wikitty/Worker/edit/new"/>"><i class="icon-plus icon-black"></i> Add worker</a></li> - <li><a href="<c:url value="/project/employee"/>"><i class="icon-plus icon-black"></i> Employee dashboard</a></li> + <li><a href="<c:url value="/wikitty/Worker/search"/>"><span class="glyphicon glyphicon-th-list"></span> All workers</a></li> + <li><a href="<c:url value="/wikitty/Worker/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add worker</a></li> + <li><a href="<c:url value="/project/employee"/>"><span class="glyphicon glyphicon-plus"></span> Employee dashboard</a></li> <li class="divider"></li> <li>Time</li> - <li><a href="<c:url value="/wikitty/Time/search"/>"><i class="icon-th-list icon-black"></i> All times</a></li> - <li><a href="<c:url value="/wikitty/Time/edit/new"/>"><i class="icon-plus icon-black"></i> Add time</a></li> + <li><a href="<c:url value="/wikitty/Time/search"/>"><span class="glyphicon glyphicon-th-list"></span> All times</a></li> + <li><a href="<c:url value="/wikitty/Time/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add time</a></li> <li class="divider"></li> <li>Report</li> <li><a href="<c:url value="/report?report=quotation"/>">Quotation</a></li> @@ -141,43 +141,43 @@ <!-- around sales --> <a>Commercial</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <b class="caret"></b> + <span class="caret"></span> </a> - <ul class="dropdown-menu"> - <li><a href="<c:url value="/sales/funnel"/>"><i class="icon-tasks icon-black"></i> Tunnel de commande</a></li> - <li><a href="<c:url value="/sales/report/sales"/>"><i class="icon-th-list icon-black"></i> Rapports</a></li> + <ul class="dropdown-menu" role="menu"> + <li><a href="<c:url value="/sales/funnel"/>"><span class="glyphicon glyphicon-tasks"></span> Tunnel de commande</a></li> + <li><a href="<c:url value="/sales/report/sales"/>"><span class="glyphicon glyphicon-th-list"></span> Rapports</a></li> </ul> </li> <li class="dropdown nav-group"> <!-- around financial --> <a href="<c:url value="/report?report=invoiceDebt,invoiceIncome,profitability,budget"/>">Financial</a> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <b class="caret"></b> + <span class="caret"></span> </a> - <ul class="dropdown-menu"> + <ul class="dropdown-menu" role="menu"> <li> - <a href="<c:url value="/wikitty/Quotation/search"/>"><i class="icon-th-list icon-black"></i>Quotations</a> - <a href="<c:url value="/wikitty/Quotation/edit/new"/>"><i class="icon-plus icon-black"></i></a> + <a href="<c:url value="/wikitty/Quotation/search"/>"><span class="glyphicon glyphicon-th-list"></span>Quotations</a> + <a href="<c:url value="/wikitty/Quotation/edit/new"/>"><span class="glyphicon glyphicon-plus"></span></a> </li> <li> - <a href="<c:url value="/wikitty/FinancialTransaction/search"/>"><i class="icon-th-list icon-black"></i>FinancialTransaction</a> - <a href="<c:url value="/wikitty/FinancialTransaction/edit/new"/>"><i class="icon-plus icon-black"></i></a> + <a href="<c:url value="/wikitty/FinancialTransaction/search"/>"><span class="glyphicon glyphicon-th-list"></span>FinancialTransaction</a> + <a href="<c:url value="/wikitty/FinancialTransaction/edit/new"/>"><span class="glyphicon glyphicon-plus"></span></a> </li> <li> - <a href="<c:url value="/wikitty/Invoice/search"/>"><i class="icon-th-list icon-black"></i>Invoices</a> - <a href="<c:url value="/wikitty/Invoice/edit/new"/>"><i class="icon-plus icon-black"></i></a> + <a href="<c:url value="/wikitty/Invoice/search"/>"><span class="glyphicon glyphicon-th-list"></span>Invoices</a> + <a href="<c:url value="/wikitty/Invoice/edit/new"/>"><span class="glyphicon glyphicon-plus"></span></a> </li> <li> - <a href="<c:url value="/wikitty/Invoice/search?query=FinancialTransaction.beneficiary%3D%22Code+Lutin%22"/>"><i class="icon-th-list icon-black"></i>Crédits-Ventes</a> - <a href="<c:url value="/wikitty/Invoice/edit/new"/>"><i class="icon-plus icon-black"></i></a> + <a href="<c:url value="/wikitty/Invoice/search?query=FinancialTransaction.beneficiary%3D%22Code+Lutin%22"/>"><span class="glyphicon glyphicon-th-list"></span>Crédits-Ventes</a> + <a href="<c:url value="/wikitty/Invoice/edit/new"/>"><span class="glyphicon glyphicon-plus"></span></a> </li> <li> - <a href="<c:url value="/wikitty/Invoice/search?query=FinancialTransaction.payer%3D%22Code+Lutin%22"/>"><i class="icon-th-list icon-black"></i>Débits-Achats</a> - <a href="<c:url value="/wikitty/Invoice/edit/new"/>"><i class="icon-plus icon-black"></i></a> + <a href="<c:url value="/wikitty/Invoice/search?query=FinancialTransaction.payer%3D%22Code+Lutin%22"/>"><span class="glyphicon glyphicon-th-list"></span>Débits-Achats</a> + <a href="<c:url value="/wikitty/Invoice/edit/new"/>"><span class="glyphicon glyphicon-plus"></span></a> </li> <li> - <a href="<c:url value="/wikitty/Category/search"/>"><i class="icon-th-list icon-black"></i>Categories</a> - <a href="<c:url value="/wikitty/Category/edit/new"/>"><i class="icon-plus icon-black"></i></a> + <a href="<c:url value="/wikitty/Category/search"/>"><span class="glyphicon glyphicon-th-list"></span>Categories</a> + <a href="<c:url value="/wikitty/Category/edit/new"/>"><span class="glyphicon glyphicon-plus"></span></a> </li> <li class="divider"></li> <li>Report</li> @@ -194,25 +194,25 @@ <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <b class="caret"></b> + <span class="caret"></span> </a> - <ul class="dropdown-menu"> + <ul class="dropdown-menu" role="menu"> <li>Reference Year</li> - <li><a href="<c:url value="/wikitty/ReferenceYear/search"/>"><i class="icon-th-list icon-black"></i> All years</a></li> - <li><a href="<c:url value="/wikitty/ReferenceYear/edit/new"/>"><i class="icon-plus icon-black"></i> Add year</a></li> + <li><a href="<c:url value="/wikitty/ReferenceYear/search"/>"><span class="glyphicon glyphicon-th-list"></span> All years</a></li> + <li><a href="<c:url value="/wikitty/ReferenceYear/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add year</a></li> <li>Employee HR</li> - <li><a href="<c:url value="/wikitty/EmployeeHR/search"/>"><i class="icon-th-list icon-black"></i> All employees HR</a></li> - <li><a href="<c:url value="/wikitty/EmployeeHR/edit/new"/>"><i class="icon-plus icon-black"></i> Add employee HR</a> + <li><a href="<c:url value="/wikitty/EmployeeHR/search"/>"><span class="glyphicon glyphicon-th-list"></span> All employees HR</a></li> + <li><a href="<c:url value="/wikitty/EmployeeHR/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add employee HR</a> <li><a href="<c:url value="/hr/employeeEdit"/>">Employee edit</a></li> <li><a href="<c:url value="/hr/dashboardAdc"/>">Adc Dashboard</a></li> <li>Vacation</li> - <li><a href="<c:url value="/wikitty/Vacation/search"/>"><i class="icon-th-list icon-black"></i> All vacations</a></li> - <li><a href="<c:url value="/wikitty/Vacation/edit/new"/>"><i class="icon-plus icon-black"></i> Add vacation</a></li> + <li><a href="<c:url value="/wikitty/Vacation/search"/>"><span class="glyphicon glyphicon-th-list"></span> All vacations</a></li> + <li><a href="<c:url value="/wikitty/Vacation/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add vacation</a></li> <li>Vacation Request</li> - <li><a href="<c:url value="/wikitty/VacationRequest/search"/>"><i class="icon-th-list icon-black"></i> All requests</a></li> - <li><a href="<c:url value="/wikitty/VacationRequest/edit/new"/>"><i class="icon-plus icon-black"></i> Add request</a></li> - <li><a href="<c:url value="/report?report=requestVacation"/>"><i class="icon-th-list icon-black"></i> Dashboard vacations</a></li> - <li><a href="<c:url value="/hr/vacationRequest/edit/new"/>"><i class="icon-plus icon-black"></i> Add Leave Request</a></li> + <li><a href="<c:url value="/wikitty/VacationRequest/search"/>"><span class="glyphicon glyphicon-th-list"></span> All requests</a></li> + <li><a href="<c:url value="/wikitty/VacationRequest/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add request</a></li> + <li><a href="<c:url value="/report?report=requestVacation"/>"><span class="glyphicon glyphicon-th-list"></span> Dashboard vacations</a></li> + <li><a href="<c:url value="/hr/vacationRequest/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add Leave Request</a></li> </ul> </li> <li class="dropdown nav-group"> @@ -220,12 +220,12 @@ <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <b class="caret"></b> + <span class="caret"></span> </a> - <ul class="dropdown-menu"> + <ul class="dropdown-menu" role="menu"> <li>User</li> - <li><a href="<c:url value="/wikitty/WikittyUser/search"/>"><i class="icon-th-list icon-black"></i> All users</a></li> - <li><a href="<c:url value="/wikitty/WikittyUser/edit/new"/>"><i class="icon-plus icon-black"></i> Add user</a></li> + <li><a href="<c:url value="/wikitty/WikittyUser/search"/>"><span class="glyphicon glyphicon-th-list"></span> All users</a></li> + <li><a href="<c:url value="/wikitty/WikittyUser/edit/new"/>"><span class="glyphicon glyphicon-plus"></span> Add user</a></li> <li class="divider"></li> <li><a href="<c:url value="/admin/variables"/>">Variables</a></li> <li class="divider"></li> @@ -233,12 +233,12 @@ <li class="divider"></li> <li><a href="<c:url value="/admin/reindex"/>">Reindex</a></li> <li class="divider"></li> - + </ul> </li> </ul> - - <form class="navbar-search pull-left" action="<c:url value="/wikitty/search"/>"> + + <form class="navbar-form navbar-right" action="<c:url value="/wikitty/search"/>"> <input type="text" class="search-query" placeholder="Search" name="query" value="${fn:escapeXml(param.query)}"/> </form> </div> Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/salesReports/menu.jsp =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/salesReports/menu.jsp 2014-07-07 11:56:49 UTC (rev 418) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/jsp/salesReports/menu.jsp 2014-07-10 09:34:48 UTC (rev 419) @@ -20,10 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --%> -<ul class="nav nav-list"> - <li><a href="sales"><i class="icon-chevron-right"></i> Ventes</a></li> - <li><a href="#"><i class="icon-chevron-right"></i> Ventes par client</a></li> - <li><a href="salesPerProject"><i class="icon-chevron-right"></i> Ventes par projet</a></li> - <li><a href="sentQuotation"><i class="icon-chevron-right"></i> Devis envoy�s</a></li> - <li><a href="acceptedQuotation"><i class="icon-chevron-right"></i> Devis accept�s</a></li> +<ul class="list-group"> + <li class="list-group-item"><a href="sales"><i class="icon-chevron-right"></i> Ventes</a></li> + <li class="list-group-item"><a href="#"><i class="icon-chevron-right"></i> Ventes par client</a></li> + <li class="list-group-item"><a href="salesPerProject"><i class="icon-chevron-right"></i> Ventes par projet</a></li> + <li class="list-group-item"><a href="sentQuotation"><i class="icon-chevron-right"></i> Devis envoy�s</a></li> + <li class="list-group-item"><a href="acceptedQuotation"><i class="icon-chevron-right"></i> Devis accept�s</a></li> </ul> \ No newline at end of file Modified: trunk/chorem-webmotion/src/main/webapp/WEB-INF/wro.xml =================================================================== --- trunk/chorem-webmotion/src/main/webapp/WEB-INF/wro.xml 2014-07-07 11:56:49 UTC (rev 418) +++ trunk/chorem-webmotion/src/main/webapp/WEB-INF/wro.xml 2014-07-10 09:34:48 UTC (rev 419) @@ -24,7 +24,8 @@ <group name='chorem-lib'> <group-ref>jquery</group-ref> - <group-ref>bootstrap-responsive</group-ref> + <group-ref>bootstrap</group-ref> + <group-ref>bootstrap-theme</group-ref> <group-ref>jquery-ui</group-ref> <group-ref>jquery-ui-cupertino</group-ref> <group-ref>jquery-ui-fr</group-ref> Modified: trunk/chorem-webmotion/src/main/webapp/js/jquery.fn.gantt.js =================================================================== --- trunk/chorem-webmotion/src/main/webapp/js/jquery.fn.gantt.js 2014-07-07 11:56:49 UTC (rev 418) +++ trunk/chorem-webmotion/src/main/webapp/js/jquery.fn.gantt.js 2014-07-10 09:34:48 UTC (rev 419) @@ -213,13 +213,14 @@ // Normalizes for IE elementFromPoint: function (x, y) { - if ($.browser.msie) { - x -= $(document).scrollLeft(); - y -= $(document).scrollTop(); - } else { - x -= window.pageXOffset; - y -= window.pageYOffset; - } + //XXX ymartel - 2014/07/07 : $.browser has been removed from jquery, do we still need it ? +// if ($.browser.msie) { +// x -= $(document).scrollLeft(); +// y -= $(document).scrollTop(); +// } else { + x -= window.pageXOffset; + y -= window.pageYOffset; +// } return document.elementFromPoint(x, y); }, Copied: trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3-1.js (from rev 416, trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3.js) =================================================================== --- trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3-1.js (rev 0) +++ trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3-1.js 2014-07-10 09:34:48 UTC (rev 419) @@ -0,0 +1,381 @@ +/* + * %%Ignore-License + * + Masked Input plugin for jQuery + Copyright (c) 2007-2013 Josh Bush (digitalbush.com) + Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) + Version: 1.3.1 + +<script src="jquery.js" type="text/javascript"></script> +<script src="jquery.maskedinput.js" type="text/javascript"></script> + +jQuery(function($){ + $("#date").mask("99/99/9999"); + $("#phone").mask("(999) 999-9999"); + $("#tin").mask("99-9999999"); + $("#ssn").mask("999-99-9999"); +}); + +Optionally, if you are not satisfied with the underscore ('_') character as a +placeholder, you may pass an optional argument to the maskedinput method. + +jQuery(function($){ + $("#product").mask("99/99/9999",{placeholder:" "}); +}); + +Optionally, if you would like to execute a function once the mask has been +completed, you can specify that function as an optional argument to the +maskedinput method. + +jQuery(function($){ + $("#product").mask("99/99/9999", + {completed:function(){alert("You typed thefollowing: "+this.val());}}); +}); + +You can now supply your own mask definitions. + +jQuery(function($){ + $.mask.definitions['~']='[+-]'; + $("#eyescript").mask("~9.99 ~9.99 999"); +}); + +You can have part of your mask be optional. Anything listed after '?' within the +mask is considered optional user input. The common example for this is phone +number + optional extension. + +jQuery(function($){ + $("#phone").mask("(999) 999-9999? x99999"); +}); +*/ +(function($) { + function getPasteEvent() { + var el = document.createElement('input'), + name = 'onpaste'; + el.setAttribute(name, ''); + return (typeof el[name] === 'function')?'paste':'input'; +} + +var pasteEventName = getPasteEvent() + ".mask", + ua = navigator.userAgent, + iPhone = /iphone/i.test(ua), + android=/android/i.test(ua), + caretTimeoutId; + +$.mask = { + //Predefined character definitions + definitions: { + '9': "[0-9]", + 'a': "[A-Za-z]", + '*': "[A-Za-z0-9]" + }, + dataName: "rawMaskFn", + placeholder: '_', +}; + +$.fn.extend({ + //Helper Function for Caret positioning + caret: function(begin, end) { + var range; + + if (this.length === 0 || this.is(":hidden")) { + return; + } + + if (typeof begin == 'number') { + end = (typeof end === 'number') ? end : begin; + return this.each(function() { + if (this.setSelectionRange) { + this.setSelectionRange(begin, end); + } else if (this.createTextRange) { + range = this.createTextRange(); + range.collapse(true); + range.moveEnd('character', end); + range.moveStart('character', begin); + range.select(); + } + }); + } else { + if (this[0].setSelectionRange) { + begin = this[0].selectionStart; + end = this[0].selectionEnd; + } else if (document.selection && document.selection.createRange) { + range = document.selection.createRange(); + begin = 0 - range.duplicate().moveStart('character', -100000); + end = begin + range.text.length; + } + return { begin: begin, end: end }; + } + }, + unmask: function() { + return this.trigger("unmask"); + }, + mask: function(mask, settings) { + var input, + defs, + tests, + partialPosition, + firstNonMaskPos, + len; + + if (!mask && this.length > 0) { + input = $(this[0]); + return input.data($.mask.dataName)(); + } + settings = $.extend({ + placeholder: $.mask.placeholder, // Load default placeholder + completed: null + }, settings); + + + defs = $.mask.definitions; + tests = []; + partialPosition = len = mask.length; + firstNonMaskPos = null; + + $.each(mask.split(""), function(i, c) { + if (c == '?') { + len--; + partialPosition = i; + } else if (defs[c]) { + tests.push(new RegExp(defs[c])); + if (firstNonMaskPos === null) { + firstNonMaskPos = tests.length - 1; + } + } else { + tests.push(null); + } + }); + + return this.trigger("unmask").each(function() { + var input = $(this), + buffer = $.map( + mask.split(""), + function(c, i) { + if (c != '?') { + return defs[c] ? settings.placeholder : c; + } + }), + focusText = input.val(); + + function seekNext(pos) { + while (++pos < len && !tests[pos]); + return pos; + } + + function seekPrev(pos) { + while (--pos >= 0 && !tests[pos]); + return pos; + } + + function shiftL(begin,end) { + var i, + j; + + if (begin<0) { + return; + } + + for (i = begin, j = seekNext(end); i < len; i++) { + if (tests[i]) { + if (j < len && tests[i].test(buffer[j])) { + buffer[i] = buffer[j]; + buffer[j] = settings.placeholder; + } else { + break; + } + + j = seekNext(j); + } + } + writeBuffer(); + input.caret(Math.max(firstNonMaskPos, begin)); + } + + function shiftR(pos) { + var i, + c, + j, + t; + + for (i = pos, c = settings.placeholder; i < len; i++) { + if (tests[i]) { + j = seekNext(i); + t = buffer[i]; + buffer[i] = c; + if (j < len && tests[j].test(t)) { + c = t; + } else { + break; + } + } + } + } + + function keydownEvent(e) { + var k = e.which, + pos, + begin, + end; + + //backspace, delete, and escape get special treatment + if (k === 8 || k === 46 || (iPhone && k === 127)) { + pos = input.caret(); + begin = pos.begin; + end = pos.end; + + if (end - begin === 0) { + begin=k!==46?seekPrev(begin):(end=seekNext(begin-1)); + end=k===46?seekNext(end):end; + } + clearBuffer(begin, end); + shiftL(begin, end - 1); + + e.preventDefault(); + } else if (k == 27) {//escape + input.val(focusText); + input.caret(0, checkVal()); + e.preventDefault(); + } + } + + function keypressEvent(e) { + var k = e.which, + pos = input.caret(), + p, + c, + next; + + if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore + return; + } else if (k) { + if (pos.end - pos.begin !== 0){ + clearBuffer(pos.begin, pos.end); + shiftL(pos.begin, pos.end-1); + } + + p = seekNext(pos.begin - 1); + if (p < len) { + c = String.fromCharCode(k); + if (tests[p].test(c)) { + shiftR(p); + + buffer[p] = c; + writeBuffer(); + next = seekNext(p); + + if(android){ + setTimeout($.proxy($.fn.caret,input,next),0); + }else{ + input.caret(next); + } + + if (settings.completed && next >= len) { + settings.completed.call(input); + } + } + } + e.preventDefault(); + } + } + + function clearBuffer(start, end) { + var i; + for (i = start; i < end && i < len; i++) { + if (tests[i]) { + buffer[i] = settings.placeholder; + } + } + } + + function writeBuffer() { input.val(buffer.join('')); } + + function checkVal(allow) { + //try to place characters where they belong + var test = input.val(), + lastMatch = -1, + i, + c; + + for (i = 0, pos = 0; i < len; i++) { + if (tests[i]) { + buffer[i] = settings.placeholder; + while (pos++ < test.length) { + c = test.charAt(pos - 1); + if (tests[i].test(c)) { + buffer[i] = c; + lastMatch = i; + break; + } + } + if (pos > test.length) { + break; + } + } else if (buffer[i] === test.charAt(pos) && i !== partialPosition) { + pos++; + lastMatch = i; + } + } + if (allow) { + writeBuffer(); + } else if (lastMatch + 1 < partialPosition) { + input.val(""); + clearBuffer(0, len); + } else { + writeBuffer(); + input.val(input.val().substring(0, lastMatch + 1)); + } + return (partialPosition ? i : firstNonMaskPos); + } + + input.data($.mask.dataName,function(){ + return $.map(buffer, function(c, i) { + return tests[i]&&c!=settings.placeholder ? c : null; + }).join(''); + }); + + if (!input.attr("readonly")) + input + .one("unmask", function() { + input + .unbind(".mask") + .removeData($.mask.dataName); + }) + .bind("focus.mask", function() { + clearTimeout(caretTimeoutId); + var pos, + moveCaret; + + focusText = input.val(); + pos = checkVal(); + + caretTimeoutId = setTimeout(function(){ + writeBuffer(); + if (pos == mask.length) { + input.caret(0, pos); + } else { + input.caret(pos); + } + }, 10); + }) + .bind("blur.mask", function() { + checkVal(); + if (input.val() != focusText) + input.change(); + }) + .bind("keydown.mask", keydownEvent) + .bind("keypress.mask", keypressEvent) + .bind(pasteEventName, function() { + setTimeout(function() { + var pos=checkVal(true); + input.caret(pos); + if (settings.completed && pos == input.val().length) + settings.completed.call(input); + }, 0); + }); + checkVal(); //Perform initial check for existing values + }); + } +}); + + +})(jQuery); Deleted: trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3.js =================================================================== --- trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3.js 2014-07-07 11:56:49 UTC (rev 418) +++ trunk/chorem-webmotion/src/main/webapp/js/jquery.maskedinput-1.3.js 2014-07-10 09:34:48 UTC (rev 419) @@ -1,301 +0,0 @@ -/* - * %%Ignore-License - * - Masked Input plugin for jQuery - Copyright (c) 2007-2011 Josh Bush (digitalbush.com) - Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) - Version: 1.3 - -<script src="jquery.js" type="text/javascript"></script> -<script src="jquery.maskedinput.js" type="text/javascript"></script> - -jQuery(function($){ - $("#date").mask("99/99/9999"); - $("#phone").mask("(999) 999-9999"); - $("#tin").mask("99-9999999"); - $("#ssn").mask("999-99-9999"); -}); - -Optionally, if you are not satisfied with the underscore ('_') character as a -placeholder, you may pass an optional argument to the maskedinput method. - -jQuery(function($){ - $("#product").mask("99/99/9999",{placeholder:" "}); -}); - -Optionally, if you would like to execute a function once the mask has been -completed, you can specify that function as an optional argument to the -maskedinput method. - -jQuery(function($){ - $("#product").mask("99/99/9999", - {completed:function(){alert("You typed thefollowing: "+this.val());}}); -}); - -You can now supply your own mask definitions. - -jQuery(function($){ - $.mask.definitions['~']='[+-]'; - $("#eyescript").mask("~9.99 ~9.99 999"); -}); - -You can have part of your mask be optional. Anything listed after '?' within the -mask is considered optional user input. The common example for this is phone -number + optional extension. - -jQuery(function($){ - $("#phone").mask("(999) 999-9999? x99999"); -}); -*/ -(function($) { - var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; - var iPhone = (window.orientation != undefined); - - $.mask = { - //Predefined character definitions - definitions: { - '9': "[0-9]", - 'a': "[A-Za-z]", - '*': "[A-Za-z0-9]" - }, - dataName:"rawMaskFn" - }; - - $.fn.extend({ - //Helper Function for Caret positioning - caret: function(begin, end) { - if (this.length == 0) return; - if (typeof begin == 'number') { - end = (typeof end == 'number') ? end : begin; - return this.each(function() { - if (this.setSelectionRange) { - this.setSelectionRange(begin, end); - } else if (this.createTextRange) { - var range = this.createTextRange(); - range.collapse(true); - range.moveEnd('character', end); - range.moveStart('character', begin); - range.select(); - } - }); - } else { - if (this[0].setSelectionRange) { - begin = this[0].selectionStart; - end = this[0].selectionEnd; - } else if (document.selection && document.selection.createRange) { - var range = document.selection.createRange(); - begin = 0 - range.duplicate().moveStart('character', -100000); - end = begin + range.text.length; - } - return { begin: begin, end: end }; - } - }, - unmask: function() { return this.trigger("unmask"); }, - mask: function(mask, settings) { - if (!mask && this.length > 0) { - var input = $(this[0]); - return input.data($.mask.dataName)(); - } - settings = $.extend({ - placeholder: "_", - completed: null - }, settings); - - var defs = $.mask.definitions; - var tests = []; - var partialPosition = mask.length; - var firstNonMaskPos = null; - var len = mask.length; - - $.each(mask.split(""), function(i, c) { - if (c == '?') { - len--; - partialPosition = i; - } else if (defs[c]) { - tests.push(new RegExp(defs[c])); - if(firstNonMaskPos==null) - firstNonMaskPos = tests.length - 1; - } else { - tests.push(null); - } - }); - - return this.trigger("unmask").each(function() { - var input = $(this); - var buffer = $.map(mask.split(""), function(c, i) { if (c != '?') return defs[c] ? settings.placeholder : c }); - var focusText = input.val(); - - function seekNext(pos) { - while (++pos <= len && !tests[pos]); - return pos; - }; - function seekPrev(pos) { - while (--pos >= 0 && !tests[pos]); - return pos; - }; - - function shiftL(begin,end) { - if(begin<0) - return; - for (var i = begin,j = seekNext(end); i < len; i++) { - if (tests[i]) { - if (j < len && tests[i].test(buffer[j])) { - buffer[i] = buffer[j]; - buffer[j] = settings.placeholder; - } else - break; - j = seekNext(j); - } - } - writeBuffer(); - input.caret(Math.max(firstNonMaskPos, begin)); - }; - - function shiftR(pos) { - for (var i = pos, c = settings.placeholder; i < len; i++) { - if (tests[i]) { - var j = seekNext(i); - var t = buffer[i]; - buffer[i] = c; - if (j < len && tests[j].test(t)) - c = t; - else - break; - } - } - }; - - function keydownEvent(e) { - var k=e.which; - - //backspace, delete, and escape get special treatment - if(k == 8 || k == 46 || (iPhone && k == 127)){ - var pos = input.caret(), - begin = pos.begin, - end = pos.end; - - if(end-begin==0){ - begin=k!=46?seekPrev(begin):(end=seekNext(begin-1)); - end=k==46?seekNext(end):end; - } - clearBuffer(begin, end); - shiftL(begin,end-1); - - return false; - } else if (k == 27) {//escape - input.val(focusText); - input.caret(0, checkVal()); - return false; - } - }; - - function keypressEvent(e) { - var k = e.which, - pos = input.caret(); - if (e.ctrlKey || e.altKey || e.metaKey || k<32) {//Ignore - return true; - } else if (k) { - if(pos.end-pos.begin!=0){ - clearBuffer(pos.begin, pos.end); - shiftL(pos.begin, pos.end-1); - } - - var p = seekNext(pos.begin - 1); - if (p < len) { - var c = String.fromCharCode(k); - if (tests[p].test(c)) { - shiftR(p); - buffer[p] = c; - writeBuffer(); - var next = seekNext(p); - input.caret(next); - if (settings.completed && next >= len) - settings.completed.call(input); - } - } - return false; - } - }; - - function clearBuffer(start, end) { - for (var i = start; i < end && i < len; i++) { - if (tests[i]) - buffer[i] = settings.placeholder; - } - }; - - function writeBuffer() { return input.val(buffer.join('')).val(); }; - - function checkVal(allow) { - //try to place characters where they belong - var test = input.val(); - var lastMatch = -1; - for (var i = 0, pos = 0; i < len; i++) { - if (tests[i]) { - buffer[i] = settings.placeholder; - while (pos++ < test.length) { - var c = test.charAt(pos - 1); - if (tests[i].test(c)) { - buffer[i] = c; - lastMatch = i; - break; - } - } - if (pos > test.length) - break; - } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { - pos++; - lastMatch = i; - } - } - if (!allow && lastMatch + 1 < partialPosition) { - input.val(""); - clearBuffer(0, len); - } else if (allow || lastMatch + 1 >= partialPosition) { - writeBuffer(); - if (!allow) input.val(input.val().substring(0, lastMatch + 1)); - } - return (partialPosition ? i : firstNonMaskPos); - }; - - input.data($.mask.dataName,function(){ - return $.map(buffer, function(c, i) { - return tests[i]&&c!=settings.placeholder ? c : null; - }).join(''); - }) - - if (!input.attr("readonly")) - input - .one("unmask", function() { - input - .unbind(".mask") - .removeData($.mask.dataName); - }) - .bind("focus.mask", function() { - focusText = input.val(); - var pos = checkVal(); - writeBuffer(); - var moveCaret=function(){ - if (pos == mask.length) - input.caret(0, pos); - else - input.caret(pos); - }; - ($.browser.msie ? moveCaret:function(){setTimeout(moveCaret,0)})(); - }) - .bind("blur.mask", function() { - checkVal(); - if (input.val() != focusText) - input.change(); - }) - .bind("keydown.mask", keydownEvent) - .bind("keypress.mask", keypressEvent) - .bind(pasteEventName, function() { - setTimeout(function() { input.caret(checkVal(true)); }, 0); - }); - - checkVal(); //Perform initial check for existing values - }); - } - }); -})(jQuery); Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-07-07 11:56:49 UTC (rev 418) +++ trunk/pom.xml 2014-07-10 09:34:48 UTC (rev 419) @@ -5,7 +5,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>mavenpom4redmine</artifactId> - <version>4.6</version> + <version>5.0.5</version> </parent> <groupId>org.chorem</groupId> @@ -75,7 +75,7 @@ </scm> <distributionManagement> <site> - <id>${platform}</id> + <id>doc.${platform}</id> <url>${our.site.repository}/${projectId}</url> </site> </distributionManagement> @@ -106,10 +106,10 @@ <nuitonjsWro.version>1.0.2</nuitonjsWro.version> <nuitonjsAngularjs.version>1.2.12-1</nuitonjsAngularjs.version> - <nuitonjsJquery.version>1.8.3-1</nuitonjsJquery.version> + <nuitonjsJquery.version>2.1.1-1</nuitonjsJquery.version> <nuitonjsJqueryui.version>1.10.4-1</nuitonjsJqueryui.version> - <nuitonjsJqplot.version>1.0.4r1121-1</nuitonjsJqplot.version> - <nuitonjsBootstrap.version>3.2.0-1</nuitonjsBootstrap.version> + <nuitonjsJqplot.version>1.0.8r1250-1-SNAPSHOT</nuitonjsJqplot.version> + <nuitonjsBootstrap.version>3.2.0-2-SNAPSHOT</nuitonjsBootstrap.version> <!-- license to use --> <license.licenseName>agpl_v3</license.licenseName>
participants (1)
-
ymartel@users.chorem.org