code
stringlengths 1
2.01M
| repo_name
stringlengths 3
62
| path
stringlengths 1
267
| language
stringclasses 231
values | license
stringclasses 13
values | size
int64 1
2.01M
|
|---|---|---|---|---|---|
<!DOCTYPE html>
<%@taglib prefix="in" uri="/WEB-INF/tld/decorator.tld"%>
<html>
<head>
<title>SiteMan</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<in:headerInc incKendo="yes" />
<script type="text/javascript" src="resources/app/js/home.js"></script>
</head>
<body>
<in:header></in:header>
<in:leftPanel></in:leftPanel>
<div class="main-area">
<div class="main-content">
<div class="row top-row">
<div class="col-md-2">
<div class="btn-group">
<button type="button" class="btn btn-default"
title="Toggle Sidebar">
<i class="fa fa-bars fa-lg"></i>
</button>
<button type="button" class="btn btn-default"
title="Advanced Search">
<i class="fa fa-search-plus fa-lg"></i>
</button>
</div>
</div>
<div class="col-md-10">
<div class="pull-right padd-sm select">
<table>
<tr>
<td><h5>Project:</h5></td>
<td> </td>
<td><select class="form-control" id="currentProject"
url="getList.htm?id=2" style="min-width: 200px">
</select></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div id="main" class="clearfix col-md-12">
<div class="row">
<div class="col-md-4">
<div id="fav-btn">
<div class="row">
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
</div>
<div class="row">
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
</div>
<div class="row">
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
<div class="col-md-4 fav-btn-normal">
<a href="#" title="Create New"> <i
class="fa fa-file-text-o"></i><span>Create New</span>
</a><span class="triangle-button red"><i class="fa fa-plus"></i></span>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="box">
<div class="box-header">
<div class="title" for="dashBoardChart">Charts</div>
<ul class="box-toolbar">
<li class="toolbar-link"><a href="#" id='btnPrevChart'><i
class="fa fa-arrow-circle-left"></i></a></li>
<li class="toolbar-link"><a href="#" id='btnStopTimer'><i
class="fa fa-pause"></i></a></li>
<li class="toolbar-link"><a href="#" id='btnNextChart'><i
class="fa fa-arrow-circle-right"></i></a></li>
<li class="toolbar-link"><a href="#"
data-toggle="dropdown"><i class="fa fa-cog"></i></a>
<ul class="dropdown-menu">
<li><a href="#"><i class="fa fa-plus"></i> Add</a></li>
<li><a href="#"><i class="fa fa-delete"></i> Remove</a></li>
<li><a href="#"><i class="fa fa-pencil"></i> Edit</a></li>
</ul></li>
</ul>
</div>
<div class="box-content padd-15">
<div class="row">
<div class="col-md-4 separate-sections"
style="margin-top: 5px;">
<div class="row">
<div class="col-md-12">
<div class="dashboard-stats">
<ul class="list-inline">
<li class="avatar green"><i
class="fa fa-arrow-circle-o-up fa-2x"></i></li>
<li class="count">973,119</li>
</ul>
<div class="progress">
<div class="progress-bar progress-blue tip" title="80%"
data-percent="80"></div>
</div>
<div class="stats-label">Total Visits</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 30px;">
<div class="col-md-6">
<div class="dashboard-stats small">
<ul class="list-inline">
<li class="avatar yellow"><i
class="fa fa-arrows-h fa-2x"></i></li>
<li class="count">8800</li>
</ul>
<div class="progress">
<div class="progress-bar progress-blue tip" title="65%"
data-percent="65"></div>
</div>
<div class="stats-label">New Visitors</div>
</div>
</div>
<div class="col-md-6">
<div class="dashboard-stats small">
<ul class="list-inline">
<li class="avatar red"><i
class="fa fa-arrow-circle-o-down fa-2x"></i></li>
<li class="count">25668</li>
</ul>
<div class="progress">
<div class="progress-bar progress-blue tip" title="80%"
data-percent="80"></div>
</div>
<div class="stats-label">Page Views</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="sine-chart" id="dashBoardChart"
style="max-height: 200px"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="box small-Schdluer">
<div class="box-header">
<div class="title">Full calendar</div>
</div>
<div class="box-content">
<div id="scheduler"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box">
<div class="box-header">
<span class="title">Bulliten Board</span>
<ul class="box-toolbar">
<li><span class="label label-blue"></span></li>
</ul>
</div>
<div class="box-content scrollable"
style="height: 500px; overflow-y: auto">
<!-- find me in partials/news_with_icons -->
<div class="box-section news with-icons">
<div class="avatar blue">
<i class="fa fa-rss fa-2x"></i>
</div>
<div class="news-time">
<span>06</span> jan
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major
update to the project ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar green">
<i class="fa fa-comment-o fa-2x"></i>
</div>
<div class="news-time">
<span>11</span> feb
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Ruby on Rails 4.0</a>
</div>
<div class="news-text">Rails 4.0 is still unfinished,
but it is shaping up to become a great release ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar purple">
<i class="fa fa-calendar-o fa-2x"></i>
</div>
<div class="news-time">
<span>04</span> mar
</div>
<div class="news-content">
<div class="news-title">
<a href="#">All about SCSS</a>
</div>
<div class="news-text">Sass makes CSS fun again. Sass
is an extension of CSS3, adding nested rules ...</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|
101j
|
SiteMan/WebContent/WEB-INF/views/home.jsp
|
Java Server Pages
|
gpl3
| 9,443
|
<!DOCTYPE html>
<%@taglib prefix="in" uri="/WEB-INF/tld/decorator.tld"%>
<html>
<head>
<title>SiteMan</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<in:headerInc incKendo="yes" />
</head>
<body>
<in:header></in:header>
<in:leftPanel></in:leftPanel>
<div class="main-area">
<div class="main-content">
<div class="row top-row">
<div class="col-md-2">
<div class="btn-group">
<button type="button" class="btn btn-default"
title="Toggle Sidebar">
<i class="fa fa-bars fa-lg"></i>
</button>
<button type="button" class="btn btn-default"
title="Advanced Search">
<i class="fa fa-search-plus fa-lg"></i>
</button>
</div>
</div>
<div class="col-md-10">
<div class="pull-right padd-sm select">
<table>
<tr>
<td><h5>Project:</h5></td>
<td> </td>
<td><select class="form-control" id="currentProject"
url="getList.htm?id=2" style="min-width: 200px">
</select></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div id="main" class="clearfix col-md-12">
<div class="row">
<div id="orders" class="ra-section"></div>
</div>
<script id="template" type="text/x-kendo-template">
<div class="btn-group">
<button type="button" class="btn btn-default">
<span class="fa fa-plus-square-o fa-lg"></span>
</button>
<button type="button" class="btn btn-default">
<span class="fa fa-pencil-square-o fa-lg"></span>
</button>
<button type="button" class="btn btn-default">
<span class="fa fa-trash-o fa-lg"></span>
</button>
<button type="button" class="btn btn-default">
<span class="fa fa-columns fa-lg"></span>
</button>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle"
data-toggle="dropdown">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="\#">Dropdown link</a></li>
<li><a href="\#">Dropdown link</a></li>
</ul>
</div>
</div>
</script>
<script type="text/javascript">
function toolbar_click() {
alert("Toolbar command is clicked!");
return false;
}
$("#orders")
.kendoGrid(
{
toolbar : [ {
template : kendo.template($(
"#template").html())
} ],
dataSource : {
type : "odata",
transport : {
read : "http://demos.kendoui.com/service/Northwind.svc/Orders"
},
serverPaging : true,
serverSorting : true,
serverFiltering : true,
pageSize : 10
},
scrollable : false,
sortable : true,
groupable : true,
filterable : true,
pageable : {
buttonCount : 4
},
columns : [ {
field : "OrderID",
width : "70px"
}, {
field : "ShipCountry",
title : "Ship Country",
width : "20%"
}, {
field : "ShipAddress",
title : "Ship Address"
} ]
});
</script>
</div>
</div>
</div>
</div>
</body>
</html>
|
101j
|
SiteMan/WebContent/WEB-INF/views/grid.jsp
|
Java Server Pages
|
gpl3
| 3,431
|
<!DOCTYPE html>
<%@taglib prefix="in" uri="/WEB-INF/tld/decorator.tld"%>
<html>
<head>
<title>Project List</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<in:headerInc incKendo="yes" />
<script type="text/javascript" src="resources/app/js/project.js"></script>
</head>
<body>
<in:header></in:header>
<in:leftPanel></in:leftPanel>
<div class="main-area">
<div class="main-content">
<div class="row top-row">
<div class="col-md-2">
<div class="btn-group">
<button type="button" class="btn btn-default"
title="Toggle Sidebar">
<i class="fa fa-bars fa-lg"></i>
</button>
<button type="button" class="btn btn-default"
title="Advanced Search">
<i class="fa fa-search-plus fa-lg"></i>
</button>
</div>
</div>
<div class="col-md-10">
<div class="pull-right padd-sm select">
<table>
<tr>
<td><h5>Project:</h5></td>
<td> </td>
<td><select class="form-control" id="currentProject"
url="getList.htm?id=2" style="min-width: 200px">
</select></td>
</tr>
</table>
</div>
</div>
</div>
<div class="row">
<div id="main" class="clearfix col-md-12">
<in:gridToolbar id="orders"></in:gridToolbar>
<script src="resources/app/js/grid.js"></script>
<%-- <%@ include file="../../resources/include/grid.inc"%> --%>
</div>
</div>
</div>
</div>
</body>
</html>
|
101j
|
SiteMan/WebContent/WEB-INF/views/project.jsp
|
Java Server Pages
|
gpl3
| 1,565
|
<html>
<head>
<link rel="stylesheet" href="includes/css/fullcalendar.css">
<link rel="stylesheet" href="includes/css/xcharts.min.css">
<link rel="stylesheet" href="includes/css/css.css">
<link rel="stylesheet" href="includes/css/application.css">
<!-- <link rel="stylesheet" href="includes/css/fullcalendar.print.css"> -->
<script src="includes/jquery/jquery.min.js" type="text/javascript"></script>
<script src="includes/jquery/fullcalendar.min.js" type="text/javascript"></script>
<script src="includes/jquery/d3.v3.min.js" type="text/javascript"></script>
<script src="includes/jquery/xcharts.min.js" type="text/javascript"></script>
<script src="includes/js/dashboard.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="area-top clearfix">
<div class="pull-left header">
<h3 class="title">
<i class="icon-dashboard"></i> Dashboard
</h3>
<h5>
<span> A subtitle can go here </span>
</h5>
</div>
<ul class="list-inline pull-right sparkline-box">
<li class="sparkline-row">
<h4 class="blue">
<span>Orders</span> 847
</h4>
<div class="sparkline big" data-color="blue">
<canvas height="30" width="82"
style="display: inline-block; width: 82px; height: 30px; vertical-align: top;"></canvas>
</div>
</li>
<li class="sparkline-row">
<h4 class="green">
<span>Reviews</span> 223
</h4>
<div class="sparkline big" data-color="green">
<canvas height="30" width="82"
style="display: inline-block; width: 82px; height: 30px; vertical-align: top;"></canvas>
</div>
</li>
<li class="sparkline-row">
<h4 class="red">
<span>New visits</span> 7930
</h4>
<div class="sparkline big">
<canvas height="30" width="82"
style="display: inline-block; width: 82px; height: 30px; vertical-align: top;"></canvas>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="container padded">
<div class="row">
<!-- Breadcrumb line -->
<div id="breadcrumbs">
<div class="breadcrumb-button blue">
<span class="breadcrumb-label"><i class="icon-home"></i>
Home</span> <span class="breadcrumb-arrow"><span></span></span>
</div>
<div class="breadcrumb-button">
<span class="breadcrumb-label"> <i class="icon-dashboard"></i>
Dashboard
</span> <span class="breadcrumb-arrow"><span></span></span>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3">
<!-- find me in partials/action_nav_normal -->
<!--big normal buttons-->
<div class="action-nav-normal">
<div class="row action-nav-row">
<div class="col-sm-6 action-nav-button">
<a href="#" title="New Project"> <i class="icon-file-alt"></i>
<span>New Project</span>
</a> <span class="triangle-button red"><i class="icon-plus"></i></span>
</div>
<div class="col-sm-6 action-nav-button">
<a href="#" title="Messages"> <i class="icon-comments-alt"></i>
<span>Messages</span>
</a> <span class="label label-black">14</span>
</div>
</div>
<div class="row action-nav-row">
<div class="col-sm-6 action-nav-button">
<a href="#" title="Files"> <i class="icon-folder-open-alt"></i>
<span>Files</span>
</a>
</div>
<div class="col-sm-6 action-nav-button">
<a href="#" title="Users"> <i class="icon-user"></i> <span>Users</span>
</a> <span class="triangle-button green"><span class="inner">+3</span></span>
</div>
</div>
<div class="row action-nav-row">
<div class="col-sm-6 action-nav-button">
<a href="#" title="Friends"> <i class="icon-facebook-sign"></i>
<span>Friends</span>
</a>
</div>
<div class="col-sm-6 action-nav-button">
<a href="#" title="Followers"> <i class="icon-twitter"></i> <span>Followers</span>
</a> <span class="triangle-button blue"><span class="inner">+8</span></span>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<!-- find me in partials/big_chart -->
<div class="box">
<div class="box-header">
<div class="title">Charts</div>
<ul class="box-toolbar">
<li class="toolbar-link"><a href="#" data-toggle="dropdown"><i
class="icon-cog"></i></a>
<ul class="dropdown-menu">
<li><a href="#"><i class="icon-plus-sign"></i> Add</a></li>
<li><a href="#"><i class="icon-remove-sign"></i>
Remove</a></li>
<li><a href="#"><i class="icon-pencil"></i> Edit</a></li>
</ul></li>
</ul>
</div>
<div class="box-content padded">
<div class="row">
<div class="col-md-4 separate-sections" style="margin-top: 5px;">
<div class="row">
<div class="col-md-12">
<div class="dashboard-stats">
<ul class="list-inline">
<li class="glyph"><i class="icon-bolt icon-2x"></i></li>
<li class="count">973,119</li>
</ul>
<div class="progress">
<div class="progress-bar progress-blue tip" title="80%"
data-percent="80"></div>
</div>
<div class="stats-label">Total Visits</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 30px;">
<div class="col-md-6">
<div class="dashboard-stats small">
<ul class="list-inline">
<li class="glyph"><i class="icon-user"></i></li>
<li class="count">8800</li>
</ul>
<div class="progress">
<div class="progress-bar progress-blue tip" title="65%"
data-percent="65"></div>
</div>
<div class="stats-label">New Visitors</div>
</div>
</div>
<div class="col-md-6">
<div class="dashboard-stats small">
<ul class="list-inline">
<li class="glyph"><i class="icon-eye-open"></i></li>
<li class="count">25668</li>
</ul>
<div class="progress">
<div class="progress-bar progress-blue tip" title="80%"
data-percent="80"></div>
</div>
<div class="stats-label">Page Views</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="sine-chart" id="xchart-sine"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="box">
<div class="box-header">
<div class="title">Full calendar</div>
</div>
<div class="box-content">
<div id="calendar"></div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box">
<div class="box-header">
<span class="title">News with avatars (scrollable box)</span>
<ul class="box-toolbar">
<li><span class="label label-blue">178</span></li>
</ul>
</div>
<div class="box-content scrollable"
style="height: 552px; overflow-y: auto">
<!-- find me in partials/news_with_icons -->
<div class="box-section news with-icons">
<div class="avatar blue">
<i class="icon-ok icon-2x"></i>
</div>
<div class="news-time">
<span>06</span> jan
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major update
to the project ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar green">
<i class="icon-lightbulb icon-2x"></i>
</div>
<div class="news-time">
<span>11</span> feb
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Ruby on Rails 4.0</a>
</div>
<div class="news-text">Rails 4.0 is still unfinished, but
it is shaping up to become a great release ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar purple">
<i class="icon-mobile-phone icon-2x"></i>
</div>
<div class="news-time">
<span>04</span> mar
</div>
<div class="news-content">
<div class="news-title">
<a href="#">All about SCSS</a>
</div>
<div class="news-text">Sass makes CSS fun again. Sass is
an extension of CSS3, adding nested rules ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar cyan">
<i class="icon-ok icon-2x"></i>
</div>
<div class="news-time">
<span>22</span> dec
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major update
to the project ...</div>
</div>
</div>
<!-- find me in partials/news_with_icons -->
<div class="box-section news with-icons">
<div class="avatar blue">
<i class="icon-ok icon-2x"></i>
</div>
<div class="news-time">
<span>06</span> jan
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major update
to the project ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar green">
<i class="icon-lightbulb icon-2x"></i>
</div>
<div class="news-time">
<span>11</span> feb
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Ruby on Rails 4.0</a>
</div>
<div class="news-text">Rails 4.0 is still unfinished, but
it is shaping up to become a great release ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar purple">
<i class="icon-mobile-phone icon-2x"></i>
</div>
<div class="news-time">
<span>04</span> mar
</div>
<div class="news-content">
<div class="news-title">
<a href="#">All about SCSS</a>
</div>
<div class="news-text">Sass makes CSS fun again. Sass is
an extension of CSS3, adding nested rules ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar cyan">
<i class="icon-ok icon-2x"></i>
</div>
<div class="news-time">
<span>22</span> dec
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major update
to the project ...</div>
</div>
</div>
<!-- find me in partials/news_with_icons -->
<div class="box-section news with-icons">
<div class="avatar blue">
<i class="icon-ok icon-2x"></i>
</div>
<div class="news-time">
<span>06</span> jan
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major update
to the project ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar green">
<i class="icon-lightbulb icon-2x"></i>
</div>
<div class="news-time">
<span>11</span> feb
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Ruby on Rails 4.0</a>
</div>
<div class="news-text">Rails 4.0 is still unfinished, but
it is shaping up to become a great release ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar purple">
<i class="icon-mobile-phone icon-2x"></i>
</div>
<div class="news-time">
<span>04</span> mar
</div>
<div class="news-content">
<div class="news-title">
<a href="#">All about SCSS</a>
</div>
<div class="news-text">Sass makes CSS fun again. Sass is
an extension of CSS3, adding nested rules ...</div>
</div>
</div>
<div class="box-section news with-icons">
<div class="avatar cyan">
<i class="icon-ok icon-2x"></i>
</div>
<div class="news-time">
<span>22</span> dec
</div>
<div class="news-content">
<div class="news-title">
<a href="#">Twitter Bootstrap v3.0 is coming!</a>
</div>
<div class="news-text">With 2.2.2 out the door, our
attention has shifted almost entirely to the next major update
to the project ...</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|
101j
|
SiteMan/WebContent/1.html
|
HTML
|
gpl3
| 14,164
|
var timerId = null;
$(document).ready(function() {
loadCalendar();
drawChart();
updateProgress();
// setUserImg();
loadBullitenBoard();
});
function loadCalendar() {
$('#calendar').fullCalendar({
header : {
left : 'prev,next today',
center : 'title',
right : 'month,basicWeek,basicDay'
},
editable : false,
events : function(start, end, callback) {
var events = getEventData();
callback(events);
}
});
}
function getEventData() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
var eventData = [ {
title : 'All Day Event',
start : new Date(y, m, 1)
}, {
title : 'Long Event',
start : new Date(y, m, d - 5),
end : new Date(y, m, d - 2)
}, {
id : 999,
title : 'Repeating Event',
start : new Date(y, m, d - 3, 16, 0),
allDay : false
}, {
id : 999,
title : 'Repeating Event',
start : new Date(y, m, d + 4, 16, 0),
allDay : false
}, {
title : 'Meeting',
start : new Date(y, m, d, 10, 30),
allDay : false
}, {
title : 'Lunch',
start : new Date(y, m, d, 12, 0),
end : new Date(y, m, d, 14, 0),
allDay : false
}, {
title : 'Birthday Party',
start : new Date(y, m, d + 1, 19, 0),
end : new Date(y, m, d + 1, 22, 30),
allDay : false
}, {
title : 'Click for Google',
start : new Date(y, m, 28),
end : new Date(y, m, 29),
url : 'http://google.com/'
} ];
return eventData;
}
function drawChart() {
var data = "";
var order = [ 0, 1, 2 ], i = 0, xFormat = d3.time.format('%A'), rotateTimer, chart, t = 5000;
$
.getJSON(
'resources/app/js/chartData.json',
function(result) {
data = result;
if ($("#xchart-sine").length > 0) {
if (data && data.length > 0) {
chart = new xChart('bar', data[order[i]],
'#xchart-sine', {
axisPaddingTop : 5,
paddingLeft : 30,
dataFormatX : function(x) {
return new Date(x);
},
tickFormatX : function(x) {
return d3.time.format('%a')(x);
}
});
rotateTimer = setTimeout(rotateChart, t);
} else {
$("#xchart-sine")
.html(
"<div Style='min-height: inherit;line-height:170px;text-align:center;'>Configure charts on dashboard using <i class='fa fa-cog'></i></div>");
}
}
});
function updateChart(i) {
chart.setData(data[i]);
}
function rotateChart() {
i += 1;
i = (i >= order.length) ? 0 : i;
updateChart(order[i]);
rotateTimer = setTimeout(rotateChart, t);
}
$("#btnStopTimer").click(function() {
if (rotateTimer) {
clearTimeout(rotateTimer);
rotateTimer = null;
$(this).find("i").removeClass("fa-pause");
$(this).find("i").addClass("fa-play");
} else {
rotateTimer = setTimeout(rotateChart, 1000);
$(this).find("i").removeClass("fa-play");
$(this).find("i").addClass("fa-pause");
}
});
$("#btnPrevChart").click(function() {
i -= 1;
i = (i <= -1) ? order.length-1 : i;
updateChart(order[i]);
});
$("#btnNextChart").click(function() {
i += 1;
i = (i >= order.length) ? 0 : i;
updateChart(order[i]);
});
}
function updateProgress() {
$("[data-percent]").each(function() {
return $(this).css({
width : "" + ($(this).attr("data-percent")) + "%"
});
});
}
function loadBullitenBoard() {
$.getJSON("loadBullitenBoard.htm?topOnly=true", function(data) {
var lines = "";
$.each(data, function(idx, ele) {
var date = ele.date.split("-");
lines += "<div class='box-section news with-icons'>";
lines += "<div class='" + ele.avatarClass + "'><i class='"
+ ele.iconClass + "'></i></div>";
lines += "<div class='news-time'><span>" + date[0] + "</span> "
+ date[1] + "</div>";
lines += "<div class='news-content'>";
lines += "<div class='news-title'>";
lines += "<a href='#'>" + ele.title + "</a>";
lines += "</div>";
lines += "<div class='news-text'>" + ele.text + "</div>";
lines += "</div></div>";
});
$("#bullitenContent").html(lines);
});
}
|
101j
|
SiteMan/WebContent/resources/app/js/dashboard.js
|
JavaScript
|
gpl3
| 4,045
|
$(document).ready(
function() {
initKendoGrid('orders', 'ordersTemplate',
'http://demos.telerik.com/kendo-ui/service/products');
$("#orders button[btnaction='addNew']").click(function() {
alert('Add new button fired');
});
$("#orders button[btnaction='edit']").click(function() {
alert('Edit button fired');
});
});
|
101j
|
SiteMan/WebContent/resources/app/js/project.js
|
JavaScript
|
gpl3
| 366
|
function toolbar_click() {
alert("Toolbar command is clicked!");
return false;
}
function initKendoGrid(containerId, toolbarId, dataUrl) {
var dataSource = new kendo.data.DataSource({
transport : {
read : {
url : dataUrl,
dataType : "jsonp"
}
},
serverPaging : false,
serverSorting : false,
serverFiltering : false,
pageSize : 10
});
$("#" + containerId).kendoGrid({
toolbar : [ {
template : kendo.template($("#" + toolbarId).html())
} ],
dataSource : dataSource,
scrollable : false,
sortable : true,
groupable : true,
filterable : true,
pageable : {
buttonCount : 4
},
columns : [ {
field : "ProductID",
width : "70px"
}, {
field : "ProductName",
title : "Product Name",
width : "20%"
}, {
field : "UnitPrice",
title : "Unit Price"
} ]
});
}
|
101j
|
SiteMan/WebContent/resources/app/js/grid.js
|
JavaScript
|
gpl3
| 872
|
$(document).ready(function() {
$(".search-query").keyup(function(e) {
if (e.which == 13)
initQuickSearch($(this).val());
});
$(".search-query").focus(function() {
$(this).select();
});
loadLists();
loadSideBarContents();
});
function initQuickSearch(value) {
alert(value);
}
function loadLists() {
$("select[url]").each(
function(idx, obj) {
$.getJSON($(obj).attr("url"), function(data) {
$.each(data, function(idx, ele) {
$(obj).append(
"<option value='" + ele.value + "'>" + ele.text
+ "</option>");
});
});
});
}
function loadSideBarContents() {
var a = function(url, selector) {
$
.getJSON(
url,
function(data) {
var lines = "";
$
.each(
data,
function(idx, ele) {
lines += "<li class='list-group-item'><a href='loadObject?type=" + ele.type;
if(ele.hasOwnProperty('id'))
lines+=+ "&id=" + ele.id ;
if(ele.hasOwnProperty('title'))
lines += "' title='" + ele.title + "'";
lines += "><i class='fa "
+ ele.iconClass
+ "'></i><span>"
+ ele.text
+ "</span></a></li>";
});
$(selector).html(lines);
});
};
a('loadBookmarks.htm?topOnly=true', "#bookmarks ul");
a('loadReports.htm?topOnly=true', "#reports ul");
a('loadProjectNavigator.htm?topOnly=true', "#navigator ul");
}
|
101j
|
SiteMan/WebContent/resources/app/js/base.js
|
JavaScript
|
gpl3
| 1,507
|
$(document).ready(function() {
$("#scheduler").kendoScheduler({
date : new Date("2013/6/6"),
showWorkHours : true,
height : 500,
views : [ {
type : "day",
title : "D"
}, {
type : "week",
title : "W"
}, {
type : "month",
title : "M"
} ],
dataSource : [ {
id : 1,
start : new Date("2013/6/6 08:00 AM"),
end : new Date("2013/6/6 09:00 AM"),
title : "Interview"
} ]
});
});
function drawRotationChart() {
var chData = "";
var chartId = "dashBoardChart";
var order = [ 0, 1, 2 ], i = 0, rotateTimer, t = 5000;
$
.getJSON(
'resources/app/js/chartData1.json',
function(result) {
chData = result.da;
if (chData && chData.length > 0) {
updateChart(0);
rotateTimer = setTimeout(rotateChart, t);
} else {
$("#" + chartId)
.html(
"<div Style='min-height: inherit;line-height:170px;text-align:center;'>Configure charts on dashboard using <i class='fa fa-cog'></i></div>");
}
}).error(function(xhr, ajaxOptions, thrownError) {
alert(thrownError);
});
function rotateChart() {
i += 1;
i = (i >= order.length) ? 0 : i;
updateChart(order[i]);
rotateTimer = setTimeout(rotateChart, t);
}
$("#btnStopTimer").click(function() {
if (rotateTimer) {
clearTimeout(rotateTimer);
rotateTimer = null;
$(this).find("i").removeClass("fa-pause");
$(this).find("i").addClass("fa-play");
} else {
rotateTimer = setTimeout(rotateChart, 1000);
$(this).find("i").removeClass("fa-play");
$(this).find("i").addClass("fa-pause");
}
});
$("#btnPrevChart").click(function() {
i -= 1;
i = (i <= -1) ? order.length - 1 : i;
updateChart(order[i]);
});
$("#btnNextChart").click(function() {
i += 1;
i = (i >= order.length) ? 0 : i;
updateChart(order[i]);
});
function updateChart(i) {
var chartConfig = chData[i].configuration;
chartConfig.dataSource = {
data : chData[i].chartData
};
$("#" + chartId).kendoChart(chartConfig);
$(".title[for='" + chartId + "']").html(chartConfig.title.text);
}
}
$(document).ready(function() {
drawRotationChart();
updateProgress();
});
function updateProgress() {
$("[data-percent]").each(function() {
return $(this).css({
width : "" + ($(this).attr("data-percent")) + "%"
});
});
}
|
101j
|
SiteMan/WebContent/resources/app/js/home.js
|
JavaScript
|
gpl3
| 2,411
|
body {
color: #707070;
font: 12px 'Open Sans', HelveticaNeue, Helvetica, Arial;
}
.navbar-brand {
padding: 5px;
padding-left: 10px;
}
header .row {
margin: 0px;
}
a {
color: #78808a;
}
.navbar-inverse {
background-image: -moz-linear-gradient(center top, #9E7BFF, #BCA2F1);
background-size: 100% auto;
border-bottom: 1px solid rgba(10, 13, 14, 0.8);
border-left: 0 none;
border-right: 0 none;
}
.navbar-inverse .navbar-text {
color: #000000;
line-height: 22px;
}
.navbar-inverse .nav>li.cdrop {
padding: 12px 0px;
}
.navbar-nav>li>a {
padding-bottom: 10px;
padding-top: 10px;
}
.navbar-inverse .nav>li.cdrop>a {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
border-radius: 4px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0
rgba(255, 255, 255, 0.15);
height: 24px;
line-height: 20px;
margin-right: 10px;
padding: 2px 10px;
}
.navbar-form {
margin-top: 12px;
}
.navbar-form .form-group {
position: relative;
}
.navbar-form .search-query {
background: none repeat scroll 0 0 #E5E4E2;
border: 1px solid #111111;
border-radius: 15px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset, 0 1px 0
rgba(255, 255, 255, 0.15);
height: 25px;
line-height: 25px;
padding: 2px 10px;
}
.navbar-form .search-query:focus,.navbar-form .search-query.focused {
padding: 2px 10px;
}
.navbar-form .search-query.animated {
transition: width 0.3s ease 0s;
width: 100px;
}
.navbar-form .search-query.animated:focus,.navbar-form .search-query.animated .focused
{
width: 200px;
}
.navbar-right {
margin-right: 15px;
}
.navbar-form i {
position: absolute;
right: 10px;
top: 5px;
}
.label-dark-red {
background: -moz-linear-gradient(center top, #B5473E, #8F3831) repeat
scroll 0 0/100% auto #8F3831;
box-shadow: 0 1px 0 #F7F7F7, 0 1px 1px #A64139 inset;
}
.label,.badge {
font-weight: 600;
}
.label {
font-size: 10px;
text-shadow: none;
}
.dropdown-menu .label {
position: absolute;
margin-top: 3px;
right: 10px;
}
.dropdown span i {
margin-left: 3px;
}
.navbar-nav .badge {
left: 7px;
position: absolute;
top: 5px;
font-size: 10px;
}
.badge-dark-red {
background: -moz-linear-gradient(center top, #B5473E, #A24037) repeat
scroll 0 0/100% auto #A24037;
box-shadow: 0 0 0 1px #692924;
}
.menu-avatar {
border-radius: 3px;
height: 32px;
margin-right: 10px;
width: 32px;
}
.avatar img {
border-radius: 50%;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}
.with-image {
text-align: center;
}
.navbar-inverse .navbar-nav>li>a {
color: #000000;
}
.sidebar-background {
z-index: -10;
background: none repeat scroll 0 0 #B7CEEC;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 200px;
}
.sidebar {
float: left;
position: absolute;
width: 200px;
}
.sidebar .panel-body {
background: none repeat scroll 0 0 #B7CEEC;
}
.list-group-item .fa {
padding-right: 3px;
}
.main-area {
margin-left: 201px;
position: relative;
height: 100%;
}
.top-row .select {
background: -moz-linear-gradient(center top, #A5CAE1, #7FB3D4) repeat
scroll 0 0/100% auto #7FB3D4;
border-radius: 8px;
padding: 4px;
}
.main-content {
-moz-box-sizing: border-box;
background: -moz-linear-gradient(center top, #FAFAFA, #ECECEC) repeat
scroll 0 0/100% auto #ECECEC;
border-bottom: 1px solid #CCCCCC;
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.07);
margin-bottom: 15px;
padding: 10px 15px;
position: relative;
width: 100%;
}
.no-padding {
padding: 0;
}
.no-padding .list-group {
margin-bottom: 0;
}
.news {
min-height: 85px;
}
.news .avatar {
float: left;
height: 36px;
width: 36px;
line-height: 36px;
text-align: center;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}
.news .avatar.blue {
background: #7fb3d4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E1Y2FlMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdmYjNkNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a5cae1),
color-stop(100%, #7fb3d4) );
background-image: -webkit-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: -moz-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: -o-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: linear-gradient(top, #a5cae1, #7fb3d4);
border: 1px solid #60a1ca;
}
.news .avatar.green {
background: #8cc079;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FhZDA5YyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYzA3OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #aad09c),
color-stop(100%, #8cc079) );
background-image: -webkit-linear-gradient(top, #aad09c, #8cc079);
background-image: -moz-linear-gradient(top, #aad09c, #8cc079);
background-image: -o-linear-gradient(top, #aad09c, #8cc079);
background-image: linear-gradient(top, #aad09c, #8cc079);
border: 1px solid #74b35d;
}
.news .avatar.cyan {
background: #81babd;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EyY2NjZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgxYmFiZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a2cccf),
color-stop(100%, #81babd) );
background-image: -webkit-linear-gradient(top, #a2cccf, #81babd);
background-image: -moz-linear-gradient(top, #a2cccf, #81babd);
background-image: -o-linear-gradient(top, #a2cccf, #81babd);
background-image: linear-gradient(top, #a2cccf, #81babd);
border: 1px solid #66abaf;
}
.news .avatar.purple {
background: #aea7cf;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2NjYzhlMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FlYTdjZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ccc8e1),
color-stop(100%, #aea7cf) );
background-image: -webkit-linear-gradient(top, #ccc8e1, #aea7cf);
background-image: -moz-linear-gradient(top, #ccc8e1, #aea7cf);
background-image: -o-linear-gradient(top, #ccc8e1, #aea7cf);
background-image: linear-gradient(top, #ccc8e1, #aea7cf);
border: 1px solid #968dc1;
}
.news .avatar i {
color: white;
line-height: 32px;
}
.news.with-icons .news-content {
margin-left: 55px;
}
.news-content {
margin-left: 50px;
margin-right: 50px;
}
.news-title {
color: #636364;
font-weight: 600;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
font-size: 16px;
}
.news-time {
float: right;
color: #bbb;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
font-size: 14px;
text-align: center;
}
.news-time span {
display: block;
font-size: 24px;
font-weight: 600;
}
.fav-btn-normal {
margin-bottom: 25px;
position: relative;
display: inline-block;
text-align: center;
padding-right: 0;
}
.fav-btn-normal a>i {
font-size: 32px;
color: #808080;
}
.fav-btn-normal a>span {
display: block;
padding-top: 4px;
font-weight: 600;
}
.fav-btn-normal a {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa),
color-stop(100%, #ececec) );
background-image: -webkit-linear-gradient(top, #fafafa, #ececec);
background-image: -moz-linear-gradient(top, #fafafa, #ececec);
background-image: -o-linear-gradient(top, #fafafa, #ececec);
background-image: linear-gradient(top, #fafafa, #ececec);
border: 1px solid #d5d5d5;
-webkit-box-shadow: 0 0 0 1px #fafafa inset, 0 1px 1px 0px #dddddd;
-moz-box-shadow: 0 0 0 1px #fafafa inset, 0 1px 1px 0px #dddddd;
box-shadow: 0 0 0 1px #fafafa inset, 0 1px 1px 0px #dddddd;
padding: 10px 0;
display: block;
font-weight: 600;
white-space: nowrap;
color: #626262;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.fav-btn-normal .triangle-button {
border-top-right-radius: 3px;
pointer-events: none;
}
.fav-btn-normal .triangle-button i {
right: 4px;
top: 3px;
}
.triangle-button {
position: absolute;
text-align: center;
font-size: 14px;
font-weight: 600;
line-height: 16px;
top: 0;
right: 0;
color: #fff;
overflow: hidden;
height: 32px;
width: 32px;
text-shadow: none;
}
.triangle-button i,.triangle-button .inner {
z-index: 1;
position: absolute;
right: 3px;
top: 2px;
}
.triangle-button:before {
content: '';
display: inline-block;
border-right: 32px solid;
border-bottom: 32px solid transparent;
position: absolute;
top: 0;
right: 0;
}
.triangle-button:hover,.triangle-button:active {
color: #fff;
}
.triangle-button.red:before {
border-right-color: #aa433a;
}
.triangle-button.red:hover:before {
border-right-color: #b5473e;
}
.triangle-button.red:active:before {
border-right-color: #9f3f36;
}
.triangle-button.green:before {
border-right-color: #8fae53;
}
.triangle-button.green:hover:before {
border-right-color: #96b35d;
}
.triangle-button.green:active:before {
border-right-color: #87a44d;
}
.triangle-button.blue:before {
border-right-color: #7fb3d4;
}
.triangle-button.blue:hover:before {
border-right-color: #8abad8;
}
.triangle-button.blue:active:before {
border-right-color: #74acd0;
}
.triangle-button.orange:before {
border-right-color: #cf6e20;
}
.triangle-button.orange:hover:before {
border-right-color: #dc7522;
}
.triangle-button.orange:active:before {
border-right-color: #c2671e;
}
.box {
-webkit-box-shadow: 0 2px 2px -2px #cccccc;
-moz-box-shadow: 0 2px 2px -2px #cccccc;
box-shadow: 0 2px 2px -2px #cccccc;
background: #fbfbfb;
border: 1px solid #cdcdcd;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
margin-bottom: 20px;
}
.box .box-header,.box .box-footer {
*zoom: 1;
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea) );
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
text-shadow: 0 1px white;
border-bottom: 1px solid #CDCDCD;
color: #636363;
font-weight: 600;
}
.box .box-header:before,.box .box-header:after,.box .box-footer:before,.box .box-footer:after
{
display: table;
content: "";
line-height: 0;
}
.box .box-header:after,.box .box-footer:after {
clear: both;
}
.box .box-header .title,.box .box-footer .title {
float: left;
display: block;
padding: 10px;
font-size: 12px;
font-weight: 600;
}
.box .box-header .box-toolbar,.box .box-footer .box-toolbar {
margin: 0;
padding: 0;
float: right;
list-style: none;
}
.box .box-header .box-toolbar .ibutton-container,.box .box-footer .box-toolbar .ibutton-container
{
margin-top: 6px;
}
.box .box-header .box-toolbar>li,.box .box-footer .box-toolbar>li {
position: relative;
float: left;
line-height: 37px;
padding-right: 10px;
color: #636363;
font-size: 12px;
}
.box .box-header .box-toolbar>li ul,.box .box-footer .box-toolbar>li ul
{
left: auto;
right: 0;
}
.box .box-header .box-toolbar>li.toolbar-link,.box .box-footer .box-toolbar>li.toolbar-link
{
padding-right: 0;
}
.box .box-header .box-toolbar>li.toolbar-link>a,.box .box-footer .box-toolbar>li.toolbar-link>a
{
border-left: 1px solid #cecece;
height: 37px;
line-height: 37px;
display: block;
padding: 0 10px;
}
.box .box-header .box-toolbar>li.toolbar-link>a i,.box .box-footer .box-toolbar>li.toolbar-link>a i
{
font-size: 16px;
}
.box .box-header .box-toolbar>li.toolbar-link>a:hover,.box .box-footer .box-toolbar>li.toolbar-link>a:hover
{
background: #efefef;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),
color-stop(100%, #efefef) );
background-image: -webkit-linear-gradient(top, #ffffff, #efefef);
background-image: -moz-linear-gradient(top, #ffffff, #efefef);
background-image: -o-linear-gradient(top, #ffffff, #efefef);
background-image: linear-gradient(top, #ffffff, #efefef);
}
.box .box-header .box-toolbar>li.toolbar-link>a:active,.box .box-footer .box-toolbar>li.toolbar-link>a:active
{
background: #e5e5e5;
}
.box .box-header .box-toolbar>li>i,.box .box-footer .box-toolbar>li>i {
font-size: 14px;
height: 37px;
line-height: 37px;
}
.box .box-header .box-toolbar>li.open>a,.box .box-footer .box-toolbar>li.open>a
{
background: #eee;
}
.box .box-header {
-moz-border-radius-topright: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
}
.box .box-footer {
-moz-border-radius-bottomright: 3px;
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom: none;
border-top: 1px solid #dddddd;
}
.box .box-footer .pagination {
margin: 10px 0;
}
.box .box-footer.flat {
border-top: none;
background: #f1f1f1;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiZmJmYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbfbfb),
color-stop(100%, #f1f1f1) );
background-image: -webkit-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -moz-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -o-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: linear-gradient(top, #fbfbfb, #f1f1f1);
}
.box-section {
border-bottom: 1px solid #ddd;
margin-left: 0;
margin-right: 0;
border-top: 1px solid #fff;
padding: 15px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.box-section:last-child {
border-bottom: none;
}
.box-list {
list-style: none;
margin: 0;
}
.box-list>li {
line-height: 24px;
*zoom: 1;
background: #f1f1f1;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiZmJmYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbfbfb),
color-stop(100%, #f1f1f1) );
background-image: -webkit-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -moz-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -o-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: linear-gradient(top, #fbfbfb, #f1f1f1);
text-shadow: 0 1px white;
padding: 10px;
border-bottom: 1px solid #ddd;
}
.top-row {
padding-bottom: 10px;
}
.padd-15 {
padding: 15px;
}
.dashboard-stats .avatar.green {
background: -moz-linear-gradient(center top, #AAD09C, #8CC079) repeat
scroll 0 0/100% auto #8CC079;
}
.dashboard-stats .avatar.yellow {
background: -moz-linear-gradient(center top, #FFDB58, #E9AB17) repeat
scroll 0 0/100% auto #E9AB17;
/* border: 1px solid #74B35D; */
}
.dashboard-stats .avatar.red {
background: -moz-linear-gradient(center top, #C35817, #C11B17) repeat
scroll 0 0/100% auto #C11B17;
/* border: 1px solid #74B35D; */
}
.dashboard-stats .avatar i {
color: white;
line-height: 31px;
}
.dashboard-stats li {
padding: 0px;
}
.dashboard-stats .avatar {
border-radius: 50%;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
height: 32px;
line-height: 32px;
text-align: center;
vertical-align: center;
width: 32px;
font-size: 12px;
}
.dashboard-stats .count {
font-size: 28px;
line-height: 28px;
height: 28px;
}
.dashboard-stats ul.inline li {
vertical-align: middle;
}
.dashboard-stats .stats-label {
color: #999999;
font-weight: 600;
text-transform: uppercase;
margin-top: 5px;
}
.dashboard-stats.small .count {
font-size: 16px;
line-height: 16px;
height: 16px;
}
/* line 55, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats .progress {
margin-bottom: 0;
height: 5px;
}
.small-Schdluer .k-nav-today, .small-Schdluer .k-nav-prev,.small-Schdluer .k-nav-next
{
display: none;
}
|
101j
|
SiteMan/WebContent/resources/app/css/sm.css
|
CSS
|
gpl3
| 20,432
|
/* line 1, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader,.selector {
display: -moz-inline-box;
display: inline-block;
vertical-align: middle;
zoom: 1;
*display: inline;
}
/* line 2, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader *,.selector * {
margin: 0;
padding: 0;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.selector select:focus {
outline: 0;
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader {
width: 190px;
cursor: pointer;
position: relative;
overflow: hidden;
cursor: default;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader span.action {
width: 85px;
text-align: center;
text-shadow: #fff 0px 1px 0px;
background-color: #fff;
font-size: 11px;
font-weight: 600;
float: left;
display: inline;
padding: 2px 0px;
overflow: hidden;
cursor: pointer;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader span.filename {
color: #777;
width: 82px;
border-right: solid 1px #bbb;
font-size: 11px;
padding: 0px 10px;
float: left;
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
}
/* line 58, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader input {
width: 190px;
opacity: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
float: right;
height: 25px;
border: none;
cursor: default;
}
/* line 70, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader input:focus {
outline: 0;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader.disabled span.action {
color: #aaa;
}
/* line 79, /home/andrei/core-admin-release/core-admin/source/stylesheets/uniform_default.scss */
.uploader.disabled span.filename {
border-color: #ddd;
color: #aaa;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
* {
margin: 0px;
padding: 0px;
text-decoration: none;
outline: none;
}
/* line 11, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
html {
min-height: 100%;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
body {
font: normal 12px 'Open Sans', HelveticaNeue, Helvetica, Arial;
min-height: 100%;
color: #707070;
overflow-x: hidden;
}
/* line 27, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
font-family: 'Open Sans', HelveticaNeue, Helvetica, Arial;
line-height: 20px;
}
/* line 32, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
strong,b {
font-weight: 600;
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
a {
color: #78808a;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
a:hover,a:active,a:focus {
cursor: pointer;
outline: 0px none;
text-decoration: none;
color: #5a6573;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.label {
font-size: 10px;
text-shadow: none;
}
/* line 54, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
i {
font-size: 14px;
}
/* line 58, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.main-content {
position: relative;
margin-left: 201px;
}
/* line 63, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.padded {
padding: 15px;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.nopadding {
padding: 0;
}
/* line 71, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.hpadded {
padding-left: 15px;
padding-right: 15px;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.vpadded {
padding-top: 15px;
padding-bottom: 15px;
}
/* line 81, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.separate-sections {
margin: 0;
list-style: none;
padding-bottom: 5px;
}
/* line 86, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.separate-sections>li,.separate-sections>div {
margin-bottom: 15px !important;
}
/* line 89, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.separate-sections>li:last-child,.separate-sections>div:last-child {
margin-bottom: 0px;
}
/* line 95, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
h1,h2,h3,h4,h5,h6,th {
color: #5f5f5f;
font-weight: 600;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.the-icons {
list-style: none;
}
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.avatar {
display: inline-block;
}
/* line 107, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.avatar img {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
-webkit-box-shadow: 0 1px 3px 0px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 1px 3px 0px rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 3px 0px rgba(0, 0, 0, 0.3);
}
/* line 113, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.avatar-small {
max-width: 32px;
max-height: 32px;
}
/* line 118, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.twitter-color {
color: #4099ff;
}
/* line 122, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.facebook-color {
color: #35508F;
}
/* line 126, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.note {
color: #909090;
font-style: italic;
font-size: 11px;
margin-bottom: 10px;
}
/* line 132, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.close {
line-height: 14px;
}
/* line 136, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.relative {
position: relative;
}
/* line 140, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.indent {
margin-left: 10px;
}
/* line 144, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.strikethrough {
text-decoration: line-through;
}
/* line 148, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.container {
width: 100%;
max-width: 100%;
}
/* line 152, /home/andrei/core-admin-release/core-admin/source/stylesheets/base.scss */
.container.padded>.row {
margin: 0;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box {
-webkit-box-shadow: 0 2px 2px -2px #cccccc;
-moz-box-shadow: 0 2px 2px -2px #cccccc;
box-shadow: 0 2px 2px -2px #cccccc;
background: #fbfbfb;
border: 1px solid #cdcdcd;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
margin-bottom: 20px;
}
/* line 12, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header,.box .box-footer {
*zoom: 1;
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
text-shadow: 0 1px white;
border-bottom: 1px solid #CDCDCD;
color: #636363;
font-weight: 600;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.box .box-header:before,.box .box-header:after,.box .box-footer:before,.box .box-footer:after
{
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.box .box-header:after,.box .box-footer:after {
clear: both;
}
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .title,.box .box-footer .title {
float: left;
display: block;
padding: 10px;
font-size: 12px;
font-weight: 600;
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar,.box .box-footer .box-toolbar {
margin: 0;
padding: 0;
float: right;
list-style: none;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar .ibutton-container,.box .box-footer .box-toolbar .ibutton-container
{
margin-top: 6px;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li,.box .box-footer .box-toolbar>li {
position: relative;
float: left;
margin-left: 5px;
line-height: 37px;
padding-right: 10px;
color: #636363;
font-size: 12px;
}
/* line 42, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li ul,.box .box-footer .box-toolbar>li ul
{
left: auto;
right: 0;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li.toolbar-link,.box .box-footer .box-toolbar>li.toolbar-link
{
padding-right: 0;
}
/* line 53, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li.toolbar-link>a,.box .box-footer .box-toolbar>li.toolbar-link>a
{
border-left: 1px solid #cecece;
height: 37px;
line-height: 37px;
display: block;
padding: 0 10px;
}
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li.toolbar-link>a i,.box .box-footer .box-toolbar>li.toolbar-link>a i
{
font-size: 16px;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li.toolbar-link>a:hover,.box .box-footer .box-toolbar>li.toolbar-link>a:hover
{
background: #efefef;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VmZWZlZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),
color-stop(100%, #efefef));
background-image: -webkit-linear-gradient(top, #ffffff, #efefef);
background-image: -moz-linear-gradient(top, #ffffff, #efefef);
background-image: -o-linear-gradient(top, #ffffff, #efefef);
background-image: linear-gradient(top, #ffffff, #efefef);
}
/* line 68, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li.toolbar-link>a:active,.box .box-footer .box-toolbar>li.toolbar-link>a:active
{
background: #e5e5e5;
}
/* line 73, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li>i,.box .box-footer .box-toolbar>li>i {
font-size: 14px;
height: 37px;
line-height: 37px;
}
/* line 79, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .box-toolbar>li.open>a,.box .box-footer .box-toolbar>li.open>a
{
background: #eee;
}
/* line 89, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header {
-moz-border-radius-topright: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-footer {
-moz-border-radius-bottomright: 3px;
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom: none;
border-top: 1px solid #dddddd;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-footer .pagination {
margin: 10px 0;
}
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-footer.flat {
border-top: none;
background: #f1f1f1;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiZmJmYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbfbfb),
color-stop(100%, #f1f1f1));
background-image: -webkit-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -moz-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -o-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: linear-gradient(top, #fbfbfb, #f1f1f1);
}
/* line 117, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-list {
list-style: none;
margin: 0;
}
/* line 121, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-list>li {
line-height: 24px;
*zoom: 1;
background: #f1f1f1;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiZmJmYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fbfbfb),
color-stop(100%, #f1f1f1));
background-image: -webkit-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -moz-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: -o-linear-gradient(top, #fbfbfb, #f1f1f1);
background-image: linear-gradient(top, #fbfbfb, #f1f1f1);
text-shadow: 0 1px white;
padding: 10px;
border-bottom: 1px solid #ddd;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.box-list>li:before,.box-list>li:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.box-list>li:after {
clear: both;
}
/* line 129, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-list>li:last-child {
border-bottom: none;
}
/* line 134, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-list .fields li {
line-height: 23px;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-section {
border-bottom: 1px solid #ddd;
margin-left: 0;
margin-right: 0;
border-top: 1px solid #fff;
padding: 15px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 149, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-section:last-child {
border-bottom: none;
}
/* line 157, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.faded-toolbar a {
margin-right: 10px;
}
/* line 162, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.faded-toolbar.pull-right a {
margin-left: 10px;
margin-right: 0;
}
/* line 168, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.faded-toolbar i {
-webkit-transition: opacity 0.3s;
-moz-transition: opacity 0.3s;
-o-transition: opacity 0.3s;
transition: opacity 0.3s;
vertical-align: middle;
color: #989898;
opacity: .6;
}
/* line 173, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.faded-toolbar i:hover {
opacity: 1;
}
/* line 182, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav {
margin-bottom: 0;
}
/* line 186, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs+.title {
float: right;
}
/* line 190, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs {
border-bottom: none;
}
/* line 194, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs>.active>a,.box .box-header .nav-tabs>.active>a:hover
{
background: #fbfbfb;
border-left-color: #dddddd;
border-right-color: #dddddd;
border-top-color: transparent;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 203, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs.nav-tabs-left {
float: left;
}
/* line 206, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs.nav-tabs-left li:first-child a {
border-left: 0;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
}
/* line 212, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs.nav-tabs-right {
float: right;
}
/* line 215, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav-tabs.nav-tabs-right li:last-child a {
border-right: 0;
-moz-border-radius-topright: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
margin-right: 0;
}
/* line 223, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box .box-header .nav>li>a:hover {
border-color: transparent;
background: none;
}
/* line 234, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-header .tooltip {
line-height: 20px !important;
text-shadow: none;
}
/* line 239, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-header .progress {
margin-top: 15px;
}
/* line 243, /home/andrei/core-admin-release/core-admin/source/stylesheets/box.scss */
.box-header .input-with-submit input {
margin-bottom: 0;
margin-top: 5px;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.chat-message-box {
position: relative;
background: white;
border: 1px solid #d8d8d8;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.chat-message-box:after,.chat-message-box:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
/* line 82, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.chat-message-box:after {
border-bottom-color: white;
border-width: 7px;
left: 10px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.chat-message-box:before {
border-bottom-color: #d8d8d8;
border-width: 8px;
left: 9px;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.chat-message-box {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
margin-bottom: 15px;
}
/* line 12, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.chat-message-box textarea {
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
margin: 5px;
width: 97% !important;
background: #fff;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.chat-message-box textarea:focus {
border: none;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .chat-message-box {
margin-bottom: 0;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .chat-message-box textarea {
height: 25px;
}
/* line 34, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .actions {
display: none;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box.open .chat-message-box {
margin-bottom: 15px;
}
/* line 42, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box.open .chat-message-box textarea {
height: auto;
}
/* line 47, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box.open .actions {
display: block;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .fields {
*zoom: 1;
position: relative;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.closable-chat-box .fields:before,.closable-chat-box .fields:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.closable-chat-box .fields:after {
clear: both;
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .fields ul {
float: left;
margin-left: 50px;
margin-bottom: 2px;
list-style: none;
padding: 0;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .fields ul li {
line-height: 18px;
color: #949494;
}
/* line 70, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .fields a {
color: #393939;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .fields .avatar {
position: absolute;
left: 0;
}
/* line 77, /home/andrei/core-admin-release/core-admin/source/stylesheets/message_box.scss */
.closable-chat-box .fields .avatar img {
max-width: 36px;
max-height: 36px;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.to-right .dropdown-menu {
top: 0px;
left: 100%;
margin-left: 10px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
float: none;
width: 100%;
-webkit-box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1) inset;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1) inset;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.to-right .dropdown-menu:before {
content: '';
display: inline-block;
border-top: 7px solid transparent !important;
border-left: 7px solid transparent !important;
border-right: 8px solid #11161A;
border-bottom: 7px solid transparent !important;
position: absolute;
top: 12px;
left: -15px;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav {
position: relative;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav.to-right .dropdown-menu {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
}
/* line 38, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul {
margin: 0;
padding: 0;
background: #11161A;
-webkit-box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 4px 2px inset;
-moz-box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 4px 2px inset;
box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 4px 2px inset;
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul:before {
border-bottom: 7px solid #0a0d0e !important;
}
/* line 48, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul:after {
border-bottom: 6px solid #0a0d0e !important;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul li.active a {
color: #fff;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
background: rgba(50, 50, 50, 0.1);
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSg5MCwgOTAsIDkwLCAwLjIpIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDUwLCA1MCwgNTAsIDAuMSkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(90, 90,
90, 0.2)), color-stop(100%, rgba(50, 50, 50, 0.1)));
background-image: -webkit-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: -moz-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: -o-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul li.active a:hover {
background: rgba(50, 50, 50, 0.1);
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSg5MCwgOTAsIDkwLCAwLjIpIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDUwLCA1MCwgNTAsIDAuMSkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(90, 90,
90, 0.2)), color-stop(100%, rgba(50, 50, 50, 0.1)));
background-image: -webkit-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: -moz-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: -o-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
}
/* line 63, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul li a {
text-shadow: none;
text-align: left;
font-size: 11px;
padding: 6px 5px 6px 20px;
border-top: 1px solid #20292f;
border-bottom: 1px solid #0a0d0e;
color: #bbb;
display: block;
}
/* line 73, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul li a:hover {
background: rgba(50, 50, 50, 0.1);
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSg5MCwgOTAsIDkwLCAwLjIpIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDUwLCA1MCwgNTAsIDAuMSkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(90, 90,
90, 0.2)), color-stop(100%, rgba(50, 50, 50, 0.1)));
background-image: -webkit-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: -moz-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: -o-linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
background-image: linear-gradient(top, rgba(90, 90, 90, 0.2) 0%,
rgba(50, 50, 50, 0.1));
color: #fff;
}
/* line 80, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul li:last-child a {
border-bottom: none;
}
/* line 86, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dark-nav>ul li:first-child a {
border-top: none;
}
/* line 95, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.navbar-inverse .nav.full {
margin: 0;
margin-left: 10px;
}
/* line 99, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.navbar-inverse .nav.full>li>a {
height: 40px;
line-height: 40px;
padding: 3px 10px;
margin-right: 10px;
background: transparent;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 108, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.navbar-inverse .nav.full>li>a:hover {
background: transparent;
}
/* line 112, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.navbar-inverse .nav.full>li>a img {
width: 32px;
height: 32px;
}
/* line 119, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu {
background: whitesmoke;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y1ZjVmNSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #f5f5f5));
background-image: -webkit-linear-gradient(top, #fdfdfd, #f5f5f5);
background-image: -moz-linear-gradient(top, #fdfdfd, #f5f5f5);
background-image: -o-linear-gradient(top, #fdfdfd, #f5f5f5);
background-image: linear-gradient(top, #fdfdfd, #f5f5f5);
-webkit-box-shadow: 0 1px 2px #dadada;
-moz-box-shadow: 0 1px 2px #dadada;
box-shadow: 0 1px 2px #dadada;
}
/* line 123, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu li>a:hover,.dropdown-menu .dropdown-menu li>a:focus,.dropdown-menu .dropdown-submenu:hover>a
{
background: #f2f2f2;
color: #404040;
}
/* line 128, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu li a {
text-shadow: 0 1px white;
color: #475967;
font-weight: 600;
}
/* line 133, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu li a i {
color: #BCBECA;
}
/* line 138, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu li.with-image {
text-align: center;
margin-top: 15px;
margin-bottom: 15px;
}
/* line 144, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu li.with-image .avatar img {
max-width: 100px;
max-height: 100px;
border: 4px solid #fff;
}
/* line 151, /home/andrei/core-admin-release/core-admin/source/stylesheets/dropdowns.scss */
.dropdown-menu li.with-image span {
text-shadow: 0 1px white;
display: block;
margin-top: 15px;
color: #9EA1AA;
font-size: 16px;
font-weight: 600;
}
/* Foundation v2.1.4 http://foundation.zurb.com */
/* Artfully masterminded by ZURB */
/* --------------------------------------------------
Table of Contents
-----------------------------------------------------
:: Shared Styles
:: Page Name 1
:: Page Name 2
*/
/* Mobile */
@media only screen and (max-width: 767px) {
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
table.responsive {
margin-bottom: 0;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
.pinned {
position: absolute;
left: 0;
top: 0;
background: #fff;
width: 35%;
overflow: hidden;
overflow-x: scroll;
border-right: 1px solid #ccc;
border-left: 1px solid #ccc;
}
/* line 20, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
.pinned table {
border-right: none;
border-left: none;
width: 100%;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
.pinned table th,.pinned table td {
white-space: nowrap;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
.pinned td:last-child {
border-bottom: 0;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
div.table-wrapper {
position: relative;
margin-bottom: 20px;
overflow: hidden;
border-right: 1px solid #ccc;
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
div.table-wrapper div.scrollable table {
margin-left: 35%;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
div.table-wrapper div.scrollable {
overflow: scroll;
overflow-y: hidden;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
table.responsive td,table.responsive th {
position: relative;
white-space: nowrap;
overflow: hidden;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive-tables.scss */
table.responsive th:first-child,table.responsive td:first-child,table.responsive td:first-child,table.responsive.pinned td
{
display: none;
}
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
#gritter-notice-wrapper {
position: fixed;
top: 20px;
right: 20px;
width: 301px;
z-index: 9999;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
#gritter-notice-wrapper.top-left {
left: 20px;
right: auto;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
#gritter-notice-wrapper.bottom-right {
top: auto;
left: auto;
bottom: 20px;
right: 20px;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
#gritter-notice-wrapper.bottom-left {
top: auto;
right: auto;
bottom: 20px;
left: 20px;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-item-wrapper {
position: relative;
margin: 0 0 10px 0;
background: url("../images/ie-spacer.gif");
/* ie7/8 fix */
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-item-wrapper.warn .gritter-title {
color: orange;
}
/* line 42, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-item-wrapper.error .gritter-title {
color: #ff4d4d;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-item-wrapper.success .gritter-title {
color: #00cc00;
}
/* line 55, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-item {
display: block;
background: rgba(0, 0, 0, 0.7);
color: #eee;
padding: 10px;
font-size: 11px;
font-family: 'Open Sans';
-webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
-moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
}
/* line 66, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.hover .gritter-item {
background-position: right -40px;
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-item p {
padding: 0;
margin: 0;
word-wrap: break-word;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-close {
display: none;
position: absolute;
top: 0px;
right: 0px;
cursor: pointer;
width: 100%;
height: 100%;
}
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-title {
font-size: 14px;
font-weight: 600;
padding: 0 0 7px 0;
display: block;
text-shadow: 1px 1px 0 #000;
/* Not supported by IE :( */
}
/* line 90, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-image {
width: 48px;
height: 48px;
float: left;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-with-image,.gritter-without-image {
padding: 0;
}
/* line 99, /home/andrei/core-admin-release/core-admin/source/stylesheets/gritter.scss */
.gritter-with-image {
width: 220px;
float: right;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats {
list-style: none;
margin: 0;
padding: 0;
color: #717e88;
*zoom: 1;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.num-stats:before,.num-stats:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.num-stats:after {
clear: both;
}
/* line 27, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li {
text-align: center;
float: left;
padding-left: 15px;
padding-right: 15px;
border-right: 1px dotted #bbbbbb;
border-left: 1px dotted whitesmoke;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li:first-child {
border-left: none;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li:last-child {
border-right: none;
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li .number {
text-shadow: 0 1px #fff;
font-size: 18px;
font-weight: 600;
display: block;
line-height: 18px;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li i {
color: #fff;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
height: 36px;
width: 36px;
line-height: 36px;
font-size: 14px;
float: left;
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-blue .number {
color: #6e97aa;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-blue i {
background: #6e97aa;
text-shadow: 0 1px rgba(66, 98, 112, 0.5);
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-blue strong {
color: #6e97aa;
}
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-red .number {
color: #ba6d6d;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-red i {
background: #ba6d6d;
text-shadow: 0 1px rgba(131, 62, 62, 0.5);
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-red strong {
color: #ba6d6d;
}
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-green .number {
color: #8fae53;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-green i {
background: #8fae53;
text-shadow: 0 1px rgba(86, 105, 50, 0.5);
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.num-stats li.stat-green strong {
color: #8fae53;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.well .num-stats li {
border-right-color: #bbb;
border-left-color: transparent;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.area-top .num-stats {
margin-top: 5px;
}
/* line 81, /home/andrei/core-admin-release/core-admin/source/stylesheets/numeric_stats.scss */
.area-top .num-stats li {
border: none;
}
/* \f020 doesn't work in Safari. all shifted one down */
/* line 8, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form.fill-up {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
margin-bottom: 0;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form.fill-up * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 16, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form.fill-up input,form.fill-up textarea,form.fill-up select {
width: 100%;
}
/* line 20, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form.fill-up .padded .control-group:last-child {
margin-bottom: 0;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form.fill-up.form-horizontal .form-actions {
padding-left: 20px;
}
/* line 32, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form.fill-up .radio,form.fill-up .checkbox {
padding-left: 0;
}
/* line 38, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.form-actions {
margin-bottom: 0;
padding: 20px;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.box form {
padding: 0;
}
/* line 47, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
form {
margin-bottom: 0;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group,.input-group {
height: 36px;
line-height: 36px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
position: relative;
z-index: 1;
}
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group .input-group-addon i,.input-group .input-group-addon i {
line-height: 26px;
}
/* line 71, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group *,.input-group * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group a.input-group-addon,.input-group span.input-group-addon,.input-group a.input-group-addon,.input-group span.input-group-addon
{
min-width: 36px;
color: #5a6573;
position: absolute;
height: 100%;
z-index: 2;
-webkit-box-shadow: inset 0 1px 2px white;
-moz-box-shadow: inset 0 1px 2px white;
box-shadow: inset 0 1px 2px white;
border: 1px solid #ccc;
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
padding-left: 10px;
padding-right: 10px;
}
/* line 90, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group a.input-group-addon:active,.input-group span.input-group-addon:active,.input-group a.input-group-addon:active,.input-group span.input-group-addon:active
{
background: #eee;
}
/* line 95, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group ul.input-group-addon,.input-group ul.input-group-addon {
list-style: none;
position: absolute;
z-index: 2;
background: none;
border: none;
padding: 0;
margin: 0;
height: 100%;
top: 1px;
right: 2px;
}
/* line 108, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group ul.input-group-addon li,.input-group ul.input-group-addon li
{
float: left;
margin-left: 10px;
line-height: 32px;
height: 32px;
}
/* line 114, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group ul.input-group-addon li a,.input-group ul.input-group-addon li button,.input-group ul.input-group-addon li a,.input-group ul.input-group-addon li button
{
vertical-align: middle;
}
/* line 117, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group ul.input-group-addon li a.btn,.input-group ul.input-group-addon li button.btn,.input-group ul.input-group-addon li a.btn,.input-group ul.input-group-addon li button.btn
{
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
}
/* line 122, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group ul.input-group-addon li .btn,.input-group ul.input-group-addon li .btn
{
padding: 0;
line-height: 25px;
height: 25px;
padding-left: 10px;
padding-right: 10px;
margin-right: 5px;
}
/* line 133, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group input[type="text"],.input-group input[type="password"],.input-group input[type="email"],.input-group input[type="number"],.input-group input[type="text"],.input-group input[type="password"],.input-group input[type="email"],.input-group input[type="number"]
{
height: 36px;
width: 100%;
z-index: 1;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
}
/* line 142, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.box .input-group,.box .input-group {
margin-bottom: 0;
}
/* line 148, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group.addon-right .input-group-addon {
right: 0;
width: auto;
}
/* line 150, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group.addon-right input[type="text"],.input-group.addon-right input[type="password"],.input-group.addon-right input[type="email"],.input-group.addon-right input[type="number"]
{
padding-right: 35px;
}
/* line 156, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group.addon-left .input-group-addon {
left: 0;
width: auto;
}
/* line 158, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-group.addon-left input[type="text"],.input-group.addon-left input[type="password"],.input-group.addon-left input[type="email"],.input-group.addon-left input[type="number"]
{
padding-left: 45px;
}
/* line 171, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.uploader {
width: 100%;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
border: 1px solid #ccc;
height: 28px;
background: #fff;
}
/* line 179, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.uploader span.filename {
border-right: none;
width: 120px;
height: 24px;
margin: 2px 0px 2px 2px;
line-height: 24px;
}
/* line 188, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.uploader.hover span.action {
background: #8dbfd8;
}
/* line 194, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.uploader.active span.action {
background: #4194bd;
}
/* line 199, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.uploader span.action {
height: 24px;
line-height: 24px;
float: right;
width: 22px;
text-align: center;
height: 22px;
margin-top: 2px;
margin-right: 2px;
margin-bottom: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
background: #549fc4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdhYjRkMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU0OWZjNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7ab4d1),
color-stop(100%, #549fc4));
background-image: -webkit-linear-gradient(top, #7ab4d1, #549fc4);
background-image: -moz-linear-gradient(top, #7ab4d1, #549fc4);
background-image: -o-linear-gradient(top, #7ab4d1, #549fc4);
background-image: linear-gradient(top, #7ab4d1, #549fc4);
color: white;
text-shadow: none;
font-size: 16px;
line-height: 20px;
}
/* line 220, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.selector {
position: relative;
padding-left: 5px;
overflow: hidden;
width: 100%;
font-size: 12px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
background: whitesmoke;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y1ZjVmNSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),
color-stop(100%, #f5f5f5));
background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
background-image: linear-gradient(top, #ffffff, #f5f5f5);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
border: 1px solid #ccc;
font-size: 12px;
height: 28px;
line-height: 28px;
color: #666;
}
/* line 228, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.selector:after {
content: "\f0dd";
top: 2px;
right: 2px;
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
display: inline-block;
text-decoration: inherit;
position: absolute;
width: 18px;
height: 18px;
pointer-events: none;
text-align: center;
line-height: 18px;
font-size: 14px;
color: #888;
}
/* line 235, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.selector span {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0px 25px 0px 2px;
cursor: pointer;
color: #666;
text-shadow: 0 1px 0 #fff;
height: 26px;
line-height: 26px;
background: transparent;
}
/* line 252, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.selector.disabled span {
color: #bbb;
}
/* line 257, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
div.selector select {
position: absolute;
opacity: 0;
height: 25px;
border: none;
background: none;
top: 0;
left: 0;
font-size: 12px;
border: solid 1px #fff;
}
/* line 273, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input
{
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
font-size: 12px;
color: #858585;
padding: 0 0 0 5px;
border: 1px solid #d7d7d7;
display: inline-block;
background: #fdfdfd;
height: 26px;
line-height: 26px;
}
/* line 285, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus
{
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
border: 1px solid #68A6CE;
}
/* line 291, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
textarea {
height: auto;
}
/* line 295, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
label {
font-size: 12px;
color: #5F5F5F;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.search-dropdown {
position: relative;
background: #fbfbfb;
border: 1px solid #cccccc;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.search-dropdown:after,.search-dropdown:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
/* line 82, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.search-dropdown:after {
border-bottom-color: #fbfbfb;
border-width: 7px;
left: 50%;
margin-left: -7px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.search-dropdown:before {
border-bottom-color: #cccccc;
border-width: 8px;
left: 50%;
margin-left: -8px;
}
/* line 305, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.search-dropdown {
margin-top: 15px;
}
/* line 308, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.search-dropdown .box-section:first-child {
border-top: none;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
-moz-border-radius-topright: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
}
/* line 317, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-with-submit {
position: relative;
}
/* line 320, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-with-submit button {
background: transparent;
border: none;
position: absolute;
right: 2px;
top: 7px;
height: 22px;
line-height: 22px;
}
/* line 330, /home/andrei/core-admin-release/core-admin/source/stylesheets/form_elements.scss */
.input-with-submit i {
color: #909090;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tagsinput {
border: 1px solid #ddd;
background: #fdfdfd;
padding: 5px;
width: 100%;
overflow-y: auto;
}
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tagsinput input {
font-size: 11px;
line-height: normal;
width: auto !important;
}
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tagsinput span.tag {
display: block;
float: left;
padding: 0 8px;
margin: 5px 5px 5px 5px;
line-height: 23px;
font-size: 11px;
border: 1px solid #d2d2d2;
background: #f2f2f2;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZjZmNmYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YyZjJmMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fcfcfc),
color-stop(100%, #f2f2f2));
background-image: -webkit-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: -moz-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: -o-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: linear-gradient(top, #fcfcfc, #f2f2f2);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
}
/* line 27, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tagsinput span.tag a {
font-weight: 600;
font-size: 11px;
float: right;
}
/* line 37, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tagsinput input {
width: 60px;
border: none;
padding: 5px 8px 6px 8px;
background: transparent;
margin: 5px 5px 0 4px;
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tagsinput div {
display: block;
float: left;
}
/* line 50, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.tags_clear {
clear: both;
width: 100%;
height: 0px;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.not_valid {
background: #FBD8DB !important;
color: #90111A !important;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
}
/* line 62, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.secondary-sidebar .tagsinput {
background: none;
border: none;
padding: 0 8px;
margin: -3px 0;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.secondary-sidebar .tagsinput span.tag {
margin: 3px;
color: #5f5f5f;
background: #f2f2f2;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZjZmNmYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YyZjJmMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fcfcfc),
color-stop(100%, #f2f2f2));
background-image: -webkit-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: -moz-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: -o-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: linear-gradient(top, #fcfcfc, #f2f2f2);
border: 1px solid #D2D2D2;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/tags.scss */
.secondary-sidebar .tagsinput span.tag a {
color: #aaa;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-static-top .navbar-collapse {
padding-left: 20px;
padding-right: 20px;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar {
margin-bottom: 0;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-toggle i {
color: #fff;
}
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.menu-avatar {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
width: 32px;
height: 32px;
margin-right: 10px;
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-nav>li>a.dropdown-avatar {
position: relative;
padding-top: 9px;
padding-bottom: 9px;
font-weight: 600;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-nav>li>a.dropdown-avatar .badge {
position: absolute;
top: 5px;
left: 7px;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-inverse {
border-bottom: 1px solid rgba(10, 13, 14, 0.8);
background: background: none repeat scroll 0 0 #BCA2F1;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzFiMjMyOSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzExMTYxYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #9E7BFF),
color-stop(100%, #BCA2F1));
background-image: -webkit-linear-gradient(top, #9E7BFF, #BCA2F1);
background-image: -moz-linear-gradient(top, #9E7BFF, #BCA2F1);
background-image: -o-linear-gradient(top, #9E7BFF, #BCA2F1);
background-image: linear-gradient(top, #9E7BFF, #BCA2F1);
border-left: 0;
border-right: 0;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-inverse .nav>li.cdrop {
margin-top: 13px;
}
/* line 50, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-inverse .nav>li.cdrop>a {
background: rgba(0, 0, 0, 0.5);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
padding: 3px 10px;
margin-right: 10px;
line-height: 20px;
height: 24px;
}
/* line 59, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-inverse .nav>li.cdrop>a:hover {
background: rgba(0, 0, 0, 0.8);
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-inverse .nav>li.cdrop.active>a {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
}
/* line 98, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form {
margin-top: 12px;
}
/* line 100, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form .form-group {
position: relative;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form .search-query {
padding: 2px 10px;
background: #E5E4E2;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0
rgba(255, 255, 255, 0.15);
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
-ms-border-radius: 15px;
-o-border-radius: 15px;
border-radius: 15px;
border: 1px solid #111;
height: 25px;
line-height: 25px;
}
/* line 116, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form .search-query:focus,.navbar-form .search-query.focused {
padding: 2px 10px;
}
/* line 120, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form .search-query.animated {
width: 100px;
-webkit-transition: width 0.3s;
-moz-transition: width 0.3s;
-o-transition: width 0.3s;
transition: width 0.3s;
}
/* line 124, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form .search-query.animated:focus,.navbar-form .search-query.animated .focused
{
width: 200px;
}
/* line 130, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-form i {
position: absolute;
right: 10px;
top: 5px;
}
/* line 137, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.primary-sidebar .navbar-collapse {
max-height: 9999px;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.primary-sidebar .nav {
position: relative;
padding: 0;
}
/* line 146, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-nav>li>.dropdown-menu {
border-radius: 4px;
}
/* line 149, /home/andrei/core-admin-release/core-admin/source/stylesheets/navigation.scss */
.navbar-nav>li>.dropdown-menu>li>a {
white-space: normal;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.sidebar-background {
position: fixed;
z-index: -1;
width: 200px;
background: #eaeaea;
top: 0;
left: 0;
height: 100%;
border-right: 1px solid #ccc;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.sidebar-background .primary-sidebar-background {
width: 200px;
background: #B7CEEC;
height: 100%;
top: 0;
left: 0;
position: absolute;
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar {
width: 200px;
float: left;
position: absolute;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav {
margin-bottom: 20px;
}
/* line 34, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav:after {
content: "";
position: absolute;
bottom: -1px;
height: 1px;
width: 100%;
left: 0;
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTAwJSIgeTI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iInRyYW5zcGFyZW50IiIvPjxzdG9wIG9mZnNldD0iMzUlIiBzdG9wLWNvbG9yPSJyZ2JhKDMyLCA0MSwgNDcsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzIwMjkyZiIvPjxzdG9wIG9mZnNldD0iNjUlIiBzdG9wLWNvbG9yPSJyZ2JhKDMyLCA0MSwgNDcsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiJ0cmFuc3BhcmVudCIiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, transparent),
color-stop(35%, rgba(32, 41, 47, 0.8)), color-stop(50%, #20292f),
color-stop(65%, rgba(32, 41, 47, 0.8)), color-stop(100%, transparent));
background: -webkit-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
background: -moz-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
background: -o-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
background: linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li {
position: relative;
border-bottom: 1px solid transparent;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li a:after {
content: "";
position: absolute;
bottom: -1px;
height: 1px;
width: 100%;
left: 0;
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTAwJSIgeTI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iInRyYW5zcGFyZW50IiIvPjxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSJyZ2JhKDEwLCAxMywgMTQsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzBhMGQwZSIvPjxzdG9wIG9mZnNldD0iNzAlIiBzdG9wLWNvbG9yPSJyZ2JhKDEwLCAxMywgMTQsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiJ0cmFuc3BhcmVudCIiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, transparent),
color-stop(30%, rgba(10, 13, 14, 0.8)), color-stop(50%, #0a0d0e),
color-stop(70%, rgba(10, 13, 14, 0.8)), color-stop(100%, transparent));
background: -webkit-linear-gradient(left, transparent 0%, rgba(10, 13, 14, 0.8)
30%, #0a0d0e 50%, rgba(10, 13, 14, 0.8) 70%, transparent 100%);
background: -moz-linear-gradient(left, transparent 0%, rgba(10, 13, 14, 0.8)
30%, #0a0d0e 50%, rgba(10, 13, 14, 0.8) 70%, transparent 100%);
background: -o-linear-gradient(left, transparent 0%, rgba(10, 13, 14, 0.8)
30%, #0a0d0e 50%, rgba(10, 13, 14, 0.8) 70%, transparent 100%);
background: linear-gradient(left, transparent 0%, rgba(10, 13, 14, 0.8)
30%, #0a0d0e 50%, rgba(10, 13, 14, 0.8) 70%, transparent 100%);
}
/* line 59, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li a:before {
content: "";
position: absolute;
top: 0px;
height: 1px;
width: 100%;
left: 0;
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTAwJSIgeTI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iInRyYW5zcGFyZW50IiIvPjxzdG9wIG9mZnNldD0iMzUlIiBzdG9wLWNvbG9yPSJyZ2JhKDMyLCA0MSwgNDcsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzIwMjkyZiIvPjxzdG9wIG9mZnNldD0iNjUlIiBzdG9wLWNvbG9yPSJyZ2JhKDMyLCA0MSwgNDcsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiJ0cmFuc3BhcmVudCIiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, transparent),
color-stop(35%, rgba(32, 41, 47, 0.8)), color-stop(50%, #20292f),
color-stop(65%, rgba(32, 41, 47, 0.8)), color-stop(100%, transparent));
background: -webkit-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
background: -moz-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
background: -o-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
background: linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
35%, #20292f 50%, rgba(32, 41, 47, 0.8) 65%, transparent 100%);
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li .glow {
position: absolute;
height: 40px;
width: 5px;
-webkit-transition: box-shadow 0.3s;
-moz-transition: box-shadow 0.3s;
-o-transition: box-shadow 0.3s;
transition: box-shadow 0.3s;
background: #1F2B42;
-webkit-box-shadow: 0 0 2px 1px #434d59 inset;
-moz-box-shadow: 0 0 2px 1px #434d59 inset;
box-shadow: 0 0 2px 1px #434d59 inset;
}
/* line 80, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li:hover .glow {
background: #4291A6;
-webkit-box-shadow: 0 0 2px 1px #7bc8d7 inset;
-moz-box-shadow: 0 0 2px 1px #7bc8d7 inset;
box-shadow: 0 0 2px 1px #7bc8d7 inset;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li:hover>a {
color: #939ea4;
}
/* line 91, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li.active .glow {
background: #4291A6;
-webkit-box-shadow: 0 0 2px 1px #7bc8d7 inset;
-moz-box-shadow: 0 0 2px 1px #7bc8d7 inset;
box-shadow: 0 0 2px 1px #7bc8d7 inset;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li.active>a {
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
color: #939ea4;
}
/* line 102, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li>a {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 25px;
-webkit-transition: color 0.3s;
-moz-transition: color 0.3s;
-o-transition: color 0.3s;
transition: color 0.3s;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
color: #6B787F;
}
/* line 110, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li>a:hover,.primary-sidebar .nav>li>a:focus {
background: #11161A;
position: static;
}
/* line 115, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li>a span {
font-size: 12px;
vertical-align: middle;
}
/* line 120, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li>a i {
vertical-align: middle;
}
/* line 124, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .nav>li>a i+span {
padding-left: 10px;
}
/* line 137, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.active .glow:after {
content: "";
border-radius: 50%;
position: absolute;
top: 20px;
width: 0;
height: 0;
left: 8px;
-webkit-box-shadow: -10px 0 15px 23px rgba(122, 171, 216, 0.15);
-moz-box-shadow: -10px 0 15px 23px rgba(122, 171, 216, 0.15);
box-shadow: -10px 0 15px 23px rgba(122, 171, 216, 0.15);
background: rgba(124, 190, 215, 0.2);
}
/* line 150, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar {
width: 100%;
position: relative;
}
/* line 153, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar .dropdown-toggle span {
font-weight: 600;
}
/* line 161, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar a {
display: inline-block;
}
/* line 164, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar a>span {
position: relative;
}
/* line 168, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar a img {
-webkit-box-shadow: 0 1px 3px #1e1e1e;
-moz-box-shadow: 0 1px 3px #1e1e1e;
box-shadow: 0 1px 3px #1e1e1e;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
}
/* line 173, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar a .badge {
z-index: 2;
position: absolute;
left: -6px;
top: -10px;
}
/* line 181, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.user-avatar .dropdown-menu {
margin-top: 4px;
}
/* line 186, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.status-error {
color: #d13b3b;
}
/* line 190, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.status-success {
color: #629b3e;
}
/* line 194, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.status-pending {
color: #888;
}
/* line 198, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.status-warning {
color: #E36D2D;
}
/* line 202, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.status-info {
color: #4C9ECD;
}
/* line 207, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
hr.divider,li.divider {
border: 0;
height: 1px;
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTAwJSIgeTI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSgyMDUsIDIwNSwgMjA1LCAwKSIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjY2RjZGNkIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDIwNSwgMjA1LCAyMDUsIDApIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(205, 205,
205, 0)), color-stop(50%, #cdcdcd),
color-stop(100%, rgba(205, 205, 205, 0)));
background: -webkit-linear-gradient(left, rgba(205, 205, 205, 0),
#cdcdcd, rgba(205, 205, 205, 0));
background: -moz-linear-gradient(left, rgba(205, 205, 205, 0), #cdcdcd,
rgba(205, 205, 205, 0));
background: -o-linear-gradient(left, rgba(205, 205, 205, 0), #cdcdcd,
rgba(205, 205, 205, 0));
background: linear-gradient(left, rgba(205, 205, 205, 0), #cdcdcd,
rgba(205, 205, 205, 0));
position: relative;
}
/* line 213, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
hr.divider:after,li.divider:after {
content: '';
height: 1px;
top: 1px;
left: 0;
width: 100%;
position: absolute;
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTAwJSIgeTI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSgyNTAsIDI1MCwgMjUwLCAwKSIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmFmYWZhIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDI1MCwgMjUwLCAyNTAsIDApIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(250, 250,
250, 0)), color-stop(50%, #fafafa),
color-stop(100%, rgba(250, 250, 250, 0)));
background: -webkit-linear-gradient(left, rgba(250, 250, 250, 0),
#fafafa, rgba(250, 250, 250, 0));
background: -moz-linear-gradient(left, rgba(250, 250, 250, 0), #fafafa,
rgba(250, 250, 250, 0));
background: -o-linear-gradient(left, rgba(250, 250, 250, 0), #fafafa,
rgba(250, 250, 250, 0));
background: linear-gradient(left, rgba(250, 250, 250, 0), #fafafa,
rgba(250, 250, 250, 0));
}
/* line 223, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
hr.divider+.padded,hr.divider+.vpadded,li.divider+.padded,li.divider+.vpadded
{
padding-top: 0;
}
/* line 229, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .divider {
margin-top: 10px;
margin-bottom: 10px;
border-top: 1px solid #0a0d0e;
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iNTAlIiB4Mj0iMTAwJSIgeTI9IjUwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iInRyYW5zcGFyZW50IiIvPjxzdG9wIG9mZnNldD0iMjUlIiBzdG9wLWNvbG9yPSJyZ2JhKDMyLCA0MSwgNDcsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iIzIwMjkyZiIvPjxzdG9wIG9mZnNldD0iNzUlIiBzdG9wLWNvbG9yPSJyZ2JhKDMyLCA0MSwgNDcsIDAuOCkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiJ0cmFuc3BhcmVudCIiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, transparent),
color-stop(25%, rgba(32, 41, 47, 0.8)), color-stop(50%, #20292f),
color-stop(75%, rgba(32, 41, 47, 0.8)), color-stop(100%, transparent));
background: -webkit-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
25%, #20292f 50%, rgba(32, 41, 47, 0.8) 75%, transparent 100%);
background: -moz-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
25%, #20292f 50%, rgba(32, 41, 47, 0.8) 75%, transparent 100%);
background: -o-linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
25%, #20292f 50%, rgba(32, 41, 47, 0.8) 75%, transparent 100%);
background: linear-gradient(left, transparent 0%, rgba(32, 41, 47, 0.8)
25%, #20292f 50%, rgba(32, 41, 47, 0.8) 75%, transparent 100%);
}
/* line 230, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.primary-sidebar .divider:after {
content: none;
}
/* line 237, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top {
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa),
color-stop(100%, #ececec));
background-image: -webkit-linear-gradient(top, #fafafa, #ececec);
background-image: -moz-linear-gradient(top, #fafafa, #ececec);
background-image: -o-linear-gradient(top, #fafafa, #ececec);
background-image: linear-gradient(top, #fafafa, #ececec);
-webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.07);
-moz-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.07);
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.07);
border-bottom: 1px solid #ccc;
position: relative;
width: 100%;
padding: 10px 15px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-bottom: 15px;
}
/* line 247, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header {
font-size: 14px;
}
/* line 251, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header i {
float: left;
font-size: 24px;
margin-top: 4px;
margin-right: 10px;
}
/* line 258, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header h3,.area-top .header h5 {
margin: 0;
font-weight: 300;
}
/* line 263, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header h3,.area-top .header i {
color: #888;
}
/* line 267, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header h3 {
line-height: 35px;
}
/* line 271, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header h5 {
color: #aaa;
}
/* line 275, /home/andrei/core-admin-release/core-admin/source/stylesheets/sidebar.scss */
.area-top .header>* {
vertical-align: middle;
text-shadow: 0 1px #fff;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs {
display: inline-block;
padding-right: 20px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 0 0 1px #cccccc inset, 0 1px 0px
rgba(255, 255, 255, 0.6), 0 1px 0 1px rgba(255, 255, 255, 0.6) inset;
-moz-box-shadow: 0 0 0 1px #cccccc inset, 0 1px 0px
rgba(255, 255, 255, 0.6), 0 1px 0 1px rgba(255, 255, 255, 0.6) inset;
box-shadow: 0 0 0 1px #cccccc inset, 0 1px 0px rgba(255, 255, 255, 0.6),
0 1px 0 1px rgba(255, 255, 255, 0.6) inset;
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa),
color-stop(100%, #ececec));
background-image: -webkit-linear-gradient(top, #fafafa, #ececec);
background-image: -moz-linear-gradient(top, #fafafa, #ececec);
background-image: -o-linear-gradient(top, #fafafa, #ececec);
background-image: linear-gradient(top, #fafafa, #ececec);
width: 100%;
}
/* line 53, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-label {
-webkit-box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5) inset;
-moz-box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5) inset;
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5) inset;
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button {
text-shadow: 0 1px 1px #fafafa, 0 -1px 1px #ececec;
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa),
color-stop(100%, #ececec));
background-image: -webkit-linear-gradient(top, #fafafa, #ececec);
background-image: -moz-linear-gradient(top, #fafafa, #ececec);
background-image: -o-linear-gradient(top, #fafafa, #ececec);
background-image: linear-gradient(top, #fafafa, #ececec);
display: inline-block;
cursor: pointer;
margin-right: -20px;
}
/* line 66, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow {
text-shadow: 0 1px 1px #ffd972, 0 -1px 1px #ffba49;
background: #ffba49;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZDk3MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmYmE0OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffd972),
color-stop(100%, #ffba49));
background-image: -webkit-linear-gradient(top, #ffd972, #ffba49);
background-image: -moz-linear-gradient(top, #ffd972, #ffba49);
background-image: -o-linear-gradient(top, #ffd972, #ffba49);
background-image: linear-gradient(top, #ffd972, #ffba49);
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow .breadcrumb-label {
color: #5c481d;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow:hover {
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmYmE0OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZDk3MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #ffba49),
color-stop(100%, #ffd972));
background: -webkit-linear-gradient(bottom, #ffba49, #ffd972);
background: -moz-linear-gradient(bottom, #ffba49, #ffd972);
background: -o-linear-gradient(bottom, #ffba49, #ffd972);
background: linear-gradient(bottom, #ffba49, #ffd972);
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow:hover .breadcrumb-arrow span {
background-color: #ffba49;
background: -moz-linear-gradient(135deg, #ffba49, #ffd972);
background: -ms-linear-gradient(135deg, #ffd972, #ffba49);
background: -o-linear-gradient(135deg, #ffd972, #ffba49);
background: -webkit-gradient(linear, left top, right bottom, from(#ffd972),
to(#ffba49));
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow .breadcrumb-arrow span {
background-color: #ffd972;
background: -moz-linear-gradient(135deg, #ffba49, #ffd972);
background: -ms-linear-gradient(135deg, #ffba49, #ffd972);
background: -o-linear-gradient(135deg, #ffba49, #ffd972);
background: -webkit-gradient(linear, right bottom, left top, from(#ffba49),
to(#ffd972));
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow .breadcrumb-label {
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5) inset;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom: 1px solid #C99337;
border-left: 1px solid #D79D3B;
border-top: 1px solid #F5B244;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.yellow .breadcrumb-arrow span {
box-shadow: 1px -1px 0px #E29B1E, 1px -1px 1px #F09900;
}
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue {
text-shadow: 0 1px 1px #92cff5, 0 -1px 1px #68a6ce;
background: #68a6ce;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkyY2ZmNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzY4YTZjZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #92cff5),
color-stop(100%, #68a6ce));
background-image: -webkit-linear-gradient(top, #92cff5, #68a6ce);
background-image: -moz-linear-gradient(top, #92cff5, #68a6ce);
background-image: -o-linear-gradient(top, #92cff5, #68a6ce);
background-image: linear-gradient(top, #92cff5, #68a6ce);
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue .breadcrumb-label {
color: white;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue:hover {
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzY4YTZjZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkyY2ZmNSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #68a6ce),
color-stop(100%, #92cff5));
background: -webkit-linear-gradient(bottom, #68a6ce, #92cff5);
background: -moz-linear-gradient(bottom, #68a6ce, #92cff5);
background: -o-linear-gradient(bottom, #68a6ce, #92cff5);
background: linear-gradient(bottom, #68a6ce, #92cff5);
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue:hover .breadcrumb-arrow span {
background-color: #68a6ce;
background: -moz-linear-gradient(135deg, #68a6ce, #92cff5);
background: -ms-linear-gradient(135deg, #92cff5, #68a6ce);
background: -o-linear-gradient(135deg, #92cff5, #68a6ce);
background: -webkit-gradient(linear, left top, right bottom, from(#92cff5),
to(#68a6ce));
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue .breadcrumb-arrow span {
background-color: #92cff5;
background: -moz-linear-gradient(135deg, #68a6ce, #92cff5);
background: -ms-linear-gradient(135deg, #68a6ce, #92cff5);
background: -o-linear-gradient(135deg, #68a6ce, #92cff5);
background: -webkit-gradient(linear, right bottom, left top, from(#68a6ce),
to(#92cff5));
}
/* line 87, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue .breadcrumb-label {
font-weight: 600;
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5) inset;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom: 1px solid #3e89b9;
border-left: 1px solid #60a1ca;
border-top: 1px solid #73acd0;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue .breadcrumb-label:hover {
color: white;
}
/* line 99, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue .breadcrumb-label:hover .breadcrumb-label
{
color: white;
}
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button.blue .breadcrumb-arrow span {
box-shadow: 1px -1px 0px #7599AF, 1px -1px 1px #45A8E7;
}
/* line 110, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-label {
box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.5) inset;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
}
/* line 118, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-arrow span {
box-shadow: 1px -1px 0px #ccc, 1px -1px 1px #ccc;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-label {
color: #888888;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:hover {
background:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #ececec),
color-stop(100%, #fafafa));
background: -webkit-linear-gradient(bottom, #ececec, #fafafa);
background: -moz-linear-gradient(bottom, #ececec, #fafafa);
background: -o-linear-gradient(bottom, #ececec, #fafafa);
background: linear-gradient(bottom, #ececec, #fafafa);
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:hover .breadcrumb-arrow span {
background-color: #ececec;
background: -moz-linear-gradient(135deg, #ececec, #fafafa);
background: -ms-linear-gradient(135deg, #fafafa, #ececec);
background: -o-linear-gradient(135deg, #fafafa, #ececec);
background: -webkit-gradient(linear, left top, right bottom, from(#fafafa),
to(#ececec));
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-arrow span {
background-color: #fafafa;
background: -moz-linear-gradient(135deg, #ececec, #fafafa);
background: -ms-linear-gradient(135deg, #ececec, #fafafa);
background: -o-linear-gradient(135deg, #ececec, #fafafa);
background: -webkit-gradient(linear, right bottom, left top, from(#ececec),
to(#fafafa));
}
/* line 128, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
-ms-border-radius: 3px 0 0 3px;
-o-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* line 131, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:first-child .breadcrumb-label {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
/* line 137, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
-ms-border-radius: 0 3px 3px 0;
-o-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:first-child .breadcrumb-label {
padding-left: 15px;
}
/* line 146, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:last-child .breadcrumb-label {
padding-right: 15px;
}
/* line 149, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button:last-child .breadcrumb-arrow {
display: none;
}
/* line 154, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-label {
padding: 8px;
-moz-user-select: none;
-webkit-user-select: none;
display: inline-block;
padding-left: 25px;
}
/* line 162, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-arrow {
width: 17px;
height: 34px;
display: inline-block;
vertical-align: top;
overflow: hidden;
margin-left: -5px;
}
/* line 170, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
#breadcrumbs .breadcrumb-button .breadcrumb-arrow span {
border-radius: 4px;
width: 26px;
height: 30px;
display: inline-block;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
margin-left: -16px;
margin-top: 3px;
}
/* line 190, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line {
color: #666;
height: 28px;
-webkit-box-shadow: 0 1px 0 white, 0 1px 0 white inset;
-moz-box-shadow: 0 1px 0 white, 0 1px 0 white inset;
box-shadow: 0 1px 0 white, 0 1px 0 white inset;
background: #e3e3e3;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y0ZjRmNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2UzZTNlMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f4f4f4),
color-stop(100%, #e3e3e3));
background-image: -webkit-linear-gradient(top, #f4f4f4, #e3e3e3);
background-image: -moz-linear-gradient(top, #f4f4f4, #e3e3e3);
background-image: -o-linear-gradient(top, #f4f4f4, #e3e3e3);
background-image: linear-gradient(top, #f4f4f4, #e3e3e3);
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
font-size: 11px;
}
/* line 199, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .breadcrumbs {
margin: 0;
padding: 0;
list-style: none;
}
/* line 204, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .breadcrumbs li {
float: left;
line-height: 28px;
margin-left: 10px;
}
/* line 209, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .breadcrumbs li:after {
content: ">";
margin-left: 10px;
}
/* line 214, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .breadcrumbs li:last-child:after {
content: "";
}
/* line 216, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .breadcrumbs li:first-child {
margin-left: 20px;
}
/* line 218, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .breadcrumbs li.current {
color: #888;
}
/* line 222, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .nav.pull-right {
margin-right: 20px;
border-right: 1px solid #ccc;
}
/* line 226, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .nav.pull-right .badge {
margin-left: 4px;
}
/* line 231, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .nav .dropdown-toggle .caret {
margin-top: 12px;
}
/* line 235, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .nav>li>a {
text-shadow: none;
line-height: 28px;
height: 28px;
margin: 0;
padding: 0 15px;
border-left: 1px solid #ccc;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
color: #666;
}
/* line 245, /home/andrei/core-admin-release/core-admin/source/stylesheets/breadcrumbs.scss */
.breadcrumb-line .nav>li>a strong {
color: #B35D5D;
margin-left: 4px;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button {
position: absolute;
text-align: center;
font-size: 14px;
font-weight: 600;
line-height: 16px;
top: 0;
right: 0;
color: #fff;
overflow: hidden;
height: 32px;
width: 32px;
text-shadow: none;
}
/* line 33, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button i,.triangle-button .inner {
z-index: 1;
position: absolute;
right: 3px;
top: 2px;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button:before {
content: '';
display: inline-block;
border-right: 32px solid;
border-bottom: 32px solid transparent;
position: absolute;
top: 0;
right: 0;
}
/* line 50, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button:hover,.triangle-button:active {
color: #fff;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.red:before {
border-right-color: #aa433a;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.red:hover:before {
border-right-color: #b5473e;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.red:active:before {
border-right-color: #9f3f36;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.green:before {
border-right-color: #8fae53;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.green:hover:before {
border-right-color: #96b35d;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.green:active:before {
border-right-color: #87a44d;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.blue:before {
border-right-color: #7fb3d4;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.blue:hover:before {
border-right-color: #8abad8;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.blue:active:before {
border-right-color: #74acd0;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.orange:before {
border-right-color: #cf6e20;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.orange:hover:before {
border-right-color: #dc7522;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/triangle_button.scss */
.triangle-button.orange:active:before {
border-right-color: #c2671e;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/tooltips.scss */
.jqstooltip {
z-index: 10001;
border: 1px solid #333333 !important;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: rgba(0, 0, 0, 0.7);
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSgwLCAwLCAwLCAwLjUpIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDAsIDAsIDAsIDAuNykiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0,
0.5)), color-stop(100%, rgba(0, 0, 0, 0.7)));
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0.7));
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0.7));
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0.7));
background-image: linear-gradient(top, rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0.7));
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
display: inline-block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn {
color: #fff;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
font-size: 11px;
font-weight: 600;
text-shadow: 0 -1px #6f6f6f;
}
/* line 48, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn:hover,.btn:active,.btn:focus {
color: #fff;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-full {
display: block;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-default {
color: #686868;
text-shadow: none;
}
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-default:hover,.btn.btn-default:active {
color: #505050;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-default .caret {
border-top: 4px solid black;
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn .caret {
border-top: 4px solid white;
}
/* line 73, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-lg {
font-size: 12px;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-default {
border: 1px solid #d4d4d4;
-webkit-box-shadow: inset 0 1px 2px white;
-moz-box-shadow: inset 0 1px 2px white;
box-shadow: inset 0 1px 2px white;
background: #e9e9e9;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U5ZTllOSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #e9e9e9));
background-image: -webkit-linear-gradient(top, #fdfdfd, #e9e9e9);
background-image: -moz-linear-gradient(top, #fdfdfd, #e9e9e9);
background-image: -o-linear-gradient(top, #fdfdfd, #e9e9e9);
background-image: linear-gradient(top, #fdfdfd, #e9e9e9);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-default:hover {
background: #e6e6e6;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #e6e6e6));
background-image: -webkit-linear-gradient(top, #fdfdfd, #e6e6e6);
background-image: -moz-linear-gradient(top, #fdfdfd, #e6e6e6);
background-image: -o-linear-gradient(top, #fdfdfd, #e6e6e6);
background-image: linear-gradient(top, #fdfdfd, #e6e6e6);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-default:active {
background: #f3f3f3;
border-color: #cfcfcf;
-webkit-box-shadow: 0 0 5px #f3f3f3 inset;
-moz-box-shadow: 0 0 5px #f3f3f3 inset;
box-shadow: 0 0 5px #f3f3f3 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-red {
border: 1px solid #a54747;
-webkit-box-shadow: inset 0 1px 2px #cd8b8b;
-moz-box-shadow: inset 0 1px 2px #cd8b8b;
box-shadow: inset 0 1px 2px #cd8b8b;
background: #b95d5d;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2M1Nzk3OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2I5NWQ1ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c57979),
color-stop(100%, #b95d5d));
background-image: -webkit-linear-gradient(top, #c57979, #b95d5d);
background-image: -moz-linear-gradient(top, #c57979, #b95d5d);
background-image: -o-linear-gradient(top, #c57979, #b95d5d);
background-image: linear-gradient(top, #c57979, #b95d5d);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-red:hover {
background: #b75959;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2M1Nzk3OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2I3NTk1OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c57979),
color-stop(100%, #b75959));
background-image: -webkit-linear-gradient(top, #c57979, #b75959);
background-image: -moz-linear-gradient(top, #c57979, #b75959);
background-image: -o-linear-gradient(top, #c57979, #b75959);
background-image: linear-gradient(top, #c57979, #b75959);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-red:active {
background: #bf6b6b;
border-color: #9e4444;
-webkit-box-shadow: 0 0 5px #bf6b6b inset;
-moz-box-shadow: 0 0 5px #bf6b6b inset;
box-shadow: 0 0 5px #bf6b6b inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-green {
border: 1px solid #6d963b;
-webkit-box-shadow: inset 0 1px 2px #a2c873;
-moz-box-shadow: inset 0 1px 2px #a2c873;
box-shadow: inset 0 1px 2px #a2c873;
background: #82b346;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk2YzE2MSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgyYjM0NiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #96c161),
color-stop(100%, #82b346));
background-image: -webkit-linear-gradient(top, #96c161, #82b346);
background-image: -moz-linear-gradient(top, #96c161, #82b346);
background-image: -o-linear-gradient(top, #96c161, #82b346);
background-image: linear-gradient(top, #96c161, #82b346);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-green:hover {
background: #80af45;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk2YzE2MSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgwYWY0NSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #96c161),
color-stop(100%, #80af45));
background-image: -webkit-linear-gradient(top, #96c161, #80af45);
background-image: -moz-linear-gradient(top, #96c161, #80af45);
background-image: -o-linear-gradient(top, #96c161, #80af45);
background-image: linear-gradient(top, #96c161, #80af45);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-green:active {
background: #8cbb52;
border-color: #688e38;
-webkit-box-shadow: 0 0 5px #8cbb52 inset;
-moz-box-shadow: 0 0 5px #8cbb52 inset;
box-shadow: 0 0 5px #8cbb52 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-blue {
border: 1px solid #337ca1;
-webkit-box-shadow: inset 0 1px 2px #6eb0d1;
-moz-box-shadow: inset 0 1px 2px #6eb0d1;
box-shadow: inset 0 1px 2px #6eb0d1;
background: #3d94c0;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzViYTVjYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNkOTRjMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5ba5cb),
color-stop(100%, #3d94c0));
background-image: -webkit-linear-gradient(top, #5ba5cb, #3d94c0);
background-image: -moz-linear-gradient(top, #5ba5cb, #3d94c0);
background-image: -o-linear-gradient(top, #5ba5cb, #3d94c0);
background-image: linear-gradient(top, #5ba5cb, #3d94c0);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-blue:hover {
background: #3c91bc;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzViYTVjYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNjOTFiYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5ba5cb),
color-stop(100%, #3c91bc));
background-image: -webkit-linear-gradient(top, #5ba5cb, #3c91bc);
background-image: -moz-linear-gradient(top, #5ba5cb, #3c91bc);
background-image: -o-linear-gradient(top, #5ba5cb, #3c91bc);
background-image: linear-gradient(top, #5ba5cb, #3c91bc);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-blue:active {
background: #4c9dc6;
border-color: #31769a;
-webkit-box-shadow: 0 0 5px #4c9dc6 inset;
-moz-box-shadow: 0 0 5px #4c9dc6 inset;
box-shadow: 0 0 5px #4c9dc6 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-gray {
border: 1px solid #626e7f;
-webkit-box-shadow: inset 0 1px 2px #9aa4b1;
-moz-box-shadow: inset 0 1px 2px #9aa4b1;
box-shadow: inset 0 1px 2px #9aa4b1;
background: #758294;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzhjOTdhNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzc1ODI5NCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8c97a6),
color-stop(100%, #758294));
background-image: -webkit-linear-gradient(top, #8c97a6, #758294);
background-image: -moz-linear-gradient(top, #8c97a6, #758294);
background-image: -o-linear-gradient(top, #8c97a6, #758294);
background-image: linear-gradient(top, #8c97a6, #758294);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-gray:hover {
background: #728092;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzhjOTdhNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzcyODA5MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8c97a6),
color-stop(100%, #728092));
background-image: -webkit-linear-gradient(top, #8c97a6, #728092);
background-image: -moz-linear-gradient(top, #8c97a6, #728092);
background-image: -o-linear-gradient(top, #8c97a6, #728092);
background-image: linear-gradient(top, #8c97a6, #728092);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-gray:active {
background: #818d9d;
border-color: #5d6979;
-webkit-box-shadow: 0 0 5px #818d9d inset;
-moz-box-shadow: 0 0 5px #818d9d inset;
box-shadow: 0 0 5px #818d9d inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-black {
border: 1px solid #5a5a5a;
-webkit-box-shadow: inset 0 1px 2px #909090;
-moz-box-shadow: inset 0 1px 2px #909090;
box-shadow: inset 0 1px 2px #909090;
background: #6f6f6f;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgzODM4MyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzZmNmY2ZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #838383),
color-stop(100%, #6f6f6f));
background-image: -webkit-linear-gradient(top, #838383, #6f6f6f);
background-image: -moz-linear-gradient(top, #838383, #6f6f6f);
background-image: -o-linear-gradient(top, #838383, #6f6f6f);
background-image: linear-gradient(top, #838383, #6f6f6f);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-black:hover {
background: #6c6c6c;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgzODM4MyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzZjNmM2YyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #838383),
color-stop(100%, #6c6c6c));
background-image: -webkit-linear-gradient(top, #838383, #6c6c6c);
background-image: -moz-linear-gradient(top, #838383, #6c6c6c);
background-image: -o-linear-gradient(top, #838383, #6c6c6c);
background-image: linear-gradient(top, #838383, #6c6c6c);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-black:active {
background: #797979;
border-color: #555555;
-webkit-box-shadow: 0 0 5px #797979 inset;
-moz-box-shadow: 0 0 5px #797979 inset;
box-shadow: 0 0 5px #797979 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-lightblue {
border: 1px solid #3692bb;
-webkit-box-shadow: inset 0 1px 2px #81bfdb;
-moz-box-shadow: inset 0 1px 2px #81bfdb;
box-shadow: inset 0 1px 2px #81bfdb;
background: #4da5cc;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzZkYjVkNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRkYTVjYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6db5d5),
color-stop(100%, #4da5cc));
background-image: -webkit-linear-gradient(top, #6db5d5, #4da5cc);
background-image: -moz-linear-gradient(top, #6db5d5, #4da5cc);
background-image: -o-linear-gradient(top, #6db5d5, #4da5cc);
background-image: linear-gradient(top, #6db5d5, #4da5cc);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-lightblue:hover {
background: #49a3cb;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzZkYjVkNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQ5YTNjYiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6db5d5),
color-stop(100%, #49a3cb));
background-image: -webkit-linear-gradient(top, #6db5d5, #49a3cb);
background-image: -moz-linear-gradient(top, #6db5d5, #49a3cb);
background-image: -o-linear-gradient(top, #6db5d5, #49a3cb);
background-image: linear-gradient(top, #6db5d5, #49a3cb);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-lightblue:active {
background: #5dadd0;
border-color: #338cb3;
-webkit-box-shadow: 0 0 5px #5dadd0 inset;
-moz-box-shadow: 0 0 5px #5dadd0 inset;
box-shadow: 0 0 5px #5dadd0 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-gold {
border: 1px solid #a87a27;
-webkit-box-shadow: inset 0 1px 2px #daaf61;
-moz-box-shadow: inset 0 1px 2px #daaf61;
box-shadow: inset 0 1px 2px #daaf61;
background: #c9922f;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q1YTQ0YyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2M5OTIyZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5a44c),
color-stop(100%, #c9922f));
background-image: -webkit-linear-gradient(top, #d5a44c, #c9922f);
background-image: -moz-linear-gradient(top, #d5a44c, #c9922f);
background-image: -o-linear-gradient(top, #d5a44c, #c9922f);
background-image: linear-gradient(top, #d5a44c, #c9922f);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-gold:hover {
background: #c58f2e;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Q1YTQ0YyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2M1OGYyZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5a44c),
color-stop(100%, #c58f2e));
background-image: -webkit-linear-gradient(top, #d5a44c, #c58f2e);
background-image: -moz-linear-gradient(top, #d5a44c, #c58f2e);
background-image: -o-linear-gradient(top, #d5a44c, #c58f2e);
background-image: linear-gradient(top, #d5a44c, #c58f2e);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-gold:active {
background: #d19c3b;
border-color: #a07425;
-webkit-box-shadow: 0 0 5px #d19c3b inset;
-moz-box-shadow: 0 0 5px #d19c3b inset;
box-shadow: 0 0 5px #d19c3b inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-sea {
border: 1px solid #39534f;
-webkit-box-shadow: inset 0 1px 2px #64928d;
-moz-box-shadow: inset 0 1px 2px #64928d;
box-shadow: inset 0 1px 2px #64928d;
background: #496b67;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVhODM3ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQ5NmI2NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5a837e),
color-stop(100%, #496b67));
background-image: -webkit-linear-gradient(top, #5a837e, #496b67);
background-image: -moz-linear-gradient(top, #5a837e, #496b67);
background-image: -o-linear-gradient(top, #5a837e, #496b67);
background-image: linear-gradient(top, #5a837e, #496b67);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-sea:hover {
background: #476864;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVhODM3ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQ3Njg2NCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5a837e),
color-stop(100%, #476864));
background-image: -webkit-linear-gradient(top, #5a837e, #476864);
background-image: -moz-linear-gradient(top, #5a837e, #476864);
background-image: -o-linear-gradient(top, #5a837e, #476864);
background-image: linear-gradient(top, #5a837e, #476864);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-sea:active {
background: #527772;
border-color: #354d4a;
-webkit-box-shadow: 0 0 5px #527772 inset;
-moz-box-shadow: 0 0 5px #527772 inset;
box-shadow: 0 0 5px #527772 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-brown {
border: 1px solid #856733;
-webkit-box-shadow: inset 0 1px 2px #c29e61;
-moz-box-shadow: inset 0 1px 2px #c29e61;
box-shadow: inset 0 1px 2px #c29e61;
background: #a27e3f;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2JiOTM0ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2EyN2UzZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bb934f),
color-stop(100%, #a27e3f));
background-image: -webkit-linear-gradient(top, #bb934f, #a27e3f);
background-image: -moz-linear-gradient(top, #bb934f, #a27e3f);
background-image: -o-linear-gradient(top, #bb934f, #a27e3f);
background-image: linear-gradient(top, #bb934f, #a27e3f);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-brown:hover {
background: #9f7b3d;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2JiOTM0ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzlmN2IzZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bb934f),
color-stop(100%, #9f7b3d));
background-image: -webkit-linear-gradient(top, #bb934f, #9f7b3d);
background-image: -moz-linear-gradient(top, #bb934f, #9f7b3d);
background-image: -o-linear-gradient(top, #bb934f, #9f7b3d);
background-image: linear-gradient(top, #bb934f, #9f7b3d);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-brown:active {
background: #b18944;
border-color: #7e6131;
-webkit-box-shadow: 0 0 5px #b18944 inset;
-moz-box-shadow: 0 0 5px #b18944 inset;
box-shadow: 0 0 5px #b18944 inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-twitter {
border: 1px solid #2189ff;
-webkit-box-shadow: inset 0 1px 2px #8dc2ff;
-moz-box-shadow: inset 0 1px 2px #8dc2ff;
box-shadow: inset 0 1px 2px #8dc2ff;
background: #4a9eff;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzczYjRmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRhOWVmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #73b4ff),
color-stop(100%, #4a9eff));
background-image: -webkit-linear-gradient(top, #73b4ff, #4a9eff);
background-image: -moz-linear-gradient(top, #73b4ff, #4a9eff);
background-image: -o-linear-gradient(top, #73b4ff, #4a9eff);
background-image: linear-gradient(top, #73b4ff, #4a9eff);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-twitter:hover {
background: #459cff;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzczYjRmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzQ1OWNmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #73b4ff),
color-stop(100%, #459cff));
background-image: -webkit-linear-gradient(top, #73b4ff, #459cff);
background-image: -moz-linear-gradient(top, #73b4ff, #459cff);
background-image: -o-linear-gradient(top, #73b4ff, #459cff);
background-image: linear-gradient(top, #73b4ff, #459cff);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-twitter:active {
background: #5fa9ff;
border-color: #1783ff;
-webkit-box-shadow: 0 0 5px #5fa9ff inset;
-moz-box-shadow: 0 0 5px #5fa9ff inset;
box-shadow: 0 0 5px #5fa9ff inset;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-facebook {
border: 1px solid #2d4479;
-webkit-box-shadow: inset 0 1px 2px #5272bf;
-moz-box-shadow: inset 0 1px 2px #5272bf;
box-shadow: inset 0 1px 2px #5272bf;
background: #385496;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQzNjViNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzM4NTQ5NiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4365b4),
color-stop(100%, #385496));
background-image: -webkit-linear-gradient(top, #4365b4, #385496);
background-image: -moz-linear-gradient(top, #4365b4, #385496);
background-image: -o-linear-gradient(top, #4365b4, #385496);
background-image: linear-gradient(top, #4365b4, #385496);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-facebook:hover {
background: #365293;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQzNjViNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzM2NTI5MyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4365b4),
color-stop(100%, #365293));
background-image: -webkit-linear-gradient(top, #4365b4, #365293);
background-image: -moz-linear-gradient(top, #4365b4, #365293);
background-image: -o-linear-gradient(top, #4365b4, #365293);
background-image: linear-gradient(top, #4365b4, #365293);
-webkit-transition: box-shadow 0.05s ease-in-out;
-moz-transition: box-shadow 0.05s ease-in-out;
-o-transition: box-shadow 0.05s ease-in-out;
transition: box-shadow 0.05s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn.btn-facebook:active {
background: #3d5ca5;
border-color: #2a3f71;
-webkit-box-shadow: 0 0 5px #3d5ca5 inset;
-moz-box-shadow: 0 0 5px #3d5ca5 inset;
box-shadow: 0 0 5px #3d5ca5 inset;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-default.dropdown-toggle {
background-color: #fdfdfd;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-red.dropdown-toggle {
background-color: #c57979;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-green.dropdown-toggle {
background-color: #96c161;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-blue.dropdown-toggle {
background-color: #5ba5cb;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-gray.dropdown-toggle {
background-color: #8c97a6;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-black.dropdown-toggle {
background-color: #838383;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-lightblue.dropdown-toggle {
background-color: #6db5d5;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-gold.dropdown-toggle {
background-color: #d5a44c;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-sea.dropdown-toggle {
background-color: #5a837e;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-brown.dropdown-toggle {
background-color: #bb934f;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-twitter.dropdown-toggle {
background-color: #73b4ff;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.open .btn.btn-facebook.dropdown-toggle {
background-color: #4365b4;
}
/* line 90, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group.btn.btn-lg {
padding: 8px 10px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
button.btn {
font-weight: 600;
}
/* line 98, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group>.btn,.btn-group>.dropdown-menu {
font-size: 12px;
}
/* line 102, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.caret {
opacity: 0.6;
}
/* line 107, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-xs .caret,.btn-sm .caret,.btn-lg .caret {
margin-top: 8px;
margin-left: 4px;
}
/* line 112, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.dropdown-menu .divider {
border-top: none !important;
}
/* line 117, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn i {
vertical-align: middle;
}
/* line 126, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group>.btn:first-child {
margin-left: 0;
-moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px;
border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px;
border-bottom-left-radius: 2px;
}
/* line 133, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group>.btn:last-child,.btn-group>.dropdown-toggle {
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
-webkit-border-bottom-right-radius: 2px;
border-bottom-right-radius: 2px;
}
/* line 138, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group>.btn.large:first-child {
-moz-border-radius-topleft: 2px;
-webkit-border-top-left-radius: 2px;
border-top-left-radius: 2px;
-moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px;
border-bottom-left-radius: 2px;
}
/* line 143, /home/andrei/core-admin-release/core-admin/source/stylesheets/buttons.scss */
.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle {
-moz-border-radius-topright: 2px;
-webkit-border-top-right-radius: 2px;
border-top-right-radius: 2px;
-moz-border-radius-bottomright: 2px;
-webkit-border-bottom-right-radius: 2px;
border-bottom-right-radius: 2px;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-default a,.action-nav-normal .action-nav-button.btn-red a,.action-nav-normal .action-nav-button.btn-green a,.action-nav-normal .action-nav-button.btn-blue a,.action-nav-normal .action-nav-button.btn-gray a,.action-nav-normal .action-nav-button.btn-black a,.action-nav-normal .action-nav-button.btn-lightblue a,.action-nav-normal .action-nav-button.btn-gold a,.action-nav-normal .action-nav-button.btn-sea a,.action-nav-normal .action-nav-button.btn-brown a,.action-nav-normal .action-nav-button.btn-twitter a,.action-nav-normal .action-nav-button.btn-facebook a
{
color: #fff;
text-shadow: 0 1px rgba(51, 51, 51, 0.5);
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-default a i,.action-nav-normal .action-nav-button.btn-red a i,.action-nav-normal .action-nav-button.btn-green a i,.action-nav-normal .action-nav-button.btn-blue a i,.action-nav-normal .action-nav-button.btn-gray a i,.action-nav-normal .action-nav-button.btn-black a i,.action-nav-normal .action-nav-button.btn-lightblue a i,.action-nav-normal .action-nav-button.btn-gold a i,.action-nav-normal .action-nav-button.btn-sea a i,.action-nav-normal .action-nav-button.btn-brown a i,.action-nav-normal .action-nav-button.btn-twitter a i,.action-nav-normal .action-nav-button.btn-facebook a i
{
color: #fff;
text-shadow: 0 1px rgba(51, 51, 51, 0.5);
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-default a:active,.action-nav-normal .action-nav-button.btn-red a:active,.action-nav-normal .action-nav-button.btn-green a:active,.action-nav-normal .action-nav-button.btn-blue a:active,.action-nav-normal .action-nav-button.btn-gray a:active,.action-nav-normal .action-nav-button.btn-black a:active,.action-nav-normal .action-nav-button.btn-lightblue a:active,.action-nav-normal .action-nav-button.btn-gold a:active,.action-nav-normal .action-nav-button.btn-sea a:active,.action-nav-normal .action-nav-button.btn-brown a:active,.action-nav-normal .action-nav-button.btn-twitter a:active,.action-nav-normal .action-nav-button.btn-facebook a:active
{
-webkit-box-shadow: 0 0 2px #707070 inset, 0 1px 0 white;
-moz-box-shadow: 0 0 2px #707070 inset, 0 1px 0 white;
box-shadow: 0 0 2px #707070 inset, 0 1px 0 white;
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal {
text-align: center;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal.rounded .action-nav-button {
margin-left: 10px;
margin-right: 10px;
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal.rounded .action-nav-button a {
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
padding: 16px;
min-width: auto;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal.rounded .action-nav-button a i {
height: 40px;
line-height: 40px;
}
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button {
margin-bottom: 20px;
position: relative;
display: inline-block;
text-align: center;
padding-right: 0;
}
/* line 68, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button a {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZhZmFmYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa),
color-stop(100%, #ececec));
background-image: -webkit-linear-gradient(top, #fafafa, #ececec);
background-image: -moz-linear-gradient(top, #fafafa, #ececec);
background-image: -o-linear-gradient(top, #fafafa, #ececec);
background-image: linear-gradient(top, #fafafa, #ececec);
border: 1px solid #d5d5d5;
-webkit-box-shadow: 0 0 0 1px #fafafa inset, 0 1px 1px 0px #dddddd;
-moz-box-shadow: 0 0 0 1px #fafafa inset, 0 1px 1px 0px #dddddd;
box-shadow: 0 0 0 1px #fafafa inset, 0 1px 1px 0px #dddddd;
padding: 10px 0;
display: block;
font-weight: 600;
white-space: nowrap;
color: #626262;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 81, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button a:hover {
background: #f2f2f2;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3ZjdmNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YyZjJmMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f7f7f7),
color-stop(100%, #f2f2f2));
background-image: -webkit-linear-gradient(top, #f7f7f7, #f2f2f2);
background-image: -moz-linear-gradient(top, #f7f7f7, #f2f2f2);
background-image: -o-linear-gradient(top, #f7f7f7, #f2f2f2);
background-image: linear-gradient(top, #f7f7f7, #f2f2f2);
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button a:active {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: #f7f7f7;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y0ZjRmNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y3ZjdmNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f4f4f4),
color-stop(100%, #f7f7f7));
background-image: -webkit-linear-gradient(top, #f4f4f4, #f7f7f7);
background-image: -moz-linear-gradient(top, #f4f4f4, #f7f7f7);
background-image: -o-linear-gradient(top, #f4f4f4, #f7f7f7);
background-image: linear-gradient(top, #f4f4f4, #f7f7f7);
}
/* line 91, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button a>span {
display: block;
padding-top: 4px;
font-weight: 600;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button a>i {
font-size: 32px;
color: #808080;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-default a {
border: 1px solid #d9d9d9;
-webkit-box-shadow: 0 1px 2px 0 #f8f8f8 inset;
-moz-box-shadow: 0 1px 2px 0 #f8f8f8 inset;
box-shadow: 0 1px 2px 0 #f8f8f8 inset;
background: #d4d4d4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y4ZjhmOCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Q0ZDRkNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f8f8f8),
color-stop(100%, #d4d4d4));
background-image: -webkit-linear-gradient(top, #f8f8f8, #d4d4d4);
background-image: -moz-linear-gradient(top, #f8f8f8, #d4d4d4);
background-image: -o-linear-gradient(top, #f8f8f8, #d4d4d4);
background-image: linear-gradient(top, #f8f8f8, #d4d4d4);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-default a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-default a:active {
background: #e4e4e4;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-red a {
border: 1px solid #ac4a4a;
-webkit-box-shadow: 0 1px 2px 0 #c27272 inset;
-moz-box-shadow: 0 1px 2px 0 #c27272 inset;
box-shadow: 0 1px 2px 0 #c27272 inset;
background: #a54747;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2MyNzI3MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2E1NDc0NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c27272),
color-stop(100%, #a54747));
background-image: -webkit-linear-gradient(top, #c27272, #a54747);
background-image: -moz-linear-gradient(top, #c27272, #a54747);
background-image: -o-linear-gradient(top, #c27272, #a54747);
background-image: linear-gradient(top, #c27272, #a54747);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-red a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-red a:active {
background: #b65555;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-green a {
border: 1px solid #729d3e;
-webkit-box-shadow: 0 1px 2px 0 #91be5a inset;
-moz-box-shadow: 0 1px 2px 0 #91be5a inset;
box-shadow: 0 1px 2px 0 #91be5a inset;
background: #6d963b;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkxYmU1YSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzZkOTYzYiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #91be5a),
color-stop(100%, #6d963b));
background-image: -webkit-linear-gradient(top, #91be5a, #6d963b);
background-image: -moz-linear-gradient(top, #91be5a, #6d963b);
background-image: -o-linear-gradient(top, #91be5a, #6d963b);
background-image: linear-gradient(top, #91be5a, #6d963b);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-green a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-green a:active {
background: #7dac43;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-blue a {
border: 1px solid #3682a9;
-webkit-box-shadow: 0 1px 2px 0 #53a1c9 inset;
-moz-box-shadow: 0 1px 2px 0 #53a1c9 inset;
box-shadow: 0 1px 2px 0 #53a1c9 inset;
background: #337ca1;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzUzYTFjOSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzMzN2NhMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #53a1c9),
color-stop(100%, #337ca1));
background-image: -webkit-linear-gradient(top, #53a1c9, #337ca1);
background-image: -moz-linear-gradient(top, #53a1c9, #337ca1);
background-image: -o-linear-gradient(top, #53a1c9, #337ca1);
background-image: linear-gradient(top, #53a1c9, #337ca1);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-blue a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-blue a:active {
background: #3b8eb8;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-gray a {
border: 1px solid #667384;
-webkit-box-shadow: 0 1px 2px 0 #8692a2 inset;
-moz-box-shadow: 0 1px 2px 0 #8692a2 inset;
box-shadow: 0 1px 2px 0 #8692a2 inset;
background: #626e7f;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzg2OTJhMiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzYyNmU3ZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8692a2),
color-stop(100%, #626e7f));
background-image: -webkit-linear-gradient(top, #8692a2, #626e7f);
background-image: -moz-linear-gradient(top, #8692a2, #626e7f);
background-image: -o-linear-gradient(top, #8692a2, #626e7f);
background-image: linear-gradient(top, #8692a2, #626e7f);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-gray a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-gray a:active {
background: #6f7d90;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-black a {
border: 1px solid #5f5f5f;
-webkit-box-shadow: 0 1px 2px 0 #7e7e7e inset;
-moz-box-shadow: 0 1px 2px 0 #7e7e7e inset;
box-shadow: 0 1px 2px 0 #7e7e7e inset;
background: #5a5a5a;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdlN2U3ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzVhNWE1YSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7e7e7e),
color-stop(100%, #5a5a5a));
background-image: -webkit-linear-gradient(top, #7e7e7e, #5a5a5a);
background-image: -moz-linear-gradient(top, #7e7e7e, #5a5a5a);
background-image: -o-linear-gradient(top, #7e7e7e, #5a5a5a);
background-image: linear-gradient(top, #7e7e7e, #5a5a5a);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-black a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-black a:active {
background: #6a6a6a;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-lightblue a {
border: 1px solid #3898c3;
-webkit-box-shadow: 0 1px 2px 0 #65b1d3 inset;
-moz-box-shadow: 0 1px 2px 0 #65b1d3 inset;
box-shadow: 0 1px 2px 0 #65b1d3 inset;
background: #3692bb;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzY1YjFkMyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzM2OTJiYiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #65b1d3),
color-stop(100%, #3692bb));
background-image: -webkit-linear-gradient(top, #65b1d3, #3692bb);
background-image: -moz-linear-gradient(top, #65b1d3, #3692bb);
background-image: -o-linear-gradient(top, #65b1d3, #3692bb);
background-image: linear-gradient(top, #65b1d3, #3692bb);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-lightblue a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-lightblue a:active {
background: #45a1ca;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-gold a {
border: 1px solid #b08029;
-webkit-box-shadow: 0 1px 2px 0 #d3a044 inset;
-moz-box-shadow: 0 1px 2px 0 #d3a044 inset;
box-shadow: 0 1px 2px 0 #d3a044 inset;
background: #a87a27;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2QzYTA0NCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2E4N2EyNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d3a044),
color-stop(100%, #a87a27));
background-image: -webkit-linear-gradient(top, #d3a044, #a87a27);
background-image: -moz-linear-gradient(top, #d3a044, #a87a27);
background-image: -o-linear-gradient(top, #d3a044, #a87a27);
background-image: linear-gradient(top, #d3a044, #a87a27);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-gold a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-gold a:active {
background: #c18c2d;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-sea a {
border: 1px solid #3d5955;
-webkit-box-shadow: 0 1px 2px 0 #567d78 inset;
-moz-box-shadow: 0 1px 2px 0 #567d78 inset;
box-shadow: 0 1px 2px 0 #567d78 inset;
background: #39534f;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzU2N2Q3OCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzM5NTM0ZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #567d78),
color-stop(100%, #39534f));
background-image: -webkit-linear-gradient(top, #567d78, #39534f);
background-image: -moz-linear-gradient(top, #567d78, #39534f);
background-image: -o-linear-gradient(top, #567d78, #39534f);
background-image: linear-gradient(top, #567d78, #39534f);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-sea a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-sea a:active {
background: #456561;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-brown a {
border: 1px solid #8c6c36;
-webkit-box-shadow: 0 1px 2px 0 #b88e48 inset;
-moz-box-shadow: 0 1px 2px 0 #b88e48 inset;
box-shadow: 0 1px 2px 0 #b88e48 inset;
background: #856733;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2I4OGU0OCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzg1NjczMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b88e48),
color-stop(100%, #856733));
background-image: -webkit-linear-gradient(top, #b88e48, #856733);
background-image: -moz-linear-gradient(top, #b88e48, #856733);
background-image: -o-linear-gradient(top, #b88e48, #856733);
background-image: linear-gradient(top, #b88e48, #856733);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-brown a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-brown a:active {
background: #9b783c;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-twitter a {
border: 1px solid #2c8eff;
-webkit-box-shadow: 0 1px 2px 0 #69afff inset;
-moz-box-shadow: 0 1px 2px 0 #69afff inset;
box-shadow: 0 1px 2px 0 #69afff inset;
background: #2189ff;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzY5YWZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIxODlmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #69afff),
color-stop(100%, #2189ff));
background-image: -webkit-linear-gradient(top, #69afff, #2189ff);
background-image: -moz-linear-gradient(top, #69afff, #2189ff);
background-image: -o-linear-gradient(top, #69afff, #2189ff);
background-image: linear-gradient(top, #69afff, #2189ff);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-twitter a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-twitter a:active {
background: #4099ff;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-facebook a {
border: 1px solid #2f4880;
-webkit-box-shadow: 0 1px 2px 0 #4061ad inset;
-moz-box-shadow: 0 1px 2px 0 #4061ad inset;
box-shadow: 0 1px 2px 0 #4061ad inset;
background: #2d4479;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQwNjFhZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzJkNDQ3OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4061ad),
color-stop(100%, #2d4479));
background-image: -webkit-linear-gradient(top, #4061ad, #2d4479);
background-image: -moz-linear-gradient(top, #4061ad, #2d4479);
background-image: -o-linear-gradient(top, #4061ad, #2d4479);
background-image: linear-gradient(top, #4061ad, #2d4479);
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-facebook a:hover {
opacity: 0.95;
-webkit-transition: opacity 0.2s ease-in-out;
-moz-transition: opacity 0.2s ease-in-out;
-o-transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .action-nav-button.btn-facebook a:active {
background: #35508f;
}
/* line 115, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .badge,.action-nav-normal .label {
position: absolute;
top: 3px;
right: 3px;
padding: 3px 5px;
display: block;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* line 125, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal.action-nav-line .action-nav-row {
margin-right: 0;
}
/* line 130, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .triangle-button {
border-top-right-radius: 3px;
pointer-events: none;
}
/* line 134, /home/andrei/core-admin-release/core-admin/source/stylesheets/action_nav.scss */
.action-nav-normal .triangle-button i {
right: 4px;
top: 3px;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats .glyph {
padding: 0;
background: #86B6DA;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
border: 1px solid #5F9FCE;
height: 32px;
width: 32px;
text-align: center;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats .glyph i {
color: white;
line-height: 29px;
}
/* line 20, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats .count {
font-size: 28px;
line-height: 28px;
height: 28px;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats ul.inline li {
vertical-align: middle;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats .stats-label {
color: #999999;
font-weight: 600;
text-transform: uppercase;
margin-top: 5px;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats.small .glyph {
height: 24px;
width: 24px;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats.small .glyph i {
line-height: 23px;
}
/* line 48, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats.small .count {
font-size: 16px;
line-height: 16px;
height: 16px;
}
/* line 55, /home/andrei/core-admin-release/core-admin/source/stylesheets/stats.scss */
.dashboard-stats .progress {
margin-bottom: 0;
height: 5px;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-container {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
height: 24px;
cursor: pointer;
overflow: hidden;
/* set max width to that of sprite */
max-width: 400px;
/* prevent text selection */
-khtml-user-select: none;
-o-user-select: none;
-moz-user-select: none;
-moz-user-focus: ignore;
-moz-user-input: disabled;
/* set default width based on ON/OFF labels */
width: 80px;
}
/* line 8, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-container * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* line 23, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-container input {
position: absolute;
top: 0;
left: 0;
/* hide the element */
filter: alpha(opacity = 0);
-moz-opacity: 0.0;
opacity: 0.0;
/* allow checking of input if visible */
-moz-user-input: enabled !important;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-container i {
position: relative;
top: -2px;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-handle {
display: block;
height: 24px;
cursor: inherit;
position: absolute;
top: 0;
left: 0;
width: 0;
background: red;
z-index: 3;
/* set default width based on ON/OFF labels */
width: 30px;
}
/* line 55, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-handle-right {
display: none;
height: 100%;
width: 100%;
padding-right: 3px;
background: blue;
z-index: 3;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-handle-middle {
height: 100%;
width: 100%;
background: green;
z-index: 3;
}
/* line 71, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-on,.ibutton-label-off {
white-space: nowrap;
font-size: 17px;
line-height: 17px;
font-weight: 600;
font-family: Helvetica Neue, Arial, Helvetica, sans-serif;
text-transform: uppercase;
cursor: inherit;
display: block;
height: 22px;
position: absolute;
width: auto;
top: 0;
overflow: hidden;
height: 24px;
}
/* line 87, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-on span,.ibutton-label-off span {
display: inline-block;
text-align: center;
position: absolute;
}
/* line 93, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-on label,.ibutton-label-off label {
padding: 0;
margin: 0;
height: 24px;
line-height: 26px;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-on {
background: blue;
color: #fff;
text-shadow: 0 -1px 2px rgba(0, 0, 0, 0.4);
left: 0;
z-index: 1;
}
/* line 108, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-on span {
left: 0px;
right: 4px;
}
/* line 114, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-off {
background: yellow;
color: #7c7c7c;
background-position: 100% 0;
text-shadow: 0 -1px 2px rgba(153, 153, 153, 0.4);
text-align: right;
width: 100%;
}
/* line 121, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-off span {
right: 0;
padding-right: 6px;
}
/* create an outline when button gets focus via keyboard */
/* line 129, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-container label {
cursor: inherit;
padding: 0px 3px;
font-size: 1em !important;
}
/* line 136, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-focus label {
/* we must use border, since outline doesn't work in IE */
border: 1px dotted #666 !important;
padding: 0 2px;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-focus div.ibutton-label-on span label {
/* use white for more contrast */
border-color: #fff !important;
}
/* add padding to right/left so that text gets clipped before absolute edge */
/* line 149, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-padding-left,.ibutton-padding-right {
display: none;
position: absolute;
top: 4px;
z-index: 2;
width: 3px;
height: 20px;
}
/* line 158, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-padding-left {
left: 0;
}
/* line 162, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-padding-right {
right: 0;
background-position: 100% -4px;
}
/* change the styles of the handle when being dragged */
/* styles to use when the button is disabled */
/* line 171, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled {
cursor: not-allowed !important;
/* cursor options: default or not-allowed */
}
/* line 174, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled .ibutton-handle {
background-position: 0 -81px;
}
/* line 177, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled .ibutton-handle-right {
background-position: 100% -81px;
}
/* line 180, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled .ibutton-handle-middle {
background-position: 50% -81px;
}
/* line 184, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled div.ibutton-label-on {
background-position: 0 -27px;
}
/* line 187, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled div.ibutton-label-off {
background-position: 100% -27px;
}
/* line 191, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled .ibutton-padding-left {
background-position: 0 -27px;
}
/* line 194, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled .ibutton-padding-right {
background-position: 100% -27px;
}
/* line 198, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled div.ibutton-label-on {
color: #fff;
}
/* line 201, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-disabled div.ibutton-label-off {
color: #cbcbcb;
}
/* line 209, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-off,.ibutton-label-on {
-webkit-box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.3) inset;
-moz-box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.3) inset;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.3) inset;
}
/* line 211, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-off label,.ibutton-label-on label {
color: white;
text-shadow: 0 1px rgba(0, 0, 0, 0.5);
}
/* line 217, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-on {
background: #7fb3d4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E1Y2FlMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdmYjNkNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a5cae1),
color-stop(100%, #7fb3d4));
background-image: -webkit-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: -moz-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: -o-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: linear-gradient(top, #a5cae1, #7fb3d4);
-moz-border-radius-topleft: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px;
}
/* line 223, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-label-off {
-moz-border-radius-topright: 3px;
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
-moz-border-radius-bottomright: 3px;
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
background: #e49181;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RjN2U2ZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U0OTE4MSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dc7e6f),
color-stop(100%, #e49181));
background-image: -webkit-linear-gradient(top, #dc7e6f, #e49181);
background-image: -moz-linear-gradient(top, #dc7e6f, #e49181);
background-image: -o-linear-gradient(top, #dc7e6f, #e49181);
background-image: linear-gradient(top, #dc7e6f, #e49181);
}
/* line 229, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-handle {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
border: 1px solid #8F8F8F;
background: #ebebeb;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ViZWJlYiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #ebebeb));
background-image: -webkit-linear-gradient(top, #fdfdfd, #ebebeb);
background-image: -moz-linear-gradient(top, #fdfdfd, #ebebeb);
background-image: -o-linear-gradient(top, #fdfdfd, #ebebeb);
background-image: linear-gradient(top, #fdfdfd, #ebebeb);
}
/* line 235, /home/andrei/core-admin-release/core-admin/source/stylesheets/ibutton.scss */
.ibutton-container {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
/* line 16, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress {
height: 8px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-ms-border-radius: 8px;
-o-border-radius: 8px;
border-radius: 8px;
background: #eee;
-webkit-box-shadow: 0 1px 0 white, 0 0px 0 1px rgba(0, 0, 0, 0.1) inset,
0 1px 4px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0 1px 0 white, 0 0px 0 1px rgba(0, 0, 0, 0.1) inset, 0 1px
4px rgba(0, 0, 0, 0.2) inset;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress .progress-bar {
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
-ms-border-radius: 8px;
-o-border-radius: 8px;
border-radius: 8px;
-webkit-box-shadow: none;
box-shadow: none;
height: 100%;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-green {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#b2cb49),
to(#97af32));
background-image: -webkit-linear-gradient(top, #b2cb49, 0%, #97af32, 100%);
background-image: -moz-linear-gradient(top, #b2cb49 0%, #97af32 100%);
background-image: linear-gradient(to bottom, #b2cb49 0%, #97af32 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFB2CB49',
endColorstr='#FF97AF32', GradientType=0);
border: 1px solid #869b2c;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-striped .progress-green {
background-color: #b2cb49;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255,
255, 0.15)), color-stop(0.25, transparent),
color-stop(0.5, transparent),
color-stop(0.5, rgba(255, 255, 255, 0.15)),
color-stop(0.75, rgba(255, 255, 255, 0.15)),
color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%,
transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-blue {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#9bcff5),
to(#6db9f0));
background-image: -webkit-linear-gradient(top, #9bcff5, 0%, #6db9f0, 100%);
background-image: -moz-linear-gradient(top, #9bcff5 0%, #6db9f0 100%);
background-image: linear-gradient(to bottom, #9bcff5 0%, #6db9f0 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF9BCFF5',
endColorstr='#FF6DB9F0', GradientType=0);
border: 1px solid #55aeee;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-striped .progress-blue {
background-color: #9bcff5;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255,
255, 0.15)), color-stop(0.25, transparent),
color-stop(0.5, transparent),
color-stop(0.5, rgba(255, 255, 255, 0.15)),
color-stop(0.75, rgba(255, 255, 255, 0.15)),
color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%,
transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-orange {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dc9e6f),
to(#d28346));
background-image: -webkit-linear-gradient(top, #dc9e6f, 0%, #d28346, 100%);
background-image: -moz-linear-gradient(top, #dc9e6f 0%, #d28346 100%);
background-image: linear-gradient(to bottom, #dc9e6f 0%, #d28346 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFDC9E6F',
endColorstr='#FFD28346', GradientType=0);
border: 1px solid #cd7532;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-striped .progress-orange {
background-color: #dc9e6f;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255,
255, 0.15)), color-stop(0.25, transparent),
color-stop(0.5, transparent),
color-stop(0.5, rgba(255, 255, 255, 0.15)),
color-stop(0.75, rgba(255, 255, 255, 0.15)),
color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%,
transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-black {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#666666),
to(#4c4c4c));
background-image: -webkit-linear-gradient(top, #666666, 0%, #4c4c4c, 100%);
background-image: -moz-linear-gradient(top, #666666 0%, #4c4c4c 100%);
background-image: linear-gradient(to bottom, #666666 0%, #4c4c4c 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF666666',
endColorstr='#FF4C4C4C', GradientType=0);
border: 1px solid #3f3f3f;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-striped .progress-black {
background-color: #666666;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255,
255, 0.15)), color-stop(0.25, transparent),
color-stop(0.5, transparent),
color-stop(0.5, rgba(255, 255, 255, 0.15)),
color-stop(0.75, rgba(255, 255, 255, 0.15)),
color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%,
transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-red {
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d47775),
to(#c8514e));
background-image: -webkit-linear-gradient(top, #d47775, 0%, #c8514e, 100%);
background-image: -moz-linear-gradient(top, #d47775 0%, #c8514e 100%);
background-image: linear-gradient(to bottom, #d47775 0%, #c8514e 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFD47775',
endColorstr='#FFC8514E', GradientType=0);
border: 1px solid #c13f3c;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/content_progress.scss */
.progress-striped .progress-red {
background-color: #d47775;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255,
255, 0.15)), color-stop(0.25, transparent),
color-stop(0.5, transparent),
color-stop(0.5, rgba(255, 255, 255, 0.15)),
color-stop(0.75, rgba(255, 255, 255, 0.15)),
color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15)
25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%,
transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%,
rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
/* line 2, /home/andrei/core-admin-release/core-admin/source/stylesheets/charts.scss */
.sine-chart {
height: 186px;
}
/*
Version: 3.4.0 Timestamp: Tue May 14 08:27:33 PDT 2013
*/
/* line 7, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container {
margin: 0;
position: relative;
display: inline-block;
/* inline-block for ie7 */
zoom: 1;
*display: inline;
vertical-align: middle;
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */
}
/* line 33, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop {
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search {
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search input {
/*
Force border-box so that % widths fit the parent
container without overlap because of margin/padding.
More Info : http://www.quirksmode.org/css/box.html
*/
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */
}
/* line 90, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice {
display: block;
height: 26px;
padding: 0 0 0 8px;
overflow: hidden;
position: relative;
border: 1px solid #aaa;
white-space: nowrap;
line-height: 26px;
color: #444;
text-decoration: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: #fff;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee),
color-stop(0.5, white));
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 50%);
background-image: -ms-linear-gradient(top, white 0%, #eeeeee 50%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= '#ffffff',
endColorstr= '#eeeeee', GradientType= 0);
background-image: linear-gradient(top, #ffffff 0%, #eeeeee 50%);
}
/* line 122, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container.select2-drop-above .select2-choice {
border-bottom-color: #aaa;
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee),
color-stop(0.9, white));
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
background-image: -ms-linear-gradient(top, #eeeeee 0%, white 90%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',
endColorstr='#eeeeee', GradientType=0);
background-image: linear-gradient(top, #eeeeee 0%, #ffffff 90%);
}
/* line 135, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container.select2-allowclear .select2-choice span {
margin-right: 42px;
}
/* line 139, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice span {
margin-right: 26px;
display: block;
overflow: hidden;
white-space: nowrap;
-ms-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
/* line 148, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice abbr {
display: none;
width: 12px;
height: 12px;
position: absolute;
right: 24px;
top: 8px;
font-size: 1px;
text-decoration: none;
border: 0;
background: url("../images/select2.png") right top no-repeat;
cursor: pointer;
outline: 0;
}
/* line 163, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container.select2-allowclear .select2-choice abbr {
display: inline-block;
}
/* line 166, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice abbr:hover {
background-position: right -11px;
cursor: pointer;
}
/* line 172, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop-mask {
position: absolute;
left: 0;
top: 0;
z-index: 9998;
}
/* line 179, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop {
width: 100%;
margin-top: -1px;
position: absolute;
z-index: 9999;
top: 100%;
background: #fff;
color: #000;
border: 1px solid #aaa;
border-top: 0;
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
}
/* line 197, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop-auto-width {
border-top: 1px solid #aaa;
width: auto;
}
/* line 200, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop-auto-width .select2-search {
padding-top: 4px;
}
/* line 205, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop.select2-drop-above {
margin-top: 1px;
border-top: 1px solid #aaa;
border-bottom: 0;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
box-shadow: 0 -4px 5px rgba(0, 0, 0, 0.15);
}
/* line 217, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice div {
display: inline-block;
width: 18px;
height: 100%;
position: absolute;
right: 0;
top: 0;
border-left: 1px solid #aaa;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
background: #ccc;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #cccccc),
color-stop(0.6, #eeeeee));
background-image: -webkit-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%);
background-image: -moz-linear-gradient(center bottom, #cccccc 0%, #eeeeee 60%);
background-image: -o-linear-gradient(bottom, #cccccc 0%, #eeeeee 60%);
background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr= '#eeeeee',
endColorstr= '#cccccc', GradientType= 0);
background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
}
/* line 239, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice div b {
display: block;
width: 100%;
height: 100%;
background: url("../images/select2.png") no-repeat 0 1px;
}
/* line 247, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search {
display: inline-block;
width: 100%;
min-height: 26px;
margin: 0;
padding-left: 4px;
padding-right: 4px;
position: relative;
z-index: 10000;
white-space: nowrap;
}
/* line 257, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search input {
width: 100%;
height: auto !important;
min-height: 26px;
padding: 4px 20px 4px 5px;
margin: 0;
outline: 0;
font-family: sans-serif;
font-size: 1em;
border: 1px solid #aaa;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: white url("../images/select2.png") no-repeat 100% -22px;
background: url("../images/select2.png") no-repeat 100% -22px,
-webkit-gradient(linear, left bottom, left top, color-stop(0.85, white),
color-stop(0.99, #eeeeee));
background: url("../images/select2.png") no-repeat 100% -22px,
-webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
background: url("../images/select2.png") no-repeat 100% -22px,
-moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
background: url("../images/select2.png") no-repeat 100% -22px,
-o-linear-gradient(bottom, white 85%, #eeeeee 99%);
background: url("../images/select2.png") no-repeat 100% -22px,
-ms-linear-gradient(top, white 85%, #eeeeee 99%);
background: url("../images/select2.png") no-repeat 100% -22px,
linear-gradient(top, #ffffff 85%, #eeeeee 99%);
}
/* line 283, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-drop.select2-drop-above .select2-search input {
margin-top: 4px;
}
/* line 287, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search input.select2-active {
background: white url("../images/select2-spinner.gif") no-repeat 100%;
background: url("../images/select2-spinner.gif") no-repeat 100%,
-webkit-gradient(linear, left bottom, left top, color-stop(0.85, white),
color-stop(0.99, #eeeeee));
background: url("../images/select2-spinner.gif") no-repeat 100%,
-webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
background: url("../images/select2-spinner.gif") no-repeat 100%,
-moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
background: url("../images/select2-spinner.gif") no-repeat 100%,
-o-linear-gradient(bottom, white 85%, #eeeeee 99%);
background: url("../images/select2-spinner.gif") no-repeat 100%,
-ms-linear-gradient(top, white 85%, #eeeeee 99%);
background: url("../images/select2-spinner.gif") no-repeat 100%,
linear-gradient(top, #ffffff 85%, #eeeeee 99%);
}
/* line 298, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-active .select2-choice,.select2-container-active .select2-choices
{
border: 1px solid #5897fb;
outline: none;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
/* line 308, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-dropdown-open .select2-choice {
border-bottom-color: transparent;
-webkit-box-shadow: 0 1px 0 #fff inset;
-moz-box-shadow: 0 1px 0 #fff inset;
box-shadow: 0 1px 0 #fff inset;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius-bottomleft: 0;
border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-moz-border-radius-bottomright: 0;
border-bottom-right-radius: 0;
background-color: #eee;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white),
color-stop(0.5, #eeeeee));
background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
background-image: -ms-linear-gradient(top, white 0%, #eeeeee 50%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',
endColorstr='#ffffff', GradientType=0);
background-image: linear-gradient(top, #ffffff 0%, #eeeeee 50%);
}
/* line 329, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices
{
border: 1px solid #5897fb;
border-top-color: transparent;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, white),
color-stop(0.5, #eeeeee));
background-image: -webkit-linear-gradient(center top, white 0%, #eeeeee 50%);
background-image: -moz-linear-gradient(center top, white 0%, #eeeeee 50%);
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: -ms-linear-gradient(bottom, white 0%, #eeeeee 50%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',
endColorstr='#ffffff', GradientType=0);
background-image: linear-gradient(bottom, #ffffff 0%, #eeeeee 50%);
}
/* line 341, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-dropdown-open .select2-choice div {
background: transparent;
border-left: none;
filter: none;
}
/* line 345, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-dropdown-open .select2-choice div b {
background-position: -18px 1px;
}
/* results */
/* line 353, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results {
max-height: 200px;
padding: 0 0 0 4px;
margin: 4px 4px 4px 0;
position: relative;
overflow-x: hidden;
overflow-y: auto;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* line 361, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub {
margin: 0;
padding-left: 0;
}
/* line 364, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub>li .select2-result-label {
padding-left: 20px;
}
/* line 368, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub ul.select2-result-sub>li .select2-result-label
{
padding-left: 40px;
}
/* line 372, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label
{
padding-left: 60px;
}
/* line 376, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label
{
padding-left: 80px;
}
/* line 380, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label
{
padding-left: 100px;
}
/* line 384, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label
{
padding-left: 110px;
}
/* line 387, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label
{
padding-left: 120px;
}
/* line 396, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results li {
list-style: none;
display: list-item;
background-image: none;
}
/* line 400, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results li.select2-result-with-children>.select2-result-label {
font-weight: bold;
}
/* line 404, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-result-label {
padding: 3px 7px 4px;
margin: 0;
cursor: pointer;
min-height: 1em;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* line 416, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-highlighted {
background: #3875d7;
color: #fff;
}
/* line 420, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results li em {
background: #feffde;
font-style: normal;
}
/* line 425, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-highlighted em {
background: transparent;
}
/* line 428, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-highlighted ul {
background: white;
color: #000;
}
/* line 433, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit
{
background: #f4f4f4;
display: list-item;
}
/* line 437, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-disabled {
background: #f4f4f4;
display: list-item;
cursor: default;
}
/* line 438, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-disabled.select2-highlighted {
color: #666;
background: #f4f4f4;
display: list-item;
cursor: default;
}
/* line 448, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-results .select2-selected {
display: none;
}
/*
disabled look for disabled choices in the results dropdown
*/
/* line 457, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-more-results {
background: #f4f4f4;
display: list-item;
}
/* line 458, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-more-results.select2-active {
background: #f4f4f4 url("../images/select2-spinner.gif") no-repeat 100%;
}
/* disabled styles */
/* line 467, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container.select2-container-disabled .select2-choice {
background-color: #f4f4f4;
background-image: none;
border: 1px solid #ddd;
cursor: default;
}
/* line 472, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container.select2-container-disabled .select2-choice div {
background-color: #f4f4f4;
background-image: none;
border-left: 0;
}
/* line 477, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container.select2-container-disabled .select2-choice abbr {
display: none;
}
/* multiselect */
/* line 484, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices {
height: auto !important;
height: 1%;
margin: 0;
padding: 0;
position: relative;
border: 1px solid #aaa;
cursor: text;
overflow: hidden;
background-color: #fff;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee),
color-stop(15%, white));
background-image: -webkit-linear-gradient(top, #eeeeee 1%, white 15%);
background-image: -moz-linear-gradient(top, #eeeeee 1%, white 15%);
background-image: -o-linear-gradient(top, #eeeeee 1%, white 15%);
background-image: -ms-linear-gradient(top, #eeeeee 1%, white 15%);
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
}
/* line 502, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-locked {
padding: 3px 5px 3px 5px !important;
}
/* line 507, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices {
min-height: 26px;
}
/* line 510, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #5897fb;
outline: none;
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
/* line 518, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices li {
float: left;
list-style: none;
}
/* line 522, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-field {
margin: 0;
padding: 0;
white-space: nowrap;
}
/* line 526, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-field input {
padding: 5px;
margin: 1px 0;
font-family: sans-serif;
font-size: 100%;
color: #666;
outline: 0;
border: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: transparent !important;
}
/* line 538, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-field input.select2-active
{
background: white url("../images/select2-spinner.gif") no-repeat 100%
!important;
}
/* line 546, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-default {
color: #999 !important;
}
/* line 551, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-choice {
padding: 3px 5px 3px 18px;
margin: 3px 0 3px 5px;
position: relative;
line-height: 13px;
color: #333;
cursor: default;
border: 1px solid #aaaaaa;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: #e4e4e4;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',
endColorstr='#f4f4f4', GradientType=0);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4),
color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8),
color-stop(100%, #eeeeee));
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%,
#eeeeee 100%);
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee
100%);
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee
100%);
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee
100%);
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%
);
}
/* line 582, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-choice span {
cursor: default;
}
/* line 586, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-choice-focus {
background: #d4d4d4;
}
/* line 591, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search-choice-close {
display: block;
width: 12px;
height: 13px;
position: absolute;
right: 3px;
top: 4px;
font-size: 1px;
outline: none;
background: url("../images/select2.png") right top no-repeat;
}
/* line 604, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-search-choice-close {
left: 3px;
}
/* line 608, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover,.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close
{
background-position: right -11px;
}
/* line 612, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi.select2-container-disabled .select2-choices {
background-color: #f4f4f4;
background-image: none;
border: 1px solid #ddd;
cursor: default;
}
/* line 617, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice
{
padding: 3px 5px 3px 5px;
border: 1px solid #ddd;
background-image: none;
background-color: #f4f4f4;
}
/* line 622, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close
{
display: none;
background: none;
}
/* disabled styles */
/* end multiselect */
/* line 634, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match
{
text-decoration: underline;
}
/* line 638, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-offscreen {
clip: rect(0, 0, 0, 0);
width: 1px;
height: 1px;
border: 0;
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
outline: 0;
left: 0px;
}
/* line 649, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-offscreen:focus {
clip: rect(0, 0, 0, 0);
width: 1px;
height: 1px;
border: 0;
margin: 0;
padding: 0;
overflow: hidden;
position: absolute;
outline: 0;
left: 0px;
}
/* line 663, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-display-none {
display: none;
}
/* line 667, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-measure-scrollbar {
position: absolute;
top: -10000px;
left: -10000px;
width: 100px;
height: 100px;
overflow: scroll;
}
/* Retina-ize icons */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) , only
screen and (min-resolution: 144dpi) {
/* line 679, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search input,.select2-search-choice-close {
background-image: url("../images/select2x2.png") !important;
background-repeat: no-repeat !important;
background-size: 60px 40px !important;
}
/* line 685, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-container .select2-choice abbr,.select2-container .select2-choice div b
{
background-image: url("../images/select2x2.png") !important;
background-repeat: no-repeat !important;
background-size: 60px 40px !important;
}
/* line 691, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2.scss */
.select2-search input {
background-position: 100% -21px !important;
}
}
/* \f020 doesn't work in Safari. all shifted one down */
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container {
width: 100% !important;
}
/* line 12, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container .select2-choice {
border: 1px solid #ccc;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
-ms-border-radius: 0px;
-o-border-radius: 0px;
border-radius: 0px;
background: whitesmoke;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y1ZjVmNSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),
color-stop(100%, #f5f5f5));
background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
background-image: linear-gradient(top, #ffffff, #f5f5f5);
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container.select2-drop-above .select2-choice {
border-bottom-color: #d2d2d2;
-webkit-border-radius: 0 0 0px 0px;
-moz-border-radius: 0 0 0px 0px;
-ms-border-radius: 0 0 0px 0px;
-o-border-radius: 0 0 0px 0px;
border-radius: 0 0 0px 0px;
background: whitesmoke;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y1ZjVmNSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),
color-stop(100%, #f5f5f5));
background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
background-image: linear-gradient(top, #ffffff, #f5f5f5);
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-default {
color: #666 !important;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-results .select2-highlighted {
background: #519FC7;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-drop {
border: 1px solid #d2d2d2;
border-top: 0;
-webkit-border-radius: 0 0 0px 0px;
-moz-border-radius: 0 0 0px 0px;
-ms-border-radius: 0 0 0px 0px;
-o-border-radius: 0 0 0px 0px;
border-radius: 0 0 0px 0px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-drop.select2-drop-above {
border-top: 1px solid #d2d2d2;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0px 0px 0 0;
-moz-border-radius: 0px 0px 0 0;
-ms-border-radius: 0px 0px 0 0;
-o-border-radius: 0px 0px 0 0;
border-radius: 0px 0px 0 0;
}
/* line 47, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container .select2-choice {
color: #666666;
height: 28px;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container .select2-choice div {
border-left: 1px solid transparent;
-webkit-border-radius: 0 0px 0px 0;
-moz-border-radius: 0 0px 0px 0;
-ms-border-radius: 0 0px 0px 0;
-o-border-radius: 0 0px 0px 0;
border-radius: 0 0px 0px 0;
background: transparent;
width: 20px;
}
/* line 59, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-search input {
border: 1px solid #ccc;
background: #fff;
}
/* line 65, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-search input.select2-active {
background: white url("../images/loading.gif") no-repeat 100%;
}
/* line 70, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container-active .select2-choice,.select2-container-active .select2-choices
{
border: 1px solid #bbb;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-dropdown-open .select2-choice {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: #fff;
}
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container-multi .select2-choices {
background: #fff;
border: 1px solid #d2d2d2;
}
/* line 89, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container-multi.select2-container-active .select2-choices {
border: 1px solid #d2d2d2;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/select2_overrides.scss */
.select2-container-multi .select2-choices .select2-search-choice {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: #f2f2f2;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZjZmNmYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YyZjJmMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fcfcfc),
color-stop(100%, #f2f2f2));
background-image: -webkit-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: -moz-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: -o-linear-gradient(top, #fcfcfc, #f2f2f2);
background-image: linear-gradient(top, #fcfcfc, #f2f2f2);
border: 1px solid #d2d2d2;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider {
position: relative;
text-align: left;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider .ui-slider-handle {
position: absolute;
z-index: 2;
width: 16px;
height: 16px;
cursor: default;
border: none;
cursor: pointer;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider .ui-slider-range {
position: absolute;
z-index: 1;
height: 6px;
font-size: .7em;
display: block;
border: 1px solid #5ba8e1;
box-shadow: 0 1px 0 #aad6f6 inset;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-khtml-border-radius: 6px;
border-radius: 6px;
background: #81b8f3;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EwZDRmNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgxYjhmMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a0d4f5),
color-stop(100%, #81b8f3));
background-image: -webkit-linear-gradient(top, #a0d4f5, #81b8f3);
background-image: -moz-linear-gradient(top, #a0d4f5, #81b8f3);
background-image: -o-linear-gradient(top, #a0d4f5, #81b8f3);
background-image: linear-gradient(top, #a0d4f5, #81b8f3);
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 32, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-horizontal {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 4px;
background: #d7d7d7;
border: 1px solid #bababa;
box-shadow: 0 1px 0 #fff, 0 1px 0 #cfcfcf inset;
clear: both;
margin: 8px 0;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
}
/* line 42, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-horizontal .ui-slider-handle {
top: -6px;
margin-left: -0.6em;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-horizontal .ui-slider-range {
top: -1px;
height: 100%;
}
/* line 50, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-horizontal .ui-slider-range-min {
left: 0;
}
/* line 53, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-horizontal .ui-slider-range-max {
right: 0;
}
/* line 59, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-vertical .ui-slider-handle {
left: -6px;
margin-left: 0;
margin-bottom: -0.6em;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-vertical .ui-slider-range {
left: 0;
width: 4px;
background: #81b8f3;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EwZDRmNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgxYjhmMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a0d4f5),
color-stop(100%, #81b8f3));
background-image: -webkit-linear-gradient(top, #a0d4f5, #81b8f3);
background-image: -moz-linear-gradient(top, #a0d4f5, #81b8f3);
background-image: -o-linear-gradient(top, #a0d4f5, #81b8f3);
background-image: linear-gradient(top, #a0d4f5, #81b8f3);
}
/* line 70, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-vertical .ui-slider-range-min {
bottom: 0;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-vertical .ui-slider-range-max {
top: 0;
}
/* line 80, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-vertical {
height: 100px;
width: 6px;
background: #d7d7d7;
box-shadow: 0 1px 0 white, 0 1px 0 #cfcfcf inset;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
}
/* line 87, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider .ui-slider-handle {
border-radius: 50%;
background: #f9fbfa;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2M3Y2VkNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y5ZmJmYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c7ced6),
color-stop(100%, #f9fbfa));
background-image: -webkit-linear-gradient(top, #c7ced6, #f9fbfa);
background-image: -moz-linear-gradient(top, #c7ced6, #f9fbfa);
background-image: -o-linear-gradient(top, #c7ced6, #f9fbfa);
background-image: linear-gradient(top, #c7ced6, #f9fbfa);
width: 22px;
height: 22px;
-webkit-box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.6), 0 -1px 0px 1px
rgba(0, 0, 0, 0.15) inset, 0 1px 0px 1px rgba(255, 255, 255, 0.9)
inset;
-moz-box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.6), 0 -1px 0px 1px
rgba(0, 0, 0, 0.15) inset, 0 1px 0px 1px rgba(255, 255, 255, 0.9)
inset;
box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.6), 0 -1px 0px 1px
rgba(0, 0, 0, 0.15) inset, 0 1px 0px 1px rgba(255, 255, 255, 0.9)
inset;
-webkit-transition: box-shadow 0.3s;
-moz-transition: box-shadow 0.3s;
-o-transition: box-shadow 0.3s;
transition: box-shadow 0.3s;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider .ui-slider-handle:active {
-webkit-box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.6), 0 -1px 0px 1px
rgba(0, 0, 0, 0.15) inset, 0 1px 0px 1px rgba(255, 255, 255, 0.9)
inset;
-moz-box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.6), 0 -1px 0px 1px
rgba(0, 0, 0, 0.15) inset, 0 1px 0px 1px rgba(255, 255, 255, 0.9)
inset;
box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.6), 0 -1px 0px 1px
rgba(0, 0, 0, 0.15) inset, 0 1px 0px 1px rgba(255, 255, 255, 0.9)
inset;
}
/* line 100, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider .ui-slider-handle:after {
content: "";
position: absolute;
width: 8px;
height: 8px;
border-radius: 50%;
top: 50%;
margin-top: -4px;
left: 50%;
margin-left: -4px;
background: #30a2d2;
-webkit-box-shadow: 0 1px 1px 1px rgba(22, 73, 163, 0.7) inset, 0 1px
0px 0px white;
-moz-box-shadow: 0 1px 1px 1px rgba(22, 73, 163, 0.7) inset, 0 1px 0px
0px white;
box-shadow: 0 1px 1px 1px rgba(22, 73, 163, 0.7) inset, 0 1px 0px 0px
white;
}
/* line 115, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-horizontal .ui-slider-handle {
top: -10px;
}
/* line 119, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ui-slider-vertical .ui-slider-handle {
left: -8px;
}
/* line 124, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ranged-slider-ui label {
color: #858585;
}
/* line 128, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ranged-slider-ui input {
background: none;
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
margin: 0;
}
/* line 134, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ranged-slider-ui input:focus {
background: none;
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* line 142, /home/andrei/core-admin-release/core-admin/source/stylesheets/ui_custom.scss */
.ranged-slider-ui.vertical-bars span {
height: 120px;
float: left;
margin-right: 30px;
display: block;
}
/* iCheck.js Flat skin, aero
----------------------------------- */
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero,.iradio_flat-aero {
display: inline-block;
margin: 0;
padding: 0;
width: 20px;
height: 20px;
background: url("../images/blue.png") no-repeat;
border: none;
cursor: pointer;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero+label,.iradio_flat-aero+label {
display: inline-block;
position: relative;
top: -5px;
left: 5px;
}
/* line 23, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero {
background-position: 0 0;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero.checked {
background-position: -22px 0;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero.disabled {
background-position: -44px 0;
cursor: default;
}
/* line 33, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero.checked.disabled {
background-position: -66px 0;
}
/* line 37, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.iradio_flat-aero {
background-position: -88px 0;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.iradio_flat-aero.checked {
background-position: -110px 0;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.iradio_flat-aero.disabled {
background-position: -132px 0;
cursor: default;
}
/* line 47, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.iradio_flat-aero.checked.disabled {
background-position: -154px 0;
}
/* Retina support */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) , only screen and
(-moz-min-device-pixel-ratio: 1.5) , only screen and
(-o-min-device-pixel-ratio: 3 / 2) , only screen and
(min-device-pixel-ratio: 1.5) {
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/icheck_blue.scss */
.icheckbox_flat-aero,.iradio_flat-aero {
background-image: url("../images/blue@2x.png");
-webkit-background-size: 176px 22px;
background-size: 176px 22px;
}
}
/* line 1, /home/andrei/core-admin-release/core-admin/source/stylesheets/justgage.scss */
.justgage {
width: 200px;
height: 160px;
display: inline-block;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/justgage.scss */
.justgage.small {
width: 90px;
height: 70px;
}
/* line 1, /home/andrei/core-admin-release/core-admin/source/stylesheets/easy_pie_chart.scss */
.easyPieChart {
position: relative;
text-align: center;
font-size: 16px;
font-weight: 600;
}
/* line 7, /home/andrei/core-admin-release/core-admin/source/stylesheets/easy_pie_chart.scss */
.easyPieChart.easy-pie-chart-small {
font-size: 10px;
}
/* line 12, /home/andrei/core-admin-release/core-admin/source/stylesheets/easy_pie_chart.scss */
.easyPieChart canvas {
position: absolute;
top: 0;
left: 0;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box {
margin: 0;
padding: 0;
margin-top: 10px;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box.side .sparkline {
margin-top: 5px;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box.side .sparkline-row {
padding: 0;
float: none;
border: none;
}
/* line 16, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box.side h4 {
margin-right: 20px;
min-width: 70px;
text-shadow: none;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box.side h4 span {
color: inherit;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box .sparkline {
margin-top: 8px;
display: inline-block;
vertical-align: top;
height: 30px;
}
/* line 38, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box .big {
width: 83px;
height: 30px;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box .sparkline-row {
*zoom: 1;
text-align: center;
padding: 0;
padding-right: 15px;
float: left;
border-right: 1px dotted #aaa;
border-left: 1px dotted #fff;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.sparkline-box .sparkline-row:before,.sparkline-box .sparkline-row:after
{
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.sparkline-box .sparkline-row:after {
clear: both;
}
/* line 53, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box .sparkline-row:last-child {
border-right: none;
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box .sparkline-row:first-child {
border-left: none;
}
/* line 62, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4 {
display: inline-block;
text-align: center;
margin: 0;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
min-width: 70px;
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4.red {
color: #c75d5d;
}
/* line 73, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4.orange {
color: #ff9f01;
}
/* line 77, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4.blue {
color: #6e97aa;
}
/* line 81, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4.gray {
color: #6b787f;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4.green {
color: #8fae53;
}
/* line 89, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4.dark-green {
color: #779148;
}
/* line 93, /home/andrei/core-admin-release/core-admin/source/stylesheets/sparkline_box.scss */
.sparkline-box h4 span {
color: #717e88;
font-size: 12px;
display: block;
text-align: center;
font-weight: normal;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-left {
position: relative;
background: #fafeff;
border: 1px solid #b5cdd7;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-left:after,.arrow-box-left:before {
right: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
/* line 82, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-left:after {
border-right-color: #fafeff;
border-width: 6px;
top: 7px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-left:before {
border-right-color: #b5cdd7;
border-width: 7px;
top: 6px;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.arrow-box-left.gray {
background: nil;
border-color: #d8d8d8;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-left.gray:before {
border-right-color: #d8d8d8;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.arrow-box-left {
-webkit-box-shadow: 0px 1px 3px -1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 1px 3px -1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 1px 3px -1px rgba(0, 0, 0, 0.1);
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-right {
position: relative;
background: #fafeff;
border: 1px solid #b5cdd7;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-right:after,.arrow-box-right:before {
left: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
/* line 82, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-right:after {
border-left-color: #fafeff;
border-width: 6px;
top: 7px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-right:before {
border-left-color: #b5cdd7;
border-width: 7px;
top: 6px;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.arrow-box-right.gray {
background: nil;
border-color: #d8d8d8;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.arrow-box-right.gray:before {
border-left-color: #d8d8d8;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.arrow-box-right {
-webkit-box-shadow: 0px 1px 3px -1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0px 1px 3px -1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 1px 3px -1px rgba(0, 0, 0, 0.1);
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box.timeline .arrow-box-left {
padding: 0;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
min-height: auto;
margin-right: 0;
}
/* line 38, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box.timeline .info,.chat-box.timeline .content {
background: #fafafa;
padding: 5px 10px;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box.timeline .content {
*zoom: 1;
border-top: 1px solid #ccc;
background: #f8f8f8;
-moz-border-radius-bottomleft: 2px;
-webkit-border-bottom-left-radius: 2px;
border-bottom-left-radius: 2px;
-moz-border-radius-bottomright: 2px;
-webkit-border-bottom-right-radius: 2px;
border-bottom-right-radius: 2px;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.chat-box.timeline .content:before,.chat-box.timeline .content:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.chat-box.timeline .content:after {
clear: both;
}
/* line 51, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box.timeline blockquote {
margin: 10px 0px;
}
/* line 55, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box.timeline .chat-message-box {
display: inline-block;
min-width: 100px;
margin-left: 64px;
padding: 3px 10px;
border-radius: 10px;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box.timeline+.closable-chat-box {
margin-left: 65px;
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box {
list-style: none;
margin: 0;
font-size: 11px;
line-height: 20px;
color: #5f5f5f;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .avatar {
position: absolute;
top: 0;
}
/* line 82, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-left,.chat-box .arrow-box-right {
min-height: 30px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
margin-top: 15px;
margin-bottom: 15px;
padding: 5px 10px;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-left {
margin-left: 65px;
margin-right: 15px;
}
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-left .avatar {
left: -50px;
}
/* line 109, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-left.gray .info .name strong {
color: #393939;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-right {
margin-right: 65px;
margin-left: 15px;
}
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-right .avatar {
right: -50px;
}
/* line 109, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .arrow-box-right.gray .info .name strong {
color: #393939;
}
/* line 114, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .info {
*zoom: 1;
color: #949494;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-ms-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.chat-box .info:before,.chat-box .info:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.chat-box .info:after {
clear: both;
}
/* line 120, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .info .name {
float: left;
}
/* line 122, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .info .name strong {
color: #2c596d;
margin-right: 10px;
}
/* line 132, /home/andrei/core-admin-release/core-admin/source/stylesheets/chat-box.scss */
.chat-box .info .time {
float: right;
}
/* \f020 doesn't work in Safari. all shifted one down */
/* line 8, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable {
margin: 0 auto;
clear: both;
width: 100%;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable thead th {
padding-left: 10px;
padding-right: 10px;
height: 30px;
line-height: 30px;
font-weight: normal;
color: #666666;
cursor: pointer;
*cursor: hand;
font-size: 12px;
font-weight: 600;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
-webkit-box-shadow: 0 1px 0px white inset;
-moz-box-shadow: 0 1px 0px white inset;
box-shadow: 0 1px 0px white inset;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable tfoot th {
padding: 3px 18px 3px 10px;
font-weight: 600;
}
/* line 33, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable td {
padding: 7px 11px;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable td.center,table.dataTable td.dataTables_empty {
text-align: center;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable tbody tr td {
border-left: 1px solid #eaebef;
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable thead tr th {
border-left: 1px solid #b5b7c3;
border-bottom: 1px solid #b5b7c3;
border-top: 1px solid #c3c5ce;
}
/* line 50, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable tbody tr td:first-child {
border-left: none;
}
/* line 54, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable thead tr {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable thead tr th:first-child {
border-left: none;
}
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable thead tr:first-child {
margin: 0;
padding: 0;
border-top: none;
}
/* line 66, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable tr {
border-top: 1px solid #eaebef;
}
/* line 68, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable tr.even {
background-color: #F3F4F8;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_wrapper {
position: relative;
clear: both;
*zoom: 1;
}
/* line 80, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_length {
float: right;
margin: 0;
}
/* line 84, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_length label {
line-height: 61px;
height: 61px;
margin: 0;
}
/* line 90, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_length select {
width: auto;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_length div.selector {
width: auto;
}
/* line 99, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.entries-per-page {
float: left;
margin: 0px 15px 0 0;
}
/* line 104, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_filter {
float: left;
font-size: 11px;
text-align: left;
margin: 0;
position: relative;
}
/* line 112, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_filter label {
line-height: 61px;
height: 61px;
margin-bottom: 0;
}
/* line 118, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_filter label>span {
display: block;
float: left;
padding-top: 1px;
}
/* line 123, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_filter input[type=text] {
height: auto;
padding: 2px 20px 2px 7px;
margin-left: 15px;
margin-bottom: 0;
width: 180px;
background: #f9f9f9;
border: 1px solid #d7d7d7;
}
/* line 134, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_info {
clear: both;
float: left;
padding: 10px 0;
}
/* line 140, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.table-footer {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
clear: both;
padding: 8px 12px;
height: 36px;
font-size: 11px;
color: #666;
border-top: 1px solid #cdcdcd;
-moz-border-radius-bottomright: 3px;
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px;
background: #fdfdfd;
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
}
/* line 155, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.table-header {
border-bottom: 1px solid #eaebef;
height: 61px;
-webkit-box-shadow: 0 1px 0 white inset;
-moz-box-shadow: 0 1px 0 white inset;
box-shadow: 0 1px 0 white inset;
clear: both;
padding: 0 16px;
font-size: 11px;
color: #666;
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
}
/* line 166, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_paginate {
float: right;
margin-top: 7px;
}
/* line 171, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers {
height: 22px;
line-height: 22px;
}
/* line 176, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers a.paginate_button,.paging_full_numbers a.paginate_active
{
border-top: 1px solid #E2E2E2;
border-left: 1px solid #C9C9C9;
border-right: 1px solid #C9C9C9;
border-bottom: 1px solid #AEAEAE;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
border-radius: 3px;
padding: 4px 7px;
margin: 0 3px;
cursor: pointer;
color: #666;
font-weight: 600;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
font-size: 11px;
-webkit-box-shadow: 0 1px 0 white inset;
-moz-box-shadow: 0 1px 0 white inset;
box-shadow: 0 1px 0 white inset;
}
/* line 195, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers a.paginate_button {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
}
/* line 198, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers a.paginate_button:hover {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f1f1f1),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #f1f1f1, #eaeaea);
background-image: -moz-linear-gradient(top, #f1f1f1, #eaeaea);
background-image: -o-linear-gradient(top, #f1f1f1, #eaeaea);
background-image: linear-gradient(top, #f1f1f1, #eaeaea);
}
/* line 202, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers a.paginate_active,.paging_full_numbers a.paginate_button:active
{
border: 1px solid #AEAEAE;
-webkit-box-shadow: 0 0 6px -1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 white;
-moz-box-shadow: 0 0 6px -1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 white;
box-shadow: 0 0 6px -1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 white;
}
/* line 207, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers a.paginate_button_disabled {
background: #eee;
color: #c5c5c5;
box-shadow: none;
border: 1px solid #E2E2E2;
}
/* line 213, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.paging_full_numbers a.paginate_button_disabled:active,.paging_full_numbers a.paginate_button_disabled:hover
{
background: #eee;
border: 1px solid #E2E2E2;
box-shadow: none;
}
/* line 225, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting,.sorting_asc,.sorting_desc {
position: relative;
}
/* line 228, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting>div,.sorting_asc>div,.sorting_desc>div {
position: relative;
height: 20px;
line-height: 20px;
}
/* line 232, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting>div:after,.sorting_asc>div:after,.sorting_desc>div:after {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
display: inline-block;
text-decoration: inherit;
position: absolute;
width: 18px;
height: 18px;
pointer-events: none;
text-align: center;
line-height: 18px;
font-size: 14px;
color: #888;
color: #666666;
line-height: 14px;
width: 16px;
height: 16px;
position: absolute;
right: 3px;
top: 3px;
}
/* line 247, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting_asc,.sorting_desc {
background: #f2f3f7;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3ZjhmYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2YyZjNmNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f7f8fc),
color-stop(100%, #f2f3f7));
background-image: -webkit-linear-gradient(top, #f7f8fc, #f2f3f7);
background-image: -moz-linear-gradient(top, #f7f8fc, #f2f3f7);
background-image: -o-linear-gradient(top, #f7f8fc, #f2f3f7);
background-image: linear-gradient(top, #f7f8fc, #f2f3f7);
}
/* line 251, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting>div:after {
content: "\f0dc";
}
/* line 255, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting_asc>div:after {
content: "\f0de";
top: 7px;
}
/* line 260, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.sorting_desc>div:after {
content: "\f0dd";
top: 1px;
}
/* line 265, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
table.dataTable th:active {
outline: none;
}
/* line 269, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_scroll {
clear: both;
}
/* line 273, /home/andrei/core-admin-release/core-admin/source/stylesheets/dataTables.scss */
.dataTables_scrollBody {
*margin-top: -1px;
-webkit-overflow-scrolling: touch;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
margin-bottom: 20px;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-group {
margin-bottom: 0;
border: 1px solid #cdcdcd;
border-bottom: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
margin-top: -1px;
border-top: none;
}
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-group .accordion-heading {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
text-shadow: 0 1px white;
border-bottom: 1px solid #CDCDCD;
color: #636363;
font-weight: 600;
border-top: 1px solid #cdcdcd;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-group:first-child {
-moz-border-radius-topleft: 4px;
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-right-radius: 4px;
border-top-right-radius: 4px;
margin-top: 0px;
border-top: none;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-group:first-child .accordion-heading {
-moz-border-radius-topleft: 4px;
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-right-radius: 4px;
border-top-right-radius: 4px;
}
/* line 34, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-group:last-child {
-moz-border-radius-bottomleft: 4px;
-webkit-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: 1px solid #cdcdcd;
}
/* line 40, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-group .accordion-inner {
background: #fbfbfb;
margin-bottom: 1px;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-heading .accordion-toggle {
padding: 10px;
color: #636363;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
display: block;
}
/* line 54, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-inner .nav {
margin-bottom: 0;
}
/* line 58, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-inner .nav li {
line-height: 40px;
height: 40px;
border-bottom: 1px solid #ddd;
}
/* line 63, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-inner .nav li a {
padding-left: 10px;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.accordion-inner .nav li:last-child {
border-bottom: none;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion {
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 77, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion .active {
border-left: 6px solid #505050;
margin-left: -3px;
}
/* line 81, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion .active a {
padding-left: 7px;
color: #505050;
}
/* line 88, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion-group {
border-left: none;
border-right: none;
}
/* line 92, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion-group:first-child,.sidebar-tabs .accordion-group:first-child .accordion-heading,.sidebar-tabs .accordion-group:last-child
{
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion-group:last-child {
border-bottom: none;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/accordion.scss */
.sidebar-tabs .accordion-heading .accordion-toggle {
padding: 15px;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/thumbnails.scss */
.thumbnails {
list-style: none;
*zoom: 1;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.thumbnails:before,.thumbnails:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.thumbnails:after {
clear: both;
}
/* line 11, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap_alerts.scss */
.alert {
border: 1px solid #f1d276;
color: #a37f11;
background: #f6e1a4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y4ZTliYiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y2ZTFhNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f8e9bb),
color-stop(100%, #f6e1a4));
background-image: -webkit-linear-gradient(top, #f8e9bb, #f6e1a4);
background-image: -moz-linear-gradient(top, #f8e9bb, #f6e1a4);
background-image: -o-linear-gradient(top, #f8e9bb, #f6e1a4);
background-image: linear-gradient(top, #f8e9bb, #f6e1a4);
-webkit-box-shadow: 0 1px 2px #f9edc9 inset, 0 1px 1px #dfdfdf;
-moz-box-shadow: 0 1px 2px #f9edc9 inset, 0 1px 1px #dfdfdf;
box-shadow: 0 1px 2px #f9edc9 inset, 0 1px 1px #dfdfdf;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap_alerts.scss */
.alert-info {
border: 1px solid #a8c3dc;
color: #3c6a95;
background: #ccdcea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2RlZThmMiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2NjZGNlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dee8f2),
color-stop(100%, #ccdcea));
background-image: -webkit-linear-gradient(top, #dee8f2, #ccdcea);
background-image: -moz-linear-gradient(top, #dee8f2, #ccdcea);
background-image: -o-linear-gradient(top, #dee8f2, #ccdcea);
background-image: linear-gradient(top, #dee8f2, #ccdcea);
-webkit-box-shadow: 0 1px 2px #e9f0f6 inset, 0 1px 1px #dfdfdf;
-moz-box-shadow: 0 1px 2px #e9f0f6 inset, 0 1px 1px #dfdfdf;
box-shadow: 0 1px 2px #e9f0f6 inset, 0 1px 1px #dfdfdf;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap_alerts.scss */
.alert-danger,.alert-error {
border: 1px solid #de7e6d;
color: #7d2a1c;
background: #e8a397;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VjYjVhYyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U4YTM5NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ecb5ac),
color-stop(100%, #e8a397));
background-image: -webkit-linear-gradient(top, #ecb5ac, #e8a397);
background-image: -moz-linear-gradient(top, #ecb5ac, #e8a397);
background-image: -o-linear-gradient(top, #ecb5ac, #e8a397);
background-image: linear-gradient(top, #ecb5ac, #e8a397);
-webkit-box-shadow: 0 1px 2px #efc0b8 inset, 0 1px 1px #dfdfdf;
-moz-box-shadow: 0 1px 2px #efc0b8 inset, 0 1px 1px #dfdfdf;
box-shadow: 0 1px 2px #efc0b8 inset, 0 1px 1px #dfdfdf;
}
/* line 23, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap_alerts.scss */
.alert-success {
border: 1px solid #97cc2e;
color: #2b3a0d;
background: #acd954;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2I2ZGQ2OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FjZDk1NCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b6dd69),
color-stop(100%, #acd954));
background-image: -webkit-linear-gradient(top, #b6dd69, #acd954);
background-image: -moz-linear-gradient(top, #b6dd69, #acd954);
background-image: -o-linear-gradient(top, #b6dd69, #acd954);
background-image: linear-gradient(top, #b6dd69, #acd954);
-webkit-box-shadow: 0 1px 2px #bce075 inset, 0 1px 1px #dfdfdf;
-moz-box-shadow: 0 1px 2px #bce075 inset, 0 1px 1px #dfdfdf;
box-shadow: 0 1px 2px #bce075 inset, 0 1px 1px #dfdfdf;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/pagination.scss */
.pagination>ul {
-webkit-box-shadow: none;
box-shadow: none;
}
/* line 8, /home/andrei/core-admin-release/core-admin/source/stylesheets/pagination.scss */
.pagination-lg>li>a,.pagination-lg>li>span {
padding: 9px 16px;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/pagination.scss */
.pagination>li>a {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
border-top: 1px solid #E2E2E2;
border-left: 1px solid #C9C9C9;
border-right: 1px solid #C9C9C9;
border-bottom: 1px solid #AEAEAE;
font-weight: 600;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
margin: 0 1px;
cursor: pointer;
color: #666;
-webkit-box-shadow: 0 1px 0 white inset;
box-shadow: 0 1px 0 white inset;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/pagination.scss */
.pagination>li>a:hover {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f1f1f1),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #f1f1f1, #eaeaea);
background-image: -moz-linear-gradient(top, #f1f1f1, #eaeaea);
background-image: -o-linear-gradient(top, #f1f1f1, #eaeaea);
background-image: linear-gradient(top, #f1f1f1, #eaeaea);
}
/* line 34, /home/andrei/core-admin-release/core-admin/source/stylesheets/pagination.scss */
.pagination>li.active a,.pagination>li>a:active,.pagination>li.active:hover a
{
color: #666;
border: 1px solid #AEAEAE;
-webkit-box-shadow: 0 0 6px -1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 white;
box-shadow: 0 0 6px -1px rgba(0, 0, 0, 0.2) inset, 0 1px 0 white;
text-shadow: none;
}
/* line 507, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap/_mixins.scss */
.pagination-xs>li>a,.pagination-xs>li>span {
padding: 4px 6px;
font-size: 10px;
}
/* line 513, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap/_mixins.scss */
.pagination-xs>li:first-child>a,.pagination-xs>li:first-child>span {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
/* line 519, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap/_mixins.scss */
.pagination-xs>li:last-child>a,.pagination-xs>li:last-child>span {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-body {
background: #f5f5f5;
}
/* line 7, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-content {
border: 3px solid #808080;
}
/* line 11, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-header,.modal-footer {
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-header h1,.modal-header h2,.modal-header h3,.modal-header h4,.modal-header h5,.modal-header h6,.modal-footer h1,.modal-footer h2,.modal-footer h3,.modal-footer h4,.modal-footer h5,.modal-footer h6
{
margin: 0;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-footer {
margin-top: 0;
}
/* line 23, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-header {
-moz-border-radius-topleft: 4px;
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-right-radius: 4px;
border-top-right-radius: 4px;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/modal.scss */
.modal-header {
border-bottom: 1px solid #CDCDCD;
}
/* The gallery overlay */
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#galleryOverlay {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
opacity: 0;
z-index: 100000;
background-color: #222;
background-color: rgba(0, 0, 0, 0.8);
overflow: hidden;
display: none;
-moz-transition: opacity 1s ease;
-webkit-transition: opacity 1s ease;
transition: opacity 1s ease;
}
/* This class will trigger the animation */
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#galleryOverlay.visible {
opacity: 1;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#gallerySlider {
height: 100%;
left: 0;
top: 0;
width: 100%;
white-space: nowrap;
position: absolute;
-moz-transition: left 0.4s ease;
-webkit-transition: left 0.4s ease;
transition: left 0.4s ease;
}
/* line 45, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#gallerySlider .placeholder {
background: url("../images/loading.gif") no-repeat center center;
height: 100%;
line-height: 1px;
text-align: center;
width: 100%;
display: inline-block;
}
/* The before element moves the
* image halfway from the top */
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#gallerySlider .placeholder:before {
content: "";
display: inline-block;
height: 50%;
width: 1px;
margin-right: -1px;
}
/* line 65, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#gallerySlider .placeholder img {
display: inline-block;
max-height: 100%;
max-width: 100%;
vertical-align: middle;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#gallerySlider.rightSpring {
-moz-animation: rightSpring 0.3s;
-webkit-animation: rightSpring 0.3s;
}
/* line 77, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#gallerySlider.leftSpring {
-moz-animation: leftSpring 0.3s;
-webkit-animation: leftSpring 0.3s;
}
/* Firefox Keyframe Animations */
@
-moz-keyframes rightSpring {
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
0% {
margin-left: 0px;
}
/* line 86, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
50%
{
margin-left
:
-30
px
;
}
/* line 87, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
100%
{
margin-left
:
0
px
;
}
}
@
-moz-keyframes leftSpring {
/* line 91, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
0% {
margin-left: 0px;
}
/* line 92, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
50%
{
margin-left
:
30
px
;
}
/* line 93, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
100%
{
margin-left
:
0
px
;
}
}
/* Safari and Chrome Keyframe Animations */
@
-webkit-keyframes rightSpring {
/* line 99, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
0% {
margin-left: 0px;
}
/* line 100, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
50%
{
margin-left
:
-30
px
;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
100%
{
margin-left
:
0
px
;
}
}
@
-webkit-keyframes leftSpring {
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
0% {
margin-left: 0px;
}
/* line 106, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
50%
{
margin-left
:
30
px
;
}
/* line 107, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
100%
{
margin-left
:
0
px
;
}
}
/* Arrows */
/* line 112, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#prevArrow,#nextArrow {
border: none;
text-decoration: none;
background: rgba(0, 0, 0, 0.7);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
opacity: 0.5;
cursor: pointer;
position: absolute;
width: 43px;
height: 58px;
top: 50%;
margin-top: -29px;
-moz-transition: opacity 0.2s ease;
-webkit-transition: opacity 0.2s ease;
transition: opacity 0.2s ease;
}
/* line 130, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#prevArrow i,#nextArrow i {
height: 55px;
line-height: 55px;
width: 100%;
text-align: center;
}
/* line 138, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#prevArrow:hover,#nextArrow:hover {
opacity: 1;
}
/* line 142, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#prevArrow {
left: 40px;
}
/* line 146, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#nextArrow {
right: 40px;
}
/*----------------------------
Thumbnails
-----------------------------*/
/* line 154, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#thumbs {
margin: 60px auto 35px;
text-align: center;
}
/* line 159, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#thumbs a {
width: 120px;
height: 120px;
display: inline-block;
border: 7px solid #303030;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
border-radius: 4px;
margin: 6px 6px 40px;
position: relative;
text-decoration: none;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
-moz-background-size: cover;
-webkit-background-size: cover;
}
/* line 178, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#thumbs a:after {
background-color: #303030;
border-radius: 7px;
bottom: -136px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
color: #FFFFFF;
content: attr(title);
display: inline-block;
font-size: 10px;
max-width: 90px;
overflow: hidden;
padding: 2px 10px;
position: relative;
text-align: center;
white-space: nowrap;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 196, /home/andrei/core-admin-release/core-admin/source/stylesheets/touchTouch.scss */
#credit {
background-color: rgba(255, 255, 255, 0.2);
border-radius: 8px;
font-size: 11px;
margin: 0 auto 70px;
opacity: 0.5;
padding: 12px 16px;
text-align: center;
width: 400px;
}
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal {
margin-bottom: 0;
color: #5a6573;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal tbody td,.table-normal thead td {
border-left: 1px solid #eaebef;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal tbody td:first-child,.table-normal thead td:first-child {
border-left: none;
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal tbody td {
border-top: 1px solid #eaebef;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal thead td {
text-align: center;
font-size: 11px;
padding: 3px 5px 2px 5px;
color: #666;
height: 25px;
line-height: 25px;
font-weight: 600;
font-size: 12px;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
background: #eaeaea;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VhZWFlYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #eaeaea));
background-image: -webkit-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -moz-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: -o-linear-gradient(top, #fdfdfd, #eaeaea);
background-image: linear-gradient(top, #fdfdfd, #eaeaea);
border-left: 1px solid #d1d2da;
border-right: 1px solid #d1d2da;
border-bottom: 1px solid #d1d2da;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal thead td:first-child {
border-left: none;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal thead td:last-child {
border-right: none;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal tbody td {
padding: 7px 11px;
vertical-align: middle;
}
/* line 53, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal tbody tr {
border-top: 1px solid #eaebef;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal tbody tr:nth-child(even) {
background: #F3F4F8;
}
/* line 62, /home/andrei/core-admin-release/core-admin/source/stylesheets/tables.scss */
.table-normal .icon {
width: 30px;
text-align: center;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar {
height: 16px;
width: 10px;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-button:start:decrement,.scrollable::-webkit-scrollbar-button:end:increment
{
background-color: transparent;
display: block;
height: 0;
}
/* line 15, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-track {
background-clip: padding-box;
border: solid transparent;
border-width: 0 0 0 4px;
}
/* line 20, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-track-piece {
background-color: transparent;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar:hover {
background-color: #f3f3f3;
border: 1px solid #dbdbdb;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border: solid transparent;
border-width: 0;
-webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0
rgba(0, 0, 0, 0.07);
-moz-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0
rgba(0, 0, 0, 0.07);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1), inset 0 -1px 0
rgba(0, 0, 0, 0.07);
background-clip: padding-box;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-thumb:vertical,.scrollable::-webkit-scrollbar-thumb:horizontal
{
background-color: #c6c6c6;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 38, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-thumb:hover {
background-color: #949494;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/scrollable.scss */
.scrollable::-webkit-scrollbar-thumb:active {
background-color: rgba(0, 0, 0, 0.5);
-webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
-moz-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news {
min-height: 85px;
}
/* line 12, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news .avatar {
float: left;
height: 36px;
width: 36px;
line-height: 36px;
text-align: center;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news .avatar.blue {
background: #7fb3d4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E1Y2FlMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdmYjNkNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a5cae1),
color-stop(100%, #7fb3d4));
background-image: -webkit-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: -moz-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: -o-linear-gradient(top, #a5cae1, #7fb3d4);
background-image: linear-gradient(top, #a5cae1, #7fb3d4);
border: 1px solid #60a1ca;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news .avatar.green {
background: #8cc079;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FhZDA5YyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYzA3OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #aad09c),
color-stop(100%, #8cc079));
background-image: -webkit-linear-gradient(top, #aad09c, #8cc079);
background-image: -moz-linear-gradient(top, #aad09c, #8cc079);
background-image: -o-linear-gradient(top, #aad09c, #8cc079);
background-image: linear-gradient(top, #aad09c, #8cc079);
border: 1px solid #74b35d;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news .avatar.cyan {
background: #81babd;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2EyY2NjZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzgxYmFiZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a2cccf),
color-stop(100%, #81babd));
background-image: -webkit-linear-gradient(top, #a2cccf, #81babd);
background-image: -moz-linear-gradient(top, #a2cccf, #81babd);
background-image: -o-linear-gradient(top, #a2cccf, #81babd);
background-image: linear-gradient(top, #a2cccf, #81babd);
border: 1px solid #66abaf;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news .avatar.purple {
background: #aea7cf;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2NjYzhlMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2FlYTdjZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ccc8e1),
color-stop(100%, #aea7cf));
background-image: -webkit-linear-gradient(top, #ccc8e1, #aea7cf);
background-image: -moz-linear-gradient(top, #ccc8e1, #aea7cf);
background-image: -o-linear-gradient(top, #ccc8e1, #aea7cf);
background-image: linear-gradient(top, #ccc8e1, #aea7cf);
border: 1px solid #968dc1;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news .avatar i {
color: white;
line-height: 32px;
}
/* line 37, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news.with-icons .news-content {
margin-left: 55px;
}
/* line 42, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news-content {
margin-left: 50px;
margin-right: 50px;
}
/* line 47, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news-title {
color: #636364;
font-weight: 600;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
font-size: 16px;
}
/* line 54, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news-time {
float: right;
color: #bbb;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
font-size: 14px;
text-align: center;
}
/* line 61, /home/andrei/core-admin-release/core-admin/source/stylesheets/news.scss */
.news-time span {
display: block;
font-size: 24px;
font-weight: 600;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-blue,.badge-gray,.badge-green,.badge-red,.badge-dark-red,.badge-black,.badge-cyan,.badge-purple
{
display: inline-block;
padding: 0 4px;
border-radius: 10px;
height: 14px;
min-width: 14px;
line-height: 14px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
text-align: center;
font-weight: 600;
font-size: 10px;
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
-moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
color: #fff;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label,.badge {
font-weight: 600;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-blue {
background: #599cc7;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdmYjNkNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU5OWNjNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7fb3d4),
color-stop(100%, #599cc7));
background-image: -webkit-linear-gradient(top, #7fb3d4, #599cc7);
background-image: -moz-linear-gradient(top, #7fb3d4, #599cc7);
background-image: -o-linear-gradient(top, #7fb3d4, #599cc7);
background-image: linear-gradient(top, #7fb3d4, #599cc7);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #70aacf;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #70aacf;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #70aacf;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-gray {
background: #5d5d5d;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzc2NzY3NiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzVkNWQ1ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #767676),
color-stop(100%, #5d5d5d));
background-image: -webkit-linear-gradient(top, #767676, #5d5d5d);
background-image: -moz-linear-gradient(top, #767676, #5d5d5d);
background-image: -o-linear-gradient(top, #767676, #5d5d5d);
background-image: linear-gradient(top, #767676, #5d5d5d);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #6c6c6c;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #6c6c6c;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #6c6c6c;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-green {
background: #6eb056;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzhjYzA3OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzZlYjA1NiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8cc079),
color-stop(100%, #6eb056));
background-image: -webkit-linear-gradient(top, #8cc079, #6eb056);
background-image: -moz-linear-gradient(top, #8cc079, #6eb056);
background-image: -o-linear-gradient(top, #8cc079, #6eb056);
background-image: linear-gradient(top, #8cc079, #6eb056);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #80b96b;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #80b96b;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #80b96b;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-red {
background: #964747;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IzNWQ1ZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzk2NDc0NyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b35d5d),
color-stop(100%, #964747));
background-image: -webkit-linear-gradient(top, #b35d5d, #964747);
background-image: -moz-linear-gradient(top, #b35d5d, #964747);
background-image: -o-linear-gradient(top, #b35d5d, #964747);
background-image: linear-gradient(top, #b35d5d, #964747);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #ab5050;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #ab5050;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #ab5050;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-dark-red {
background: #8f3831;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2I1NDczZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhmMzgzMSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b5473e),
color-stop(100%, #8f3831));
background-image: -webkit-linear-gradient(top, #b5473e, #8f3831);
background-image: -moz-linear-gradient(top, #b5473e, #8f3831);
background-image: -o-linear-gradient(top, #b5473e, #8f3831);
background-image: linear-gradient(top, #b5473e, #8f3831);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #a64139;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #a64139;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #a64139;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-black {
background: #4d4d4d;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzY2NjY2NiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRkNGQ0ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #666666),
color-stop(100%, #4d4d4d));
background-image: -webkit-linear-gradient(top, #666666, #4d4d4d);
background-image: -moz-linear-gradient(top, #666666, #4d4d4d);
background-image: -o-linear-gradient(top, #666666, #4d4d4d);
background-image: linear-gradient(top, #666666, #4d4d4d);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #5c5c5c;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #5c5c5c;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #5c5c5c;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-cyan {
background: #60a8ab;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgxYmFiZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzYwYThhYiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #81babd),
color-stop(100%, #60a8ab));
background-image: -webkit-linear-gradient(top, #81babd, #60a8ab);
background-image: -moz-linear-gradient(top, #81babd, #60a8ab);
background-image: -o-linear-gradient(top, #81babd, #60a8ab);
background-image: linear-gradient(top, #81babd, #60a8ab);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #74b3b6;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #74b3b6;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #74b3b6;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.label-purple {
background: #9086bd;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FlYTdjZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzkwODZiZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #aea7cf),
color-stop(100%, #9086bd));
background-image: -webkit-linear-gradient(top, #aea7cf, #9086bd);
background-image: -moz-linear-gradient(top, #aea7cf, #9086bd);
background-image: -o-linear-gradient(top, #aea7cf, #9086bd);
background-image: linear-gradient(top, #aea7cf, #9086bd);
-webkit-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #a29ac8;
-moz-box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #a29ac8;
box-shadow: 0 1px 0 #f7f7f7, inset 0 1px 1px #a29ac8;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-blue {
background: #6ca8ce;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdmYjNkNCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzZjYThjZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7fb3d4),
color-stop(100%, #6ca8ce));
background-image: -webkit-linear-gradient(top, #7fb3d4, #6ca8ce);
background-image: -moz-linear-gradient(top, #7fb3d4, #6ca8ce);
background-image: -o-linear-gradient(top, #7fb3d4, #6ca8ce);
background-image: linear-gradient(top, #7fb3d4, #6ca8ce);
-webkit-box-shadow: 0 0 0 1px #3c84b1;
-moz-box-shadow: 0 0 0 1px #3c84b1;
box-shadow: 0 0 0 1px #3c84b1;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-gray {
background: dimgrey;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzc2NzY3NiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzY5Njk2OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #767676),
color-stop(100%, #696969));
background-image: -webkit-linear-gradient(top, #767676, #696969);
background-image: -moz-linear-gradient(top, #767676, #696969);
background-image: -o-linear-gradient(top, #767676, #696969);
background-image: linear-gradient(top, #767676, #696969);
-webkit-box-shadow: 0 0 0 1px #434343;
-moz-box-shadow: 0 0 0 1px #434343;
box-shadow: 0 0 0 1px #434343;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-green {
background: #7db868;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzhjYzA3OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdkYjg2OCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8cc079),
color-stop(100%, #7db868));
background-image: -webkit-linear-gradient(top, #8cc079, #7db868);
background-image: -moz-linear-gradient(top, #8cc079, #7db868);
background-image: -o-linear-gradient(top, #8cc079, #7db868);
background-image: linear-gradient(top, #8cc079, #7db868);
-webkit-box-shadow: 0 0 0 1px #589043;
-moz-box-shadow: 0 0 0 1px #589043;
box-shadow: 0 0 0 1px #589043;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-red {
background: #a84f4f;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IzNWQ1ZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2E4NGY0ZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b35d5d),
color-stop(100%, #a84f4f));
background-image: -webkit-linear-gradient(top, #b35d5d, #a84f4f);
background-image: -moz-linear-gradient(top, #b35d5d, #a84f4f);
background-image: -o-linear-gradient(top, #b35d5d, #a84f4f);
background-image: linear-gradient(top, #b35d5d, #a84f4f);
-webkit-box-shadow: 0 0 0 1px #743636;
-moz-box-shadow: 0 0 0 1px #743636;
box-shadow: 0 0 0 1px #743636;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-dark-red {
background: #a24037;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2I1NDczZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2EyNDAzNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b5473e),
color-stop(100%, #a24037));
background-image: -webkit-linear-gradient(top, #b5473e, #a24037);
background-image: -moz-linear-gradient(top, #b5473e, #a24037);
background-image: -o-linear-gradient(top, #b5473e, #a24037);
background-image: linear-gradient(top, #b5473e, #a24037);
-webkit-box-shadow: 0 0 0 1px #692924;
-moz-box-shadow: 0 0 0 1px #692924;
box-shadow: 0 0 0 1px #692924;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-black {
background: #595959;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzY2NjY2NiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzU5NTk1OSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #666666),
color-stop(100%, #595959));
background-image: -webkit-linear-gradient(top, #666666, #595959);
background-image: -moz-linear-gradient(top, #666666, #595959);
background-image: -o-linear-gradient(top, #666666, #595959);
background-image: linear-gradient(top, #666666, #595959);
-webkit-box-shadow: 0 0 0 1px #333333;
-moz-box-shadow: 0 0 0 1px #333333;
box-shadow: 0 0 0 1px #333333;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-cyan {
background: #70b1b4;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzgxYmFiZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzcwYjFiNCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #81babd),
color-stop(100%, #70b1b4));
background-image: -webkit-linear-gradient(top, #81babd, #70b1b4);
background-image: -moz-linear-gradient(top, #81babd, #70b1b4);
background-image: -o-linear-gradient(top, #81babd, #70b1b4);
background-image: linear-gradient(top, #81babd, #70b1b4);
-webkit-box-shadow: 0 0 0 1px #4a8a8e;
-moz-box-shadow: 0 0 0 1px #4a8a8e;
box-shadow: 0 0 0 1px #4a8a8e;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-purple {
background: #9f97c6;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2FlYTdjZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzlmOTdjNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #aea7cf),
color-stop(100%, #9f97c6));
background-image: -webkit-linear-gradient(top, #aea7cf, #9f97c6);
background-image: -moz-linear-gradient(top, #aea7cf, #9f97c6);
background-image: -o-linear-gradient(top, #aea7cf, #9f97c6);
background-image: linear-gradient(top, #aea7cf, #9f97c6);
-webkit-box-shadow: 0 0 0 1px #7165ab;
-moz-box-shadow: 0 0 0 1px #7165ab;
box-shadow: 0 0 0 1px #7165ab;
}
/* line 47, /home/andrei/core-admin-release/core-admin/source/stylesheets/badges.scss */
.badge-flat {
text-shadow: none;
}
/* line 1, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard {
display: none;
}
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal form {
margin: 0;
padding: 0;
}
/* line 8, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal.modal {
width: 750px;
margin-left: -375px;
top: 50%;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal-footer {
padding: 0px;
text-align: right;
}
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal-header.modal-header h3 {
line-height: 35px;
display: inline;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal-header.modal-header {
border-bottom: 0;
}
/* line 25, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-subtitle {
font-weight: 600;
color: #AFAFAF;
padding-left: 20px;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-error,.wizard-failure,.wizard-success,.wizard-loading,.wizard-card
{
position: relative;
padding: 35px;
padding-top: 20px;
overflow-y: auto;
height: 300px;
display: none;
border-top: 1px solid #EEE;
margin-right: 5px;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-nav-link .icon-chevron-right {
float: right;
margin-top: 12px;
margin-right: -6px;
opacity: .25;
}
/* line 53, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
li.wizard-nav-item.active .icon-chevron-right {
opacity: 1;
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
li.wizard-nav-item {
line-height: 40px;
}
/* line 61, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal.modal .nav-list>li>a {
background-color: #f5f5f5;
padding: 3px 15px 3px 20px;
cursor: default;
color: #B4B4B4;
}
/* line 68, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal.modal .nav-list li.active>a {
background-color: #08C;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal.modal .nav-list>li.already-visited>a.wizard-nav-link {
color: #08C;
cursor: pointer;
}
/* line 77, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal.modal .nav-list>li.active>a.wizard-nav-link {
color: white;
}
/* line 81, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.already-visited>a.wizard-nav-link:hover {
background-color: #E4E4E4;
}
/* line 85, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-card>h3 {
margin-top: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: 40px;
font-weight: normal;
}
/* line 93, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-progress {
padding: 15px;
bottom: 0;
}
/* line 97, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-progress-container {
padding: 20px;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-steps {
width: 28%;
height: 425px;
background-color: #f5f5f5;
}
/* line 107, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-nav-container {
height: 360px;
}
/* line 111, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.nav>li>a.wizard-step-error {
background-color: #F2DEDE;
color: #B94A48;
font-weight: 600;
}
/* line 117, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-step-error .icon-chevron-right {
opacity: 0;
}
/* line 121, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-input-section {
margin-bottom: 20px;
}
/* line 125, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-buttons-container {
padding: 20px;
}
/* line 129, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal .popover.error-popover {
background-color: #F2DEDE;
color: #B94A48;
border-color: #953B39;
}
/* line 135, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal .popover.error-popover .arrow::after {
border-right-color: #F2DEDE;
}
/* line 139, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal .popover.error-popover .popover-title {
display: none;
}
/* line 143, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wizard.scss */
.wizard-modal .popover.error-popover .arrow {
border-right-color: #953B39;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/error_pages.scss */
.error-box {
margin-top: 100px;
color: rgba(0, 0, 0, 0.2);
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.6), 0 0 1px
rgba(0, 0, 0, 0.3);
text-align: center;
font-weight: 600;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/error_pages.scss */
.error-box .message-small {
font-size: 25px;
}
/* line 14, /home/andrei/core-admin-release/core-admin/source/stylesheets/error_pages.scss */
.error-box .message-big {
font-size: 160px;
}
/* line 3, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.textarea-html5 {
margin: 0;
padding: 10px;
padding-top: 0;
width: 100%;
height: 190px;
border-radius: 4px;
}
/* line 12, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysihtml5-sandbox {
width: 100% !important;
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
box-sizing: border-box !important;
border: none !important;
box-shadow: none !important;
border-bottom-left-radius: 3px !important;
border-bottom-right-radius: 3px !important;
background: #f7f7f7;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.closable-chat-box .wysihtml5-sandbox {
width: 97% !important;
}
/* line 27, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar {
margin: 0;
padding: 10px;
display: block;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar::after {
clear: both;
display: table;
content: "";
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar>li {
float: left;
display: list-item;
list-style: none;
margin: 0 5px 10px 0;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
font-weight: 600;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
font-style: italic;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
text-decoration: underline;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
background-image: none;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px
rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px
rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px
rgba(0, 0, 0, 0.05);
background-color: #eaeaea;
background-color: #D9D9D9;
outline: 0;
}
/* line 63, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-commands-disabled .dropdown-menu {
display: none !important;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div.wysihtml5-colors {
display: block;
width: 50px;
height: 20px;
margin-top: 2px;
margin-left: 5px;
position: absolute;
pointer-events: none;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar a.wysihtml5-colors-title {
padding-left: 70px;
}
/* line 80, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
background: black !important;
}
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
background: silver !important;
}
/* line 86, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
background: gray !important;
}
/* line 89, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
background: maroon !important;
}
/* line 92, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
background: red !important;
}
/* line 95, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
background: purple !important;
}
/* line 98, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
background: green !important;
}
/* line 101, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
background: olive !important;
}
/* line 104, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
background: navy !important;
}
/* line 107, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
background: blue !important;
}
/* line 110, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
background: orange !important;
}
/* line 117, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-black {
color: black;
}
/* line 121, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-silver {
color: silver;
}
/* line 125, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-gray {
color: gray;
}
/* line 129, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-white {
color: white;
}
/* line 133, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-maroon {
color: maroon;
}
/* line 137, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-red {
color: red;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-purple {
color: purple;
}
/* line 145, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-fuchsia {
color: fuchsia;
}
/* line 149, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-green {
color: green;
}
/* line 153, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-lime {
color: lime;
}
/* line 157, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-olive {
color: olive;
}
/* line 161, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-yellow {
color: yellow;
}
/* line 165, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-navy {
color: navy;
}
/* line 169, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-blue {
color: blue;
}
/* line 173, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-teal {
color: teal;
}
/* line 177, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-aqua {
color: aqua;
}
/* line 181, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-wysihtml5.scss */
.wysiwyg-color-orange {
color: orange;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.formError {
position: relative;
background: #202020;
border: 1px solid #cccccc;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* line 72, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.formError:after,.formError:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
/* line 82, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.formError:after {
border-top-color: #202020;
border-width: 7px;
left: 7px;
}
/* line 94, /home/andrei/core-admin-release/core-admin/source/stylesheets/_arrow.scss */
.formError:before {
border-top-color: #cccccc;
border-width: 8px;
left: 6px;
}
/* line 6, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError {
z-index: 990;
background: transparent;
border: none;
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorContent {
z-index: 991;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow {
z-index: 996;
display: none;
}
/* line 19, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.ui-dialog .formError {
z-index: 5000;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.ui-dialog .formError .formErrorContent {
z-index: 5001;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.ui-dialog .formError .formErrorArrow {
z-index: 5006;
}
/* line 29, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.inputContainer {
position: relative;
float: left;
}
/* line 34, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError {
position: absolute;
top: 300px;
left: 300px;
display: block;
cursor: pointer;
text-align: left;
}
/* line 41, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError.inline {
position: relative;
top: 0;
left: 0;
display: inline-block;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.ajaxSubmit {
padding: 20px;
background: #55ea55;
border: 1px solid #999;
display: none;
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorContent {
width: 100%;
background: #202020;
position: relative;
color: #fff;
min-width: 120px;
font-size: 11px;
padding: 4px 10px 4px 10px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError.inline .formErrorContent {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
border: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 74, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.greenPopup .formErrorContent {
background: #33be40;
}
/* line 78, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.blackPopup .formErrorContent {
background: #393939;
color: #FFF;
}
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow {
width: 15px;
margin: -2px 0 0 13px;
position: relative;
}
/* line 90, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
body[dir='rtl'] .formError .formErrorArrow,body.rtl .formError .formErrorArrow
{
margin: -2px 13px 0 0;
}
/* line 96, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrowBottom {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
margin: 0px 0 0 12px;
top: 2px;
}
/* line 104, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow div {
border-left: 2px solid #ddd;
border-right: 2px solid #ddd;
box-shadow: 0 2px 3px #444;
-moz-box-shadow: 0 2px 3px #444;
-webkit-box-shadow: 0 2px 3px #444;
-o-box-shadow: 0 2px 3px #444;
font-size: 0px;
height: 1px;
background: #ee0101;
margin: 0 auto;
line-height: 0;
font-size: 0;
display: block;
}
/* line 119, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrowBottom div {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
}
/* line 127, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.greenPopup .formErrorArrow div {
background: #33be40;
}
/* line 131, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.blackPopup .formErrorArrow div {
background: #393939;
color: #FFF;
}
/* line 137, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line10 {
width: 15px;
border: none;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line9 {
width: 13px;
border: none;
}
/* line 145, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line8 {
width: 11px;
}
/* line 148, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line7 {
width: 9px;
}
/* line 151, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line6 {
width: 7px;
}
/* line 154, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line5 {
width: 5px;
}
/* line 157, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line4 {
width: 3px;
}
/* line 160, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line3 {
width: 1px;
border-left: 2px solid #ddd;
border-right: 2px solid #ddd;
border-bottom: 0 solid #ddd;
}
/* line 166, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line2 {
width: 3px;
border: none;
background: #ddd;
}
/* line 171, /home/andrei/core-admin-release/core-admin/source/stylesheets/validation_engine.scss */
.formError .formErrorArrow .line1 {
width: 1px;
border: none;
background: #ddd;
}
/*! X-editable - v1.5.0
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
/* line 7, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editableform {
margin-bottom: 0;
/* overwrites bootstrap margin */
}
/* line 10, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editableform .control-group {
margin-bottom: 0;
/* overwrites bootstrap margin */
white-space: nowrap;
/* prevent wrapping buttons on new line */
line-height: 20px;
/* overwriting bootstrap line-height. See #133 */
}
/* line 20, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-buttons {
display: inline-block;
/* should be inline to take effect of parent's white-space: nowrap */
vertical-align: top;
margin-left: 7px;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
/* line 28, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-buttons.editable-buttons-bottom {
display: block;
margin-top: 7px;
margin-left: 0;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-input {
vertical-align: top;
display: inline-block;
/* should be inline to take effect of parent's white-space: nowrap */
width: auto;
/* bootstrap-responsive has width: 100% that breakes layout */
white-space: normal;
/* reset white-space decalred in parent*/
/* display-inline emulation for IE7*/
zoom: 1;
*display: inline;
}
/* line 49, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-buttons .editable-cancel {
margin-left: 7px;
}
/* line 52, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-buttons button.ui-button-icon-only {
height: 24px;
width: 30px;
}
/*for jquery-ui buttons need set height to look more pretty*/
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editableform-loading {
background: url("../images/loading.gif") center center no-repeat;
height: 25px;
width: auto;
min-width: 25px;
}
/* line 67, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-inline .editableform-loading {
background-position: left 5px;
}
/* line 71, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-error-block {
max-width: 300px;
margin: 5px 0 0 0;
width: auto;
white-space: normal;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-error-block.ui-state-error {
padding: 3px;
}
/*add padding for jquery ui*/
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-error {
color: red;
}
/* ---- For specific types ---- */
/* line 89, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editableform .editable-date {
padding: 0;
margin: 0;
float: left;
}
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
/* line 97, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-inline .add-on .icon-th {
margin-top: 3px;
margin-left: 1px;
}
/* checklist vertical alignment */
/* line 104, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-checklist label {
white-space: nowrap;
}
/* line 105, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-checklist label input[type="checkbox"],.editable-checklist label span
{
vertical-align: middle;
margin: 0;
}
/* set exact width of textarea to fit buttons toolbar */
/* line 114, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-wysihtml5 {
width: 566px;
height: 250px;
}
/* clear button shown as link in date inputs */
/* line 121, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-clear {
clear: both;
font-size: 0.9em;
text-decoration: none;
text-align: right;
}
/* IOS-style clear button for text inputs */
/* line 130, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-clear-x {
background: url("../images/clear.png") center center no-repeat;
display: block;
width: 13px;
height: 13px;
position: absolute;
opacity: 0.6;
z-index: 100;
top: 50%;
right: 6px;
margin-top: -6px;
}
/* line 141, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-clear-x:hover {
opacity: 1;
}
/* line 146, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-pre-wrapped {
white-space: pre-wrap;
}
/* line 151, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-container.editable-popup {
max-width: none !important;
/* without this rule poshytip/tooltip does not stretch */
}
/* line 155, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-container.popover {
width: auto;
/* without this rule popover does not stretch */
}
/* line 159, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-container.editable-inline {
display: inline-block;
vertical-align: middle;
width: auto;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
/* line 167, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-container.ui-widget {
font-size: inherit;
/* jqueryui widget font 1.1em too big, overwrite it */
z-index: 9990;
/* should be less than select2 dropdown z-index to close dropdown first when click */
}
/* line 175, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-click {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
/* line 180, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
a.editable-click {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
/* line 183, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
a.editable-click:hover {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
/* line 189, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-click.editable-disabled {
color: #585858;
cursor: default;
border-bottom: none;
}
/* line 195, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
a.editable-click.editable-disabled {
color: #585858;
cursor: default;
border-bottom: none;
}
/* line 199, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
a.editable-click.editable-disabled:hover {
color: #585858;
cursor: default;
border-bottom: none;
}
/* line 206, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-empty {
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
/* line 211, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-empty:hover,.editable-empty:focus {
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
/* line 219, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-unsaved {
font-weight: bold;
}
/* line 221, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-unsaved:after {
/* content: '*'*/
}
/* line 226, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.editable-bg-transition {
-webkit-transition: background-color 1400ms ease-out;
-moz-transition: background-color 1400ms ease-out;
-o-transition: background-color 1400ms ease-out;
-ms-transition: background-color 1400ms ease-out;
transition: background-color 1400ms ease-out;
}
/*see https://github.com/vitalets/x-editable/issues/139 */
/* line 236, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.form-horizontal .editable {
padding-top: 5px;
display: inline-block;
}
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
/* line 251, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
/* line 262, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker-inline {
width: 220px;
}
/* line 266, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker.datepicker-rtl {
direction: rtl;
}
/* line 268, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker.datepicker-rtl table tr td span {
float: right;
}
/* line 273, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker-dropdown {
top: 0;
left: 0;
}
/* line 276, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
/* line 287, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
/* line 300, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker>div {
display: none;
}
/* line 303, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker.days div.datepicker-days,.datepicker.months div.datepicker-months,.datepicker.years div.datepicker-years
{
display: block;
}
/* line 306, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table {
margin: 0;
}
/* line 309, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker td,.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
/* line 321, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.table-striped .datepicker table tr td,.table-striped .datepicker table tr th
{
background-color: transparent;
}
/* line 328, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
/* line 332, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.old,.datepicker table tr td.new {
color: #999999;
}
/* line 335, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.disabled {
background: none;
color: #999999;
cursor: default;
}
/* line 339, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
/* line 345, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a),
to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',
endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
/* line 359, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a),
to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',
endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
/* line 374, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a),
to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',
endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
/* line 388, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a),
to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a',
endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
/* line 404, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today:hover,.datepicker table tr td.today.disabled:hover,.datepicker table tr td.today:active,.datepicker table tr td.today:hover:active
{
background-color: #fdf59a;
}
/* line 408, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled:active,.datepicker table tr td.today.disabled:hover:active
{
background-color: #fdf59a;
}
/* line 412, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.active,.datepicker table tr td.today:hover.active
{
background-color: #fdf59a;
}
/* line 415, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled {
background-color: #fdf59a;
}
/* line 416, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled.active,.datepicker table tr td.today.disabled:hover.active
{
background-color: #fdf59a;
}
/* line 421, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today:hover.disabled {
background-color: #fdf59a;
}
/* line 425, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled.disabled,.datepicker table tr td.today.disabled:hover.disabled
{
background-color: #fdf59a;
}
/* line 429, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today[disabled],.datepicker table tr td.today:hover[disabled]
{
background-color: #fdf59a;
}
/* line 433, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled[disabled],.datepicker table tr td.today.disabled:hover[disabled]
{
background-color: #fdf59a;
}
/* line 437, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today:active,.datepicker table tr td.today:hover:active
{
background-color: #fbf069 \9;
}
/* line 441, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled:active,.datepicker table tr td.today.disabled:hover:active
{
background-color: #fbf069 \9;
}
/* line 445, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.active,.datepicker table tr td.today:hover.active
{
background-color: #fbf069 \9;
}
/* line 449, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.disabled.active,.datepicker table tr td.today.disabled:hover.active
{
background-color: #fbf069 \9;
}
/* line 453, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today:hover:hover {
color: #000;
}
/* line 456, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.today.active:hover {
color: #fff;
}
/* line 460, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 465, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 471, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.disabled {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 476, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 483, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a),
to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a',
endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 499, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a),
to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a',
endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 516, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a),
to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a',
endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 532, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a),
to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a',
endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
/* line 550, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today:hover,.datepicker table tr td.range.today.disabled:hover,.datepicker table tr td.range.today:active,.datepicker table tr td.range.today:hover:active
{
background-color: #f3e97a;
}
/* line 554, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled:active,.datepicker table tr td.range.today.disabled:hover:active
{
background-color: #f3e97a;
}
/* line 558, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.active,.datepicker table tr td.range.today:hover.active
{
background-color: #f3e97a;
}
/* line 561, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled {
background-color: #f3e97a;
}
/* line 562, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled.active,.datepicker table tr td.range.today.disabled:hover.active
{
background-color: #f3e97a;
}
/* line 567, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today:hover.disabled {
background-color: #f3e97a;
}
/* line 571, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled.disabled,.datepicker table tr td.range.today.disabled:hover.disabled
{
background-color: #f3e97a;
}
/* line 575, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today[disabled],.datepicker table tr td.range.today:hover[disabled]
{
background-color: #f3e97a;
}
/* line 579, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled[disabled],.datepicker table tr td.range.today.disabled:hover[disabled]
{
background-color: #f3e97a;
}
/* line 583, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today:active,.datepicker table tr td.range.today:hover:active
{
background-color: #efe24b \9;
}
/* line 587, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled:active,.datepicker table tr td.range.today.disabled:hover:active
{
background-color: #efe24b \9;
}
/* line 591, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.active,.datepicker table tr td.range.today:hover.active
{
background-color: #efe24b \9;
}
/* line 595, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.range.today.disabled.active,.datepicker table tr td.range.today.disabled:hover.active
{
background-color: #efe24b \9;
}
/* line 601, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, gray);
background-image: -ms-linear-gradient(top, #b3b3b3, gray);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3),
to(gray));
background-image: -webkit-linear-gradient(top, #b3b3b3, gray);
background-image: -o-linear-gradient(top, #b3b3b3, gray);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3',
endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 616, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, gray);
background-image: -ms-linear-gradient(top, #b3b3b3, gray);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3),
to(gray));
background-image: -webkit-linear-gradient(top, #b3b3b3, gray);
background-image: -o-linear-gradient(top, #b3b3b3, gray);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3',
endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 632, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, gray);
background-image: -ms-linear-gradient(top, #b3b3b3, gray);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3),
to(gray));
background-image: -webkit-linear-gradient(top, #b3b3b3, gray);
background-image: -o-linear-gradient(top, #b3b3b3, gray);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3',
endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 647, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, gray);
background-image: -ms-linear-gradient(top, #b3b3b3, gray);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3),
to(gray));
background-image: -webkit-linear-gradient(top, #b3b3b3, gray);
background-image: -o-linear-gradient(top, #b3b3b3, gray);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3',
endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 664, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected:hover,.datepicker table tr td.selected.disabled:hover,.datepicker table tr td.selected:active,.datepicker table tr td.selected:hover:active
{
background-color: #808080;
}
/* line 668, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled:active,.datepicker table tr td.selected.disabled:hover:active
{
background-color: #808080;
}
/* line 672, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.active,.datepicker table tr td.selected:hover.active
{
background-color: #808080;
}
/* line 675, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled {
background-color: #808080;
}
/* line 676, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled.active,.datepicker table tr td.selected.disabled:hover.active
{
background-color: #808080;
}
/* line 681, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected:hover.disabled {
background-color: #808080;
}
/* line 685, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled.disabled,.datepicker table tr td.selected.disabled:hover.disabled
{
background-color: #808080;
}
/* line 689, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected[disabled],.datepicker table tr td.selected:hover[disabled]
{
background-color: #808080;
}
/* line 693, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled[disabled],.datepicker table tr td.selected.disabled:hover[disabled]
{
background-color: #808080;
}
/* line 697, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected:active,.datepicker table tr td.selected:hover:active
{
background-color: #666666 \9;
}
/* line 701, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled:active,.datepicker table tr td.selected.disabled:hover:active
{
background-color: #666666 \9;
}
/* line 705, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.active,.datepicker table tr td.selected:hover.active
{
background-color: #666666 \9;
}
/* line 709, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.selected.disabled.active,.datepicker table tr td.selected.disabled:hover.active
{
background-color: #666666 \9;
}
/* line 714, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 729, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 745, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 760, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 777, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active:hover,.datepicker table tr td.active.disabled:hover,.datepicker table tr td.active:active,.datepicker table tr td.active:hover:active
{
background-color: #0044cc;
}
/* line 781, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled:active,.datepicker table tr td.active.disabled:hover:active
{
background-color: #0044cc;
}
/* line 785, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.active,.datepicker table tr td.active:hover.active
{
background-color: #0044cc;
}
/* line 788, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled {
background-color: #0044cc;
}
/* line 789, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled.active,.datepicker table tr td.active.disabled:hover.active
{
background-color: #0044cc;
}
/* line 794, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active:hover.disabled {
background-color: #0044cc;
}
/* line 798, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled.disabled,.datepicker table tr td.active.disabled:hover.disabled
{
background-color: #0044cc;
}
/* line 802, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active[disabled],.datepicker table tr td.active:hover[disabled]
{
background-color: #0044cc;
}
/* line 806, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled[disabled],.datepicker table tr td.active.disabled:hover[disabled]
{
background-color: #0044cc;
}
/* line 810, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active:active,.datepicker table tr td.active:hover:active
{
background-color: #003399 \9;
}
/* line 814, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled:active,.datepicker table tr td.active.disabled:hover:active
{
background-color: #003399 \9;
}
/* line 818, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.active,.datepicker table tr td.active:hover.active
{
background-color: #003399 \9;
}
/* line 822, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td.active.disabled.active,.datepicker table tr td.active.disabled:hover.active
{
background-color: #003399 \9;
}
/* line 827, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
/* line 838, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span:hover {
background: #eeeeee;
}
/* line 841, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.disabled {
background: none;
color: #999999;
cursor: default;
}
/* line 845, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
/* line 851, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 866, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 882, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 897, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc),
to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',
endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
/* line 914, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active:hover,.datepicker table tr td span.active.disabled:hover,.datepicker table tr td span.active:active,.datepicker table tr td span.active:hover:active
{
background-color: #0044cc;
}
/* line 918, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled:active,.datepicker table tr td span.active.disabled:hover:active
{
background-color: #0044cc;
}
/* line 922, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.active,.datepicker table tr td span.active:hover.active
{
background-color: #0044cc;
}
/* line 925, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled {
background-color: #0044cc;
}
/* line 926, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled.active,.datepicker table tr td span.active.disabled:hover.active
{
background-color: #0044cc;
}
/* line 931, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active:hover.disabled {
background-color: #0044cc;
}
/* line 935, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled.disabled,.datepicker table tr td span.active.disabled:hover.disabled
{
background-color: #0044cc;
}
/* line 939, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active[disabled],.datepicker table tr td span.active:hover[disabled]
{
background-color: #0044cc;
}
/* line 943, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled[disabled],.datepicker table tr td span.active.disabled:hover[disabled]
{
background-color: #0044cc;
}
/* line 947, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active:active,.datepicker table tr td span.active:hover:active
{
background-color: #003399 \9;
}
/* line 951, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled:active,.datepicker table tr td span.active.disabled:hover:active
{
background-color: #003399 \9;
}
/* line 955, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.active,.datepicker table tr td span.active:hover.active
{
background-color: #003399 \9;
}
/* line 959, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.active.disabled.active,.datepicker table tr td span.active.disabled:hover.active
{
background-color: #003399 \9;
}
/* line 964, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker table tr td span.old,.datepicker table tr td span.new {
color: #999999;
}
/* line 969, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker th.datepicker-switch {
width: 145px;
}
/* line 972, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker thead tr:first-child th,.datepicker tfoot tr th {
cursor: pointer;
}
/* line 975, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker thead tr:first-child th:hover,.datepicker tfoot tr th:hover
{
background: #eeeeee;
}
/* line 978, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
/* line 984, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
/* line 990, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.input-append.date .add-on i,.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
/* line 998, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.input-daterange input {
text-align: center;
}
/* line 1000, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* line 1005, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
/* line 1011, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable.scss */
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 18px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker table {
width: 100%;
border: 1px solid #CDCDCD;
background: #fafafa;
-webkit-box-shadow: 0 2px 2px -2px #cccccc;
-moz-box-shadow: 0 2px 2px -2px #cccccc;
box-shadow: 0 2px 2px -2px #cccccc;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker table thead tr:first-child {
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #ececec));
background-image: -webkit-linear-gradient(top, #fdfdfd, #ececec);
background-image: -moz-linear-gradient(top, #fdfdfd, #ececec);
background-image: -o-linear-gradient(top, #fdfdfd, #ececec);
background-image: linear-gradient(top, #fdfdfd, #ececec);
border-bottom: 1px solid #CDCDCD;
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker table thead tr:first-child th {
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker table thead tr:first-child th:hover {
background: #ececec;
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZkZmRmZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2VjZWNlYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fdfdfd),
color-stop(100%, #ececec));
background-image: -webkit-linear-gradient(top, #fdfdfd, #ececec);
background-image: -moz-linear-gradient(top, #fdfdfd, #ececec);
background-image: -o-linear-gradient(top, #fdfdfd, #ececec);
background-image: linear-gradient(top, #fdfdfd, #ececec);
color: #404040;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker table tr td.day:hover,.datepicker table tr td span:hover {
background: #32779a;
color: #fff;
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker table tr td.active.active,.datepicker table tr td.active:hover.active,.datepicker table tr td span.active:hover.active,.datepicker table tr td span.active.active
{
background: #519FC7;
color: #fff;
}
/* line 44, /home/andrei/core-admin-release/core-admin/source/stylesheets/bootstrap-editable-fix.scss */
.datepicker-inline {
width: auto;
}
@media ( max-width : 991px) {
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.sidebar-background {
display: none;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.primary-sidebar {
*zoom: 1;
position: static;
width: auto;
float: none;
background: #11161A;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.primary-sidebar:before,.primary-sidebar:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.primary-sidebar:after {
clear: both;
}
/* line 17, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.main-content {
margin: 0;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.user-avatar>.dropdown-toggle {
display: none;
}
/* line 27, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dropdown-menu li.with-image span,.dropdown-menu li a {
text-shadow: none;
}
/* line 31, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.label,.badge,.navbar-inverse .nav>li>a,.navbar-inverse .nav>li.active>a
{
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* line 35, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.navbar-collapse .nav>li>a,.navbar-collapse .dropdown-menu a {
font-weight: 600;
}
/* line 39, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.primary-sidebar .nav {
margin: 0;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.breadcrumb-line {
height: auto;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.breadcrumb-line .breadcrumbs {
*zoom: 1;
float: none;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.breadcrumb-line .breadcrumbs:before,.breadcrumb-line .breadcrumbs:after
{
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.breadcrumb-line .breadcrumbs:after {
clear: both;
}
/* line 51, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.breadcrumb-line .nav.pull-right {
float: none;
margin-right: 0px;
border-right: none;
border-top: 1px solid #ccc;
}
/* line 56, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.breadcrumb-line .nav.pull-right>li:first-child>a {
border-left: none;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.user-avatar .dropdown-menu {
display: block;
}
/* line 68, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.navbar-collapse .dropdown-menu {
background: transparent;
}
/* line 71, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.navbar-collapse .dropdown-menu li a {
background: rgba(0, 0, 0, 0.2);
margin-bottom: 3px;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.navbar-collapse .dropdown-menu li+li a {
margin-bottom: 3px;
}
/* line 83, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.action-nav-normal .action-nav-button {
display: block;
}
/* line 87, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.action-nav-normal.action-nav-line .action-nav-row {
margin-right: 0;
}
/* line 91, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.action-nav-normal .action-nav-row {
margin-right: 0px;
}
/* line 95, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.action-nav-normal.rounded .action-nav-button {
display: inline-block;
}
/* line 100, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.navbar-form .form-group,.navbar-form .search-query.animated,.navbar-form .search-query.animated:focus,.navbar-form .search-query.animated .focused
{
width: 100%;
}
/* line 104, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dropdown-menu .divider {
display: none;
}
/* line 110, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.navbar-inverse .nav>li.cdrop>a,.navbar-inverse .nav>li.cdrop.active>a {
margin-right: 0;
background: transparent;
border: none;
box-shadow: none;
}
/* line 120, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.nav-tabs-right li>a>span,.nav-tabs-right .title,.nav-tabs-left li>a>span,.nav-tabs-left .title
{
display: none;
}
/* line 126, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dark-nav.to-right .dropdown-menu {
margin: 0;
position: relative;
left: 0;
background: #11161A;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
height: 100%;
}
/* line 134, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dark-nav.to-right .dropdown-menu:before {
content: none;
}
/* line 139, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dark-nav.to-right .dropdown-menu li a {
margin-bottom: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
/* line 144, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dark-nav.to-right .dropdown-menu li+li a {
margin-bottom: 0;
}
/* line 148, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive992.scss */
.dark-nav.to-right .dropdown-menu a:hover {
background: rgba(50, 50, 50, 0.1);
background-image:
url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0icmdiYSg5MCwgOTAsIDkwLCAwLjIpIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSJyZ2JhKDUwLCA1MCwgNTAsIDAuMSkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');
background-size: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(90, 90,
90, 0.2)), color-stop(100%, rgba(50, 50, 50, 0.1)));
background-image: -webkit-linear-gradient(top, rgba(90, 90, 90, 0.2),
rgba(50, 50, 50, 0.1));
background-image: -moz-linear-gradient(top, rgba(90, 90, 90, 0.2),
rgba(50, 50, 50, 0.1));
background-image: -o-linear-gradient(top, rgba(90, 90, 90, 0.2),
rgba(50, 50, 50, 0.1));
background-image: linear-gradient(top, rgba(90, 90, 90, 0.2),
rgba(50, 50, 50, 0.1));
color: white;
}
}
@media ( max-width : 767px) {
/* line 5, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
body {
padding: 0;
}
/* line 9, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.btn-block {
margin-bottom: 10px;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.user-avatar {
padding-bottom: 0;
}
/* line 18, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.dataTables_info {
display: none;
}
/* line 22, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.dataTables_filter input[type="text"] {
width: 130px;
}
/* line 26, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.dataTables_length {
display: none;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.next.paginate_button,.previous.paginate_button {
display: none;
}
/* line 34, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.area-top {
text-align: center;
}
/* line 38, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.area-top .header {
margin-top: 0;
margin-bottom: 7px;
text-align: center;
float: none !important;
}
/* line 43, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.area-top .header i {
float: none;
}
/* line 48, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.area-top .sparkline-box {
float: none !important;
display: inline-block;
}
}
@media ( max-width : 550px) {
/* line 58, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive768.scss */
.area-top .sparkline-box .sparkline {
display: none;
}
}
@media ( max-width : 480px) {
/* line 4, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.area-top .num-stats li {
width: auto;
}
/* line 8, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar .nav.pull-right {
float: none;
*zoom: 1;
}
/* line 24, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.navbar .nav.pull-right:before,.navbar .nav.pull-right:after {
display: table;
content: "";
line-height: 0;
}
/* line 30, /home/andrei/core-admin-release/core-admin/source/stylesheets/mixin_helpers.scss */
.navbar .nav.pull-right:after {
clear: both;
}
/* line 13, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar-inner {
text-align: center;
}
/* line 16, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar-inner a {
margin-right: 0;
}
/* line 21, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar-brand+.nav {
display: inline-block;
margin-bottom: 10px;
}
/* line 27, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar-inverse .nav>li>a {
margin-right: 0;
}
/* line 32, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar-inverse .navbar-brand+.nav>li>a {
margin-right: 10px;
}
/* line 36, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.navbar-inverse .navbar-brand+.nav>li:last-child a {
margin-right: 0;
}
/* line 42, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.area-top {
height: auto;
text-align: center;
}
/* line 46, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.area-top .num-stats {
float: none;
display: inline-block;
}
/* line 50, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.area-top .num-stats li {
padding: 5px;
}
/* line 57, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.chat-box.timeline .arrow-box-left {
margin-left: 0;
}
/* line 60, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.chat-box.timeline .arrow-box-left:after,.chat-box.timeline .arrow-box-left:before
{
content: none;
}
/* line 64, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.chat-box.timeline .arrow-box-left .avatar {
left: 10px;
top: 5px;
}
/* line 69, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.chat-box.timeline .arrow-box-left .name {
float: left;
margin-left: 45px;
}
/* line 76, /home/andrei/core-admin-release/core-admin/source/stylesheets/responsive480.scss */
.chat-box.timeline+.closable-chat-box {
margin-left: 0;
}
}
|
101j
|
SiteMan/WebContent/resources/app/css/application.css
|
CSS
|
gpl3
| 419,172
|
/* @font-face { */
/* font-family: 'Open Sans'; */
/* font-style: normal; */
/* font-weight: 400; */
/* src: local('Open Sans'), local('OpenSans'), */
/* url(https://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) */
/* format('woff'); */
/* } */
/* @font-face { */
/* font-family: 'Open Sans'; */
/* font-style: normal; */
/* font-weight: 600; */
/* src: local('Open Sans Semibold'), local('OpenSans-Semibold'), */
/* url(https://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSnhCUOGz7vYGh680lGh-uXM.woff) */
/* format('woff'); */
/* } */
/* @font-face { */
/* font-family: 'Open Sans'; */
/* font-style: normal; */
/* font-weight: 800; */
/* src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), */
/* url(https://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hnhCUOGz7vYGh680lGh-uXM.woff) */
/* format('woff'); */
/* } */
.primary-sidebar .panel-body {
background: #B7CEEC;
/* padding: 0px; */
}
.test {
height: 100%;
vertical-align: middle;
text-align: center;
}
.primary-sidebar .list-group {
margin: 0px;
}
.no-padding {
padding: 0px;
}
.list-group>li>a>span {
padding-left: 3px;
}
.dashboard-stats .avatar.green {
background: -moz-linear-gradient(center top, #AAD09C, #8CC079) repeat
scroll 0 0/100% auto #8CC079;
}
.dashboard-stats .avatar.yellow {
background: -moz-linear-gradient(center top, #FFDB58, #E9AB17) repeat
scroll 0 0/100% auto #E9AB17;
/* border: 1px solid #74B35D; */
}
.dashboard-stats .avatar.red {
background: -moz-linear-gradient(center top, #C35817, #C11B17) repeat
scroll 0 0/100% auto #C11B17;
/* border: 1px solid #74B35D; */
}
.dashboard-stats .avatar i {
color: white;
line-height: 31px;
}
.dashboard-stats li {
padding: 0px;
}
.dashboard-stats .avatar {
border-radius: 50%;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
height: 32px;
line-height: 32px;
text-align: center;
vertical-align: center;
width: 32px;
font-size: 12px;
}
.top-row {
padding-bottom: 10px;
}
.padd-sm {
background: -moz-linear-gradient(center top, #A5CAE1, #7FB3D4) repeat
scroll 0 0/100% auto #7FB3D4;
padding-left: 8px;
padding-right: 8px;
padding-top: 2px;
padding-bottom: 2px;
border-radius: 8px;
}
.navbar-brand {
float: left;
font-size: 18px;
line-height: 20px;
padding-left: 8px;
padding-top: 4px;
padding-bottom: 4px;
}
.navbar-inverse .navbar-nav>li>a {
color: white;
}
.navbar-inverse .navbar-text {
color: black;
}
.fc-header-title h2 {
padding-top: 0.5em;
font-size: 1em;
}
.fc-header .fc-header-right {
padding-top: 0.5em;
padding-left: 0.25em;
padding-right: 0.25em;
}
.fc-header .fc-header-left {
padding-top: 0.5em;
padding-left: 0.25em;
padding-right: 0.25em;
}
.icon-center {
padding-top: 0.5em;
}
|
101j
|
SiteMan/WebContent/resources/app/css/css.css
|
CSS
|
gpl3
| 2,852
|
<div class="row">
<div id="orders" class="ra-section"></div>
</div>
<script id="template" type="text/x-kendo-template">
<div class="btn-group">
<button type="button" class="btn btn-default">
<span class="fa fa-plus-square-o fa-lg"></span>
</button>
<button type="button" class="btn btn-default">
<span class="fa fa-pencil-square-o fa-lg"></span>
</button>
<button type="button" class="btn btn-default">
<span class="fa fa-trash-o fa-lg"></span>
</button>
<button type="button" class="btn btn-default">
<span class="fa fa-columns fa-lg"></span>
</button>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle"
data-toggle="dropdown">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="\#">Dropdown link</a></li>
<li><a href="\#">Dropdown link</a></li>
</ul>
</div>
</div>
</script>
<script src="resources/app/js/grid.js"></script>
|
101j
|
SiteMan/WebContent/resources/include/grid.inc
|
HTML
|
gpl3
| 1,116
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class THAMSO
{
public decimal SoTien_KhamBenh {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/THAMSO.cs
|
C#
|
asf20
| 235
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class CHITIET_TOATHUOC
{
public int CTBA_ID{get;set;}
public int Thuoc_ID{get;set;}
public int SoLuong{get;set;}
public decimal GiaBan{get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/CHITIET_TOATHUOC.cs
|
C#
|
asf20
| 335
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class BENHAN
{
public int BenhAn_ID { get; set; }
public int HSBN_ID { get; set; }
public DateTime NgayLap_BA { get; set; }
public int BacSi_LapBA { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/BENHAN.cs
|
C#
|
asf20
| 349
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOADON_KHAMBENH
{
public int MaHD_KhamBenh{get;set;}
public int ThuNgan_ID {get;set;}
public int HSBN_ID {get;set;}
public DateTime NgayLap_HDKB {get;set;}
public decimal SoTien { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOADON_KHAMBENH.cs
|
C#
|
asf20
| 394
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class LOAIPHONG
{
public int LoaiPhong_ID {get;set;}
public string LoaiPhong {get;set;}
public decimal GiaPhong {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/LOAIPHONG.cs
|
C#
|
asf20
| 310
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class KHOA
{
public int Khoa_ID {get;set;}
public string MaKhoa {get;set;}
public int TruongKhoa {get;set;}
public string TenKhoa {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/KHOA.cs
|
C#
|
asf20
| 331
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class CHITIET_BENHAN
{
public int CTBA_ID { get; set; }
public int BenhAn_ID { get; set; }
public DateTime NgayLap_CTBA { get; set; }
public int BacSi_Kham { get; set; }
public string ChuanDoan { get; set; }
public string ChiDinh { get; set; }
public string SoTheBHYT { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/CHITIET_BENHAN.cs
|
C#
|
asf20
| 479
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class CHITIETKHAM_DV_NOITRU
{
public int NKKB_ID {get;set;}
public int DichVu_ID{get;set;}
public decimal GiaSuDung { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/CHITIETKHAM_DV_NOITRU.cs
|
C#
|
asf20
| 323
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOADONKHAM_DV_NGOAITRU
{
public int MaHD_DVNT{get;set;}
public int ThuNgan_ID{get;set;}
public int CTBA_ID{get;set;}
public int DichVu_ID{get;set;}
public DateTime NgayLap_HDDVNT{get;set;}
public decimal SoTien{get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOADONKHAM_DV_NGOAITRU.cs
|
C#
|
asf20
| 423
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOADON_XUATVIEN
{
public int MaHD_XV {get;set;}
public int ThuNgan_ID {get;set;}
public int HSNV_ID {get;set;}
public DateTime NgayLap_HDXV {get;set;}
public decimal SoTien {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOADON_XUATVIEN.cs
|
C#
|
asf20
| 383
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOADON_TOATHUOC
{
public int MaHD_ToaThuoc {get;set;}
public int ThuNgan_ID {get;set;}
public int CTBA_ID {get;set;}
public DateTime NgayLap_HDTT {get;set;}
public decimal SoTien {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOADON_TOATHUOC.cs
|
C#
|
asf20
| 389
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class BAOHIEM_YTE
{
public string SoTheBHYT { get; set; }
public int HSBN_ID { get; set; }
public DateTime NgayHetHan { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/BAOHIEM_YTE.cs
|
C#
|
asf20
| 317
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class THUOC
{
public int Thuoc_ID {get;set;}
public string MaThuoc {get;set;}
public string TenThuoc{get;set;}
public decimal GiaThuoc{get;set;}
public bool LoaiThuoc{get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/THUOC.cs
|
C#
|
asf20
| 370
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class NHANPHONG
{
public int HSNV_ID {get;set;}
public int Phong_ID {get;set;}
public DateTime NgayNhanPhong {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/NHANPHONG.cs
|
C#
|
asf20
| 304
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class DUNGCU_YTE
{
public int DungCu_ID {get;set;}
public string MaDungCu {get;set;}
public string TenDungCu {get;set;}
public decimal GiaSuDung { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/DUNGCU_YTE.cs
|
C#
|
asf20
| 355
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOSO_BENHNHAN
{
public int HSBN_ID { get; set; }
public string MaBenhNhan { get; set; }
public string DienThoai { get; set; }
public string SoCMND { get; set; }
public string HoTen { get; set; }
public DateTime NgaySinh { get; set; }
public string DiaChi { get; set; }
public bool GioiTinh { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOSO_BENHNHAN.cs
|
C#
|
asf20
| 556
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class DICHVU
{
public int DichVu_ID{get;set;}
public string MaDichVu{get;set;}
public string TenDichVu{get;set;}
public decimal GiaDichVu{get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/DICHVU.cs
|
C#
|
asf20
| 338
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class NHATKI_KHAMBENH
{
public int NKKB_ID { get; set; }
public int HSNV_ID { get; set; }
public DateTime NgayKham { get; set; }
public string TinhTrangBenh { get; set; }
public string ChuanDoan { get; set; }
public decimal TongTien_ThuocDieuTri { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/NHATKI_KHAMBENH.cs
|
C#
|
asf20
| 453
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class PHONG
{
public int Phong_ID {get;set;}
public string MaPhong {get;set;}
public int LoaiPhong_ID {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/PHONG.cs
|
C#
|
asf20
| 297
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOSO_NHAPVIEN
{
public int HSNV_ID { get; set; }
public int CTBA_ID { get; set; }
public int BacSi_DieuTri { get; set; }
public DateTime NgayLap_HSNV { get; set; }
public DateTime NgayXuatVien { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOSO_NHAPVIEN.cs
|
C#
|
asf20
| 406
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class CHITIETKHAM_DV_NGOAITRU
{
public int CTBA_ID {get;set;}
public int DichVu_ID{get;set;}
public decimal GiaSuDung { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/CHITIETKHAM_DV_NGOAITRU.cs
|
C#
|
asf20
| 325
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class CHITIET_DONTHUOC_DIEUTRI
{
public int NKKB_ID{get;set;}
public int Thuoc_ID{get;set;}
public int SoLuong{get;set;}
public decimal GiaBan{get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/CHITIET_DONTHUOC_DIEUTRI.cs
|
C#
|
asf20
| 343
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class CHITIET_SUDUNG_DUNGCU
{
public int NKKB_ID { get; set; }
public int DungCu_ID { get; set; }
public int SoLuong { get; set; }
public decimal GiaSuDung { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/CHITIET_SUDUNG_DUNGCU.cs
|
C#
|
asf20
| 347
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class THUNGAN
{
public int ThuNgan_ID{get;set;}
public string MaThuNgan{get;set;}
public string TenThuNgan{get;set;}
public string MatKhau{get;set;}
public string SoDienThoai{get;set;}
public string Email{get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/THUNGAN.cs
|
C#
|
asf20
| 411
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class HOADON_TAMUNG
{
public int MaHD_TU {get;set;}
public int ThuNgan_ID {get;set;}
public int HSNV_ID {get;set;}
public DateTime NgayLap_HDTU {get;set;}
public decimal SoTien {get;set;}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/HOADON_TAMUNG.cs
|
C#
|
asf20
| 381
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSDL_NC_07.DAO;
namespace CSDL_NC_07.BUS
{
public class BACSI
{
public int BacSi_ID { get; set; }
public string MaBacSi { get; set; }
public int Khoa_ID { get; set; }
public string TenBacSi { get; set; }
public string MatKhau { get; set; }
public string SoDienThoai { get; set; }
public string Email { get; set; }
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/BUS/BACSI.cs
|
C#
|
asf20
| 501
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSDL_NC_07")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSDL_NC_07")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0a81b538-d5db-4ee5-9ca8-59d31b6b09f1")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/Properties/AssemblyInfo.cs
|
C#
|
asf20
| 1,432
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSDL_NC_07.DAO;
using CSDL_NC_07.BUS;
using System.Data.SqlClient;
namespace CSDL_NC_07.GUI.other
{
public partial class MHXemTieuSuBenh : UserControl
{
public MHXemTieuSuBenh()
{
InitializeComponent();
}
private void MHXemTieuSuBenh_Load(object sender, EventArgs e)
{
txtMaBenhNhan.Focus();
}
private void txtMaBenhNhan_Click(object sender, EventArgs e)
{
txtMaBenhNhan.Text = "";
}
private void btnKiemTra_Click(object sender, EventArgs e)
{
if (txtMaBenhNhan.Text.Length != 12){
MessageBox.Show("Mã bệnh nhân không hợp lệ.");
return;
}
DataProvider dataProvider = new DataProvider();
List<SqlParameter> parameterList = new List<SqlParameter>();
parameterList.Add(new SqlParameter("MaBenhNhan", txtMaBenhNhan.Text));
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataSet ds = dataProvider.ExcuteProcedureGetDataSet("usp_TieuSuBenh6ThangGanDay", parameterList.ToArray());
dataProvider.Disconnect();
gViewDichVu.DataSource = ds.Tables[1];
gViewTieuSu.DataSource = ds.Tables[0];
}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/other/MHXemTieuSuBenh.cs
|
C#
|
asf20
| 1,570
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSDL_NC_07.DAO;
using System.Data.SqlClient;
namespace CSDL_NC_07.GUI.other
{
public partial class MHThemHSNV : UserControl
{
public MHThemHSNV()
{
InitializeComponent();
}
private void MHThemHSNV_Load(object sender, EventArgs e)
{
//load ds bác sĩ lên combobox
DataProvider dataProvider = new DataProvider();
string sqlStr = "select bs.BacSi_ID, bs.TenBacSi from BACSI bs";
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataTable dt = dataProvider.ExcuteQueryDataTable(sqlStr);
dataProvider.Disconnect();
cbbBS.DataSource = dt;
cbbBS.DisplayMember = "TenBacSi";
cbbBS.ValueMember = "BacSi_ID";
lblThongBao.Text = "";
txtMaCTBA.Focus();
}
private void txtMaCTBA_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != ',' && e.KeyChar != '.' && e.KeyChar != (char)46 && e.KeyChar != (char)8)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+"))
{
e.Handled = true;
}
}
}
private void txtMaCTBA_TextChanged(object sender, EventArgs e)
{
string _ctbaId = txtMaCTBA.Text;
if (_ctbaId != "")
{
DataProvider dataProvider = new DataProvider();
string sqlStr = "select top 1 ctba.BenhAn_ID from CHITIET_BENHAN ctba where ctba.CTBA_ID = " + _ctbaId;
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataTable dt = dataProvider.ExcuteQueryDataTable(sqlStr);
if (dt.Rows.Count == 1)
{
sqlStr = "select top 1 ba.HSBN_ID from BENHAN ba where ba.BenhAn_ID = " + dt.Rows[0][0].ToString();
dt = dataProvider.ExcuteQueryDataTable(sqlStr);
sqlStr = "select top 1 * from HOSO_BENHNHAN hsbn where hsbn.HSBN_ID = " + dt.Rows[0][0].ToString();
dt = dataProvider.ExcuteQueryDataTable(sqlStr);
txtHoTen.Text = dt.Rows[0]["HoTen"].ToString();
txtCMND.Text = dt.Rows[0]["SoCMND"].ToString();
txtNgaySinh.Text = dt.Rows[0]["NgaySinh"].ToString();
}
else
{
txtHoTen.Text = "";
txtCMND.Text = "";
txtNgaySinh.Text = "";
}
dataProvider.Disconnect();
}
else
{
txtHoTen.Text = "";
txtCMND.Text = "";
txtNgaySinh.Text = "";
}
lblThongBao.Text = "";
}
private void btnLapHS_Click(object sender, EventArgs e)
{
string _ctbaId = txtMaCTBA.Text;
int _iCtbaId;
if(_ctbaId=="")
{
lblThongBao.Text = "CHƯA NHẬP MÃ BỆNH ÁN";
return;
}
try
{
_iCtbaId = int.Parse(_ctbaId);
}
catch
{
lblThongBao.Text = "SAI ĐỊNH DẠNG MÃ BỆNH ÁN. VUI LÒNG NHẬP LẠI.";
return;
}
DataProvider dataProvider = new DataProvider();
if (!dataProvider.IsConnect())
dataProvider.Connect();
List<SqlParameter> parameters = new List<SqlParameter>();
SqlParameter _paraCTBA = new SqlParameter("@CTBA_ID", SqlDbType.Int);
_paraCTBA.Value = int.Parse(_ctbaId);
parameters.Add(_paraCTBA);
SqlParameter _paraBSDT = new SqlParameter("@BacSi_DieuTri", SqlDbType.Int);
_paraBSDT.Value = int.Parse(cbbBS.SelectedValue.ToString());
parameters.Add(_paraBSDT);
SqlParameter _paraNgay = new SqlParameter("@NgayLap", SqlDbType.DateTime);
_paraNgay.Value = DateTime.Now;
parameters.Add(_paraNgay);
SqlParameter _paraOut = new SqlParameter("@Out", SqlDbType.Int) { Direction = ParameterDirection.Output };
parameters.Add(_paraOut);
try
{
dataProvider.ExcuteProcedure("sp_ThemHoSoNhapVien", parameters.ToArray());
if (int.Parse(_paraOut.Value.ToString()) == 1)
{
MessageBox.Show("LẬP HỒ SƠ NHẬP VIỆN THÀNH CÔNG");
xoaForm();
}
else
MessageBox.Show("LỖI");
}
catch
{
MessageBox.Show("LỖI");
}
}
private void xoaForm()
{
txtMaCTBA.Text = "";
txtHoTen.Text = "";
txtCMND.Text = "";
txtNgaySinh.Text = "";
cbbBS.SelectedItem = 0;
lblThongBao.Text = "";
}
private void btnHuy_Click(object sender, EventArgs e)
{
xoaForm();
}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/other/MHThemHSNV.cs
|
C#
|
asf20
| 5,608
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSDL_NC_07.DAO;
using System.Data.SqlClient;
using CSDL_NC_07.BUS;
namespace CSDL_NC_07.GUI.other
{
public partial class MHThemHDTU : UserControl
{
private THUNGAN thuNgan = null;
public MHThemHDTU(THUNGAN _thuNgan)
{
InitializeComponent();
thuNgan = _thuNgan;
}
private void btnHuy_Click(object sender, EventArgs e)
{
xoaForm();
}
private void btnLapHD_Click(object sender, EventArgs e)
{
string _hsnvId = txtMaHSNV.Text;
string _soTien = txtSoTien.Text;
int _iHSNVId;
double _dSoTien;
if (_hsnvId == "")
{
lblThongBao.Text = "CHƯA NHẬP MÃ HỒ SƠ NHẬP VIỆN";
return;
}
if(_soTien == "")
{
lblThongBao.Text = "CHƯA NHẬP SỐ TIỀN";
return;
}
try
{
_iHSNVId = int.Parse(_hsnvId);
_dSoTien = double.Parse(_soTien);
}
catch
{
lblThongBao.Text = "SAI ĐỊNH DẠNG THÔNG TIN NHẬP VÀO. VUI LÒNG KIỂM TRA LẠI.";
return;
}
DataProvider dataProvider = new DataProvider();
if (!dataProvider.IsConnect())
dataProvider.Connect();
List<SqlParameter> parameters = new List<SqlParameter>();
SqlParameter _paraSoTien = new SqlParameter("@SoTien", SqlDbType.Money);
_paraSoTien.Value = _dSoTien;
parameters.Add(_paraSoTien);
SqlParameter _paraThuNgan = new SqlParameter("@ThuNgan_ID", SqlDbType.Int);
_paraThuNgan.Value = thuNgan.ThuNgan_ID;
parameters.Add(_paraThuNgan);
SqlParameter _paraHSNV = new SqlParameter("@HSNV_ID", SqlDbType.Int);
_paraHSNV.Value = _iHSNVId;
parameters.Add(_paraHSNV);
SqlParameter _paraNgayLap = new SqlParameter("@NgayLap_HDTU", SqlDbType.DateTime);
_paraNgayLap.Value = DateTime.Now;
parameters.Add(_paraNgayLap);
SqlParameter _paraOut = new SqlParameter("@Out", SqlDbType.Int) { Direction = ParameterDirection.Output };
parameters.Add(_paraOut);
try
{
dataProvider.ExcuteProcedure("sp_ThemHoaDon_TamUng", parameters.ToArray());
if (int.Parse(_paraOut.Value.ToString()) == 1)
{
MessageBox.Show("LẬP HÓA ĐƠN TẠM ỨNG THÀNH CÔNG");
xoaForm();
}
else
MessageBox.Show("LỖI");
}
catch
{
MessageBox.Show("LỖI");
}
}
private void xoaForm()
{
txtCMND.Text = "";
txtHoTen.Text = "";
txtNgaySinh.Text = "";
txtMaHSNV.Text = "";
txtSoTien.Text = "";
lblThongBao.Text = "";
}
private void txtSoTien_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != ',' && e.KeyChar != '.' && e.KeyChar != (char)46 && e.KeyChar != (char)8)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+"))
{
e.Handled = true;
}
}
}
private void txtMaHSNV_TextChanged(object sender, EventArgs e)
{
lblThongBao.Text = "";
string _hsnvId = txtMaHSNV.Text;
if (_hsnvId != "")
{
DataProvider dataProvider = new DataProvider();
string sqlStr = "select hsnv.CTBA_ID from HOSO_NHAPVIEN hsnv where hsnv.HSNV_ID = " + _hsnvId;
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataTable dt = dataProvider.ExcuteQueryDataTable(sqlStr);
if (dt.Rows.Count == 1)
{
sqlStr = "select top 1 ctba.BenhAn_ID from CHITIET_BENHAN ctba where ctba.CTBA_ID = " + dt.Rows[0][0].ToString();
dt = dataProvider.ExcuteQueryDataTable(sqlStr);
sqlStr = "select top 1 ba.HSBN_ID from BENHAN ba where ba.BenhAn_ID = " + dt.Rows[0][0].ToString();
dt = dataProvider.ExcuteQueryDataTable(sqlStr);
sqlStr = "select top 1 * from HOSO_BENHNHAN hsbn where hsbn.HSBN_ID = " + dt.Rows[0][0].ToString();
dt = dataProvider.ExcuteQueryDataTable(sqlStr);
txtHoTen.Text = dt.Rows[0]["HoTen"].ToString();
txtCMND.Text = dt.Rows[0]["SoCMND"].ToString();
txtNgaySinh.Text = dt.Rows[0]["NgaySinh"].ToString();
}
else
{
txtHoTen.Text = "";
txtCMND.Text = "";
txtNgaySinh.Text = "";
}
dataProvider.Disconnect();
}
else
{
txtHoTen.Text = "";
txtCMND.Text = "";
txtNgaySinh.Text = "";
}
}
private void txtMaHSNV_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar != ',' && e.KeyChar != '.' && e.KeyChar != (char)46 && e.KeyChar != (char)8)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+"))
{
e.Handled = true;
}
}
}
private void MHThemHDTU_Load(object sender, EventArgs e)
{
lblThongBao.Text = "";
txtMaHSNV.Focus();
}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/other/MHThemHDTU.cs
|
C#
|
asf20
| 6,292
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSDL_NC_07.BUS;
using CSDL_NC_07.DAO;
using System.Data.SqlClient;
using System.Globalization;
namespace CSDL_NC_07.GUI.other
{
public partial class MHThemHDXV : UserControl
{
public THUNGAN thuNgan { get; set; }
private decimal outputValue = 0;
public MHThemHDXV()
{
InitializeComponent();
}
private void MHThemHDXV_Load(object sender, EventArgs e)
{
txtMaBenhNhan.Focus();
}
#region btnKiemTra_Click()
private void btnKiemTra_Click(object sender, EventArgs e)
{
if (txtMaBenhNhan.Text.Length < 12 || txtMaBenhNhan.Text.Length > 12)
{
MessageBox.Show("Mã bệnh nhân không hợp lệ.");
return;
}
outputValue = 0;
DataProvider dataProvider = new DataProvider();
List<SqlParameter> parameterList = new List<SqlParameter>();
parameterList.Add(new SqlParameter("MaBenhNhan", txtMaBenhNhan.Text));
parameterList.Add(new SqlParameter("SoTienHoaDonXuatVien", outputValue));
parameterList[parameterList.Count - 1].SqlDbType = SqlDbType.Money;
parameterList[parameterList.Count - 1].Direction = ParameterDirection.InputOutput;
parameterList.Add(new SqlParameter("ThuNgan_ID", null));
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataSet ds = dataProvider.ExcuteProcedureGetDataSetWithOutput("usp_LapHoaDonXuatVien", parameterList.ToArray(), out outputValue);
dataProvider.Disconnect();
if (outputValue > 0)
{
gViewTamUng.DataSource = ds.Tables[0];
gViewThuoc.DataSource = ds.Tables[1];
gViewPhong.DataSource = ds.Tables[2];
gViewDungCu.DataSource = ds.Tables[3];
gViewDichVu.DataSource = ds.Tables[4];
sContainer1.Visible = true;
panel1.Visible = true;
// ẩn nút
label1.Visible = false;
txtMaBenhNhan.Visible = false;
btnKiemTra.Visible = false;
//
CultureInfo cul = CultureInfo.GetCultureInfo("vi-VN");
txtTienThanhToan.Text = outputValue.ToString("#,###", cul.NumberFormat);
}
}
#endregion
#region btnThanhToan_Click()
private void btnThanhToan_Click(object sender, EventArgs e)
{
DataProvider dataProvider = new DataProvider();
List<SqlParameter> parameterList = new List<SqlParameter>();
parameterList.Add(new SqlParameter("MaBenhNhan", txtMaBenhNhan.Text));
parameterList.Add(new SqlParameter("SoTienHoaDonXuatVien", outputValue));
parameterList[parameterList.Count - 1].SqlDbType = SqlDbType.Money;
parameterList[parameterList.Count - 1].Direction = ParameterDirection.InputOutput;
parameterList.Add(new SqlParameter("ThuNgan_ID", thuNgan.ThuNgan_ID));
int num = -1;
if (!dataProvider.IsConnect())
dataProvider.Connect();
num = dataProvider.ExcuteProcedureWithReturn("usp_LapHoaDonXuatVien", parameterList.ToArray());
//DataSet ds = dataProvider.ExcuteProcedureGetDataSetWithOutput("usp_LapHoaDonXuatVien", parameterList.ToArray(), out outputValue);
dataProvider.Disconnect();
if (num != 1)
{
MessageBox.Show("có lỗi xảy ra.");
}
else
{
MessageBox.Show("Lập hóa đơn xuất viện thành công.");
OnLapPhieuXuatVien();
}
}
#endregion
public event EventHandler LapPhieuXuatVienThanhCong;
private void OnLapPhieuXuatVien()
{
EventHandler handler = LapPhieuXuatVienThanhCong;
if (handler != null) handler(this, EventArgs.Empty);
}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/other/MHThemHDXV.cs
|
C#
|
asf20
| 4,424
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSDL_NC_07.BUS;
using CSDL_NC_07.DAO;
using System.Security.Cryptography;
namespace CSDL_NC_07.GUI.other
{
public partial class MHDangNhap : UserControl
{
public BACSI bacSi {get;set;}
public THUNGAN thuNgan {get;set;}
public MHDangNhap()
{
InitializeComponent();
}
private void MHDangNhap_Load(object sender, EventArgs e)
{
txtTenDangNhap.Focus();
cbbLoaiTaiKhoan.SelectedIndex = 0;
}
#region btnDangNhap_Click
private void btnDangNhap_Click(object sender, EventArgs e)
{
if (cbbLoaiTaiKhoan.SelectedIndex == 0)
{
//đăng nhập là bác sĩ
DangNhapBacSi();
}
else
{
//đăng nhập là thu ngân
DangNhapThuNgan();
}
}
#endregion
#region đăng nhập là bác sĩ
private void DangNhapBacSi()
{
DataProvider dataProvider = new DataProvider();
string sqlStr = "select TOP 1 * from BACSI where MaBacSi = '"+ txtTenDangNhap.Text +"' AND MatKhau = '"+ MaHoaMatKhau(txtMatKhau.Text) +"'";
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataTable dt = dataProvider.ExcuteQueryDataTable(sqlStr);
dataProvider.Disconnect();
if (dt != null && dt.Rows.Count <= 0)
{
lblThongBaoLoi.Text = "Đăng nhập ko thành công!.";
return;
}
bacSi = new BACSI();
bacSi.BacSi_ID = int.Parse(dt.Rows[0]["BacSi_ID"].ToString());
bacSi.TenBacSi = dt.Rows[0]["TenBacSi"].ToString();
bacSi.SoDienThoai = dt.Rows[0]["SoDienThoai"].ToString();
bacSi.Khoa_ID = int.Parse(dt.Rows[0]["Khoa_ID"].ToString());
bacSi.Email = dt.Rows[0]["Email"].ToString();
bacSi.MaBacSi = txtTenDangNhap.Text;
bacSi.MatKhau = MaHoaMatKhau(txtMatKhau.Text);
//
OnDangNhapBacSiThanhCong();
}
#endregion
#region đăng nhập là thu ngân
private void DangNhapThuNgan()
{
DataProvider dataProvider = new DataProvider();
string sqlStr = "select TOP 1 * from THUNGAN where MaThuNgan = '" + txtTenDangNhap.Text + "' AND MatKhau = '" + MaHoaMatKhau(txtMatKhau.Text) + "'";
if (!dataProvider.IsConnect())
dataProvider.Connect();
DataTable dt = dataProvider.ExcuteQueryDataTable(sqlStr);
dataProvider.Disconnect();
if (dt != null && dt.Rows.Count <= 0)
{
lblThongBaoLoi.Text = "Đăng nhập ko thành công!.";
return;
}
thuNgan = new THUNGAN();
thuNgan.Email = dt.Rows[0]["Email"].ToString();
thuNgan.TenThuNgan = dt.Rows[0]["TenThuNgan"].ToString();
thuNgan.SoDienThoai = dt.Rows[0]["SoDienThoai"].ToString();
thuNgan.ThuNgan_ID = int.Parse(dt.Rows[0]["ThuNgan_ID"].ToString());
thuNgan.MatKhau = MaHoaMatKhau(txtMatKhau.Text);
thuNgan.MaThuNgan = txtTenDangNhap.Text;
//
OnDangNhapThuNganThanhCong();
}
#endregion
#region string MaHoaMatKhau(string input)
private string MaHoaMatKhau(string input)
{
// step 1, calculate MD5 hash from input
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
byte[] hash = md5.ComputeHash(inputBytes);
// step 2, convert byte array to hex string
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hash.Length; i++)
{
sb.Append(hash[i].ToString("x2"));
}
return sb.ToString();
}
#endregion
#region xử lý cho btnThoat_Click()
private void btnThoat_Click(object sender, EventArgs e)
{
OnDangXuat();
}
#endregion
#region event DangXuat, DangXuat
public event EventHandler DangXuat;
private void OnDangXuat()
{
EventHandler handler = DangXuat;
if (handler != null) handler(this, EventArgs.Empty);
}
#endregion
#region xử lý cho sự kiện ấn nút enter của txtMatKhau
private void txtMatKhau_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
{
btnDangNhap_Click(btnDangNhap, e);
}
}
#endregion
#region event dang nhap bác sĩ thanh cong, DangNhapBacSiThanhCong
public event EventHandler DangNhapBacSiThanhCong;
private void OnDangNhapBacSiThanhCong()
{
EventHandler handler = DangNhapBacSiThanhCong;
if (handler != null) handler(bacSi, EventArgs.Empty);
}
#endregion
#region event dang nhap thu ngân thanh cong, DangNhapThuNganThanhCong
public event EventHandler DangNhapThuNganThanhCong;
private void OnDangNhapThuNganThanhCong()
{
EventHandler handler = DangNhapThuNganThanhCong;
if (handler != null) handler(thuNgan, EventArgs.Empty);
}
#endregion
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/other/MHDangNhap.cs
|
C#
|
asf20
| 5,856
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CSDL_NC_07.GUI.other
{
public partial class MHQuanLy : UserControl
{
private Bitmap bmpBackground = new Bitmap("img/btn_empty.png");
public bool loaiTaiKhoanDangNhap { get; set; }
public MHQuanLy()
{
InitializeComponent();
}
private void MHQuanLy_Load(object sender, EventArgs e)
{
KhoiTaoDanhSachCacNut();
}
#region tạo button
private Button TaoButton(string btnName, string btnText)
{
Button btn = new Button();
btn.BackColor = System.Drawing.Color.Transparent;
btn.BackgroundImage = bmpBackground;
btn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
btn.FlatAppearance.BorderSize = 0;
btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent;
btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent;
btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
btn.ForeColor = System.Drawing.Color.Maroon;
btn.Margin = new System.Windows.Forms.Padding(10);
btn.Name = btnName;
btn.Size = new System.Drawing.Size(130, 130);
btn.TabIndex = 0;
btn.Text = btnText;
btn.UseVisualStyleBackColor = false;
btn.Click += btn_Click;
return btn;
}
#endregion
#region Khởi tạo danh sách các nút
private void KhoiTaoDanhSachCacNut()
{
if (loaiTaiKhoanDangNhap)
{
//khởi tạo nút cho bác sĩ
//truy vấn 3,4,
flp_main.Controls.Add(TaoButton("btnTruyVan3", "Thêm bệnh án"));
flp_main.Controls.Add(TaoButton("btnTruyVan4", "Xem tiểu sử bệnh"));
}
else
{
//khởi tạo nút cho thu ngân
//truy vấn 1,2,5,6,7
flp_main.Controls.Add(TaoButton("btnTruyVan1", "Kiểm tra hồ sơ bệnh nhân"));
flp_main.Controls.Add(TaoButton("btnTruyVan2", "Thêm hồ sơ bệnh nhân"));
flp_main.Controls.Add(TaoButton("btnTruyVan5", "Thêm hồ sơ nhập viện"));
flp_main.Controls.Add(TaoButton("btnTruyVan6", "Thêm hóa đơn tạm ứng"));
flp_main.Controls.Add(TaoButton("btnTruyVan7", "Thêm hóa đơn xuất viện"));
}
}
#endregion
#region xử lý sự kiện click cho button
void btn_Click(object sender, EventArgs e)
{
OnClickButton((sender as Button).Name);
}
#endregion
#region tạo sự kiện click button
public event EventHandler ClickButton;
private void OnClickButton(string btnName)
{
EventHandler handler = ClickButton;
if (handler != null) handler(btnName, EventArgs.Empty);
}
#endregion
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/other/MHQuanLy.cs
|
C#
|
asf20
| 3,479
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CSDL_NC_07.BUS;
namespace CSDL_NC_07.GUI
{
public partial class frm_main : Form
{
private BACSI bacSi = null;
private THUNGAN thuNgan = null;
private bool loaiTaiKhoanDangNhap = false; //true => bác sĩ, false => thu ngân
public frm_main()
{
InitializeComponent();
}
private void frm_main_Load(object sender, EventArgs e)
{
//Load man hinh dang nhap len dau tien
bacSi = null;
thuNgan = null;
sttStrip_StatusLabel.Text = "...";
HienThiManHinhDangNhap();
}
#region btn_logOut_Click()
private void btn_logOut_Click(object sender, EventArgs e)
{
sContainer_main.Panel2.Controls.Clear();
bacSi = null;
thuNgan = null;
btn_home.Visible = false;
btn_logOut.Visible = false;
lblTenNhanVien.Visible = false;
sttStrip_StatusLabel.Text = "...";
HienThiManHinhDangNhap();
}
#endregion
#region btn_home_Click()
private void btn_home_Click(object sender, EventArgs e)
{
sttStrip_StatusLabel.Text = "...";
HienThiManHinhQuanLy();
}
#endregion
#region Hiển thị màn hình đăng nhập
private void HienThiManHinhDangNhap()
{
//Khởi tạo control màn hình đăng nhập
GUI.other.MHDangNhap mhDangNhap = new GUI.other.MHDangNhap();
mhDangNhap.Dock = DockStyle.Fill;
mhDangNhap.DangNhapThuNganThanhCong += MHDangNhap_DangNhapThuNganThanhCong;
mhDangNhap.DangNhapBacSiThanhCong += MHDangNhap_DangNhapBacSiThanhCong;
mhDangNhap.DangXuat += MHDangNhap_DangXuat;
sContainer_main.Panel2.Controls.Clear();
sContainer_main.Panel2.Controls.Add(mhDangNhap);
}
#region Các event của màn hình đăng nhập
#region đăng nhập thành công
void MHDangNhap_DangNhapThuNganThanhCong(object sender, EventArgs e)
{
thuNgan = (sender as THUNGAN);
lblTenNhanVien.Text = thuNgan.TenThuNgan;
lblTenNhanVien.Visible = true;
btn_home.Visible = true;
btn_logOut.Visible = true;
loaiTaiKhoanDangNhap = false;
HienThiManHinhQuanLy();
}
void MHDangNhap_DangNhapBacSiThanhCong(object sender, EventArgs e)
{
bacSi = (sender as BACSI);
lblTenNhanVien.Text = bacSi.TenBacSi;
lblTenNhanVien.Visible = true;
btn_home.Visible = true;
btn_logOut.Visible = true;
loaiTaiKhoanDangNhap = true;
HienThiManHinhQuanLy();
}
#endregion
#region đăng xuất
void MHDangNhap_DangXuat(object sender, EventArgs e)
{
this.Close();
}
#endregion
#endregion
#endregion
#region Hiển thị màn hình quản lý
private void HienThiManHinhQuanLy()
{
//Hiển thị màn hình quản lý
other.MHQuanLy mhQuanLy = new other.MHQuanLy();
//mhQuanLy.nhanVien = nhanVien;
mhQuanLy.Dock = DockStyle.Fill;
mhQuanLy.loaiTaiKhoanDangNhap = loaiTaiKhoanDangNhap;
mhQuanLy.ClickButton += MHQuanLy_ClickButton;
sttStrip_StatusLabel.Text = "...";
sContainer_main.Panel2.Controls.Clear();
sContainer_main.Panel2.Controls.Add(mhQuanLy);
}
#endregion
//-------------------------------
//-------------------------------
//-------------------------------
//mở cái này ra xem
//-------------------------------
//-------------------------------
//-------------------------------
#region xử lý sự kiện click button trên màn hình quản lý
void MHQuanLy_ClickButton(object sender, EventArgs e)
{
//Tạo thêm usercontrol, mỗi usercontrol là 1 màn hình truy vấn
//Cách add usercontrol xem hàm DEMO_HienThiManHinhThemMonAn
switch ((sender as string))
{
//case "btnTruyVan1":
//HienThiManHinhXuLyTruyVan1();
//break;
//case "btnTruyVan2":
//HienThiManHinhXuLyTruyVan2();
//break;
//case "btnTruyVan3":
//HienThiManHinhXuLyTruyVan3();
//break;
case "btnTruyVan4":
HienThiManHinhXuLyTruyVan4();
break;
case "btnTruyVan5":
HienThiManHinhXuLyTruyVan5();
break;
case "btnTruyVan6":
HienThiManHinhXuLyTruyVan6();
break;
case "btnTruyVan7":
HienThiManHinhXuLyTruyVan7();
break;
default:
sttStrip_StatusLabel.Text = "Nút này không có hoạt động xử lý!.";
break;
}
}
#endregion
#region HienThiManHinhXuLyTruyVan5()
private void HienThiManHinhXuLyTruyVan5()
{
other.MHThemHSNV _mhThemHSNV = new other.MHThemHSNV();
_mhThemHSNV.Dock = DockStyle.Fill;
//sttStrip_StatusLabel.Text = "abcgds";
sContainer_main.Panel2.Controls.Clear();
sContainer_main.Panel2.Controls.Add(_mhThemHSNV);
}
#endregion
#region HienThiManHinhXuLyTruyVan6()
private void HienThiManHinhXuLyTruyVan6()
{
other.MHThemHDTU _mhThemHDTU = new other.MHThemHDTU(thuNgan);
_mhThemHDTU.Dock = DockStyle.Fill;
sContainer_main.Panel2.Controls.Clear();
sContainer_main.Panel2.Controls.Add(_mhThemHDTU);
}
#endregion
#region HienThiManHinhXuLyTruyVan7()
private void HienThiManHinhXuLyTruyVan7()
{
other.MHThemHDXV mhThemHDXV = new other.MHThemHDXV();
mhThemHDXV.thuNgan = thuNgan;
mhThemHDXV.Dock = DockStyle.Fill;
mhThemHDXV.LapPhieuXuatVienThanhCong += mhThemHDXV_LapPhieuXuatVienThanhCong;
sContainer_main.Panel2.Controls.Clear();
sContainer_main.Panel2.Controls.Add(mhThemHDXV);
}
void mhThemHDXV_LapPhieuXuatVienThanhCong(object sender, EventArgs e)
{
HienThiManHinhQuanLy();
}
#endregion
#region HienThiManHinhXuLyTruyVan4()
private void HienThiManHinhXuLyTruyVan4()
{
other.MHXemTieuSuBenh mhXemTieuSuBenh = new other.MHXemTieuSuBenh();
mhXemTieuSuBenh.Dock = DockStyle.Fill;
sContainer_main.Panel2.Controls.Clear();
sContainer_main.Panel2.Controls.Add(mhXemTieuSuBenh);
}
#endregion
private void DEMO_HienThiManHinhThemMonAn()
{
//-- khai báo usercontrol
//other.MHThemMonAn _mhThemNL = new other.MHThemMonAn();
//-- cấu hình cho usercontrol hiển thị Fill
//_mhThemNL.Dock = DockStyle.Fill;
//sttStrip_StatusLabel.Text = "...";
//-- add usercontrol vào panel2 => clear các control trước đó đi
//sContainer_main.Panel2.Controls.Clear();
//-- add usercontrol vào
//sContainer_main.Panel2.Controls.Add(_mhThemNL);
}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/GUI/frm_main.cs
|
C#
|
asf20
| 8,128
|
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.IO;
namespace CSDL_NC_07.DAO
{
class DataProvider
{
public string connectionString { get; set; }
private SqlConnection sqlConnection = null;
public DataProvider(){
//connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=CSDL_NC_07;Integrated Security=True";
//connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=CSDL_NC_07_Index;Integrated Security=True";
StreamReader reader = new StreamReader(@"cn.txt");
while (!reader.EndOfStream)
{
string str = reader.ReadLine();
if (!str.Contains("//"))
{
connectionString = str;
break;
}
}
reader.Close();
}
#region Connect()
public void Connect() {
try
{
sqlConnection = new SqlConnection(connectionString);
sqlConnection.Open();
}
catch (Exception e)
{
throw new Exception("Không kết nối được cơ sở dữ liệu !!! " + e.Message);
}
}
#endregion
#region Disconnect()
public void Disconnect() {
sqlConnection.Close();
sqlConnection = null;
}
#endregion
#region bool IsConnect()
public bool IsConnect()
{
return (sqlConnection != null);
}
#endregion
#region SqlDataReader ExecuteQuery(string strSQL)
public SqlDataReader ExecuteQuery(string strSQL)
{
SqlCommand _command = new SqlCommand(strSQL, sqlConnection);
return _command.ExecuteReader();
}
#endregion
#region object ExecuteScalar(string strSQL)
public object ExecuteScalar(string strSQL)
{
SqlCommand _command = new SqlCommand(strSQL, sqlConnection);
return _command.ExecuteScalar();
}
#endregion
#region int ExecuteNoneQuery(string strSQL)
public int ExecuteNoneQuery(string strSQL)
{
SqlCommand _command = new SqlCommand(strSQL, sqlConnection);
int i = _command.ExecuteNonQuery();
return i;
}
#endregion
#region DataSet ExcuteQueryDataSet(string strSQL)
public DataSet ExcuteQueryDataSet(string strSQL) {
SqlDataAdapter adapter = new SqlDataAdapter(strSQL, sqlConnection);
DataSet ds = new DataSet("DATASET");
adapter.Fill(ds);
return ds;
}
#endregion
#region DataTable ExcuteQueryDataTable(string strSQL)
public DataTable ExcuteQueryDataTable(string strSQL) {
DataSet ds = ExcuteQueryDataSet(strSQL);
return ds.Tables[0];
}
#endregion
#region int ExcuteProcedureWithReturn(string procName, SqlParameter[] parameters)
public int ExcuteProcedureWithReturn(string procName, SqlParameter[] parameters)
{
try
{
SqlCommand command = new SqlCommand();
command.Connection = sqlConnection;
command.CommandText = procName;
command.CommandType = CommandType.StoredProcedure;
if (parameters != null)
{
foreach (SqlParameter para in parameters)
{
command.Parameters.Add(para);
}
}
SqlParameter returnVal = new SqlParameter("returnVal", SqlDbType.Int);
returnVal.Direction = ParameterDirection.ReturnValue;
command.Parameters.Add(returnVal);
command.ExecuteNonQuery();
return Convert.ToInt32(returnVal.Value);
}
catch (Exception ex)
{
throw new Exception("Lỗi DataService.ExcuteProcedureGetTable() \n" + ex.Message);
}
}
#endregion
#region DataTable ExcuteProcedureGetTable(string procName, SqlParameter[] parameters)
public DataTable ExcuteProcedureGetTable(string procName, SqlParameter[] parameters)
{
try
{
SqlCommand command = new SqlCommand();
command.Connection = sqlConnection;
command.CommandText = procName;
command.CommandType = CommandType.StoredProcedure;
if (parameters != null)
{
foreach (SqlParameter para in parameters)
{
command.Parameters.Add(para);
}
}
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet("DATASET");
adapter.Fill(ds);
return ds.Tables[0];
}
catch (Exception ex)
{
throw new Exception("Lỗi DataService.ExcuteProcedureGetTable() !!!\n" + ex.Message);
}
}
#endregion
#region DataTable ExcuteProcedureGetDataSet(string procName, SqlParameter[] parameters)
public DataSet ExcuteProcedureGetDataSet(string procName, SqlParameter[] parameters)
{
try
{
SqlCommand command = new SqlCommand();
command.Connection = sqlConnection;
command.CommandText = procName;
command.CommandType = CommandType.StoredProcedure;
if (parameters != null)
{
foreach (SqlParameter para in parameters)
{
command.Parameters.Add(para);
}
}
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet("DATASET");
adapter.Fill(ds);
return ds;
}
catch (Exception ex)
{
throw new Exception("Lỗi DataService.ExcuteProcedureGetTable() !!!\n" + ex.Message);
}
}
#endregion
#region DataSet ExcuteProcedureGetDataSetWithOutput(string procName, SqlParameter[] parameters, out decimal outputValue )
public DataSet ExcuteProcedureGetDataSetWithOutput(string procName, SqlParameter[] parameters, out decimal outputValue)
{
try
{
SqlCommand command = new SqlCommand();
command.Connection = sqlConnection;
command.CommandText = procName;
command.CommandType = CommandType.StoredProcedure;
if (parameters != null)
{
foreach (SqlParameter para in parameters)
{
command.Parameters.Add(para);
}
}
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet("DATASET");
adapter.Fill(ds);
outputValue = decimal.Parse(adapter.SelectCommand.Parameters["SoTienHoaDonXuatVien"].Value.ToString());
return ds;
}
catch (Exception ex)
{
throw new Exception("Lỗi DataService.ExcuteProcedureGetTable() !!!\n" + ex.Message);
}
}
#endregion
#region ExcuteProcedure(string procName, SqlParameter[] parameters)
public void ExcuteProcedure(string procName, SqlParameter[] parameters)
{
try
{
SqlCommand command = new SqlCommand();
command.Connection = sqlConnection;
command.CommandText = procName;
command.CommandType = CommandType.StoredProcedure;
if (parameters != null)
{
foreach (SqlParameter para in parameters)
{
command.Parameters.Add(para);
}
}
command.ExecuteNonQuery();
}
catch (Exception ex)
{
throw new Exception("Lỗi function DataService.ExcuteProcedure()!!! \n" + ex.Message);
}
}
#endregion
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/DAO/DataProvider.cs
|
C#
|
asf20
| 8,858
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace CSDL_NC_07
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new GUI.frm_main());
}
}
}
|
07csdlnc3b1db3e73c5419de2f84fb508672e820
|
trunk/CSDL_NC_07/CSDL_NC_07/Program.cs
|
C#
|
asf20
| 509
|
# General init
# /!\ Don't forget to update 'CMakeLists.txt' too /!\
AC_INIT([libnfc],[1.7.1],[nfc-tools@googlegroups.com])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(config.h)
# GIT revison
GIT_REVISION=`which git > /dev/null && git describe`
if test x"$GIT_REVISION" != x""; then
AC_DEFINE_UNQUOTED([GIT_REVISION], ["$GIT_REVISION"], [GIT revision])
fi
AM_INIT_AUTOMAKE(subdir-objects dist-bzip2 no-dist-gzip)
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_LANG([C])
AC_PROG_CC
AC_PROG_MAKE_SET
WITH_POSIX_ONLY_EXAMPLES=1
# Libtool
LT_INIT
case "$host" in
*-pc-linux-gnu)
AC_MSG_RESULT([Fixing libtool for -rpath problems.])
sed -i -r 's/(hardcode_into_libs)=.*$/\1=no/' libtool
;;
*-pc-mingw32msvc)
WITH_POSIX_ONLY_EXAMPLES=0
AC_MSG_RESULT([Disable extended examples due to target Windows system.])
# Undefine __STRICT_ANSI__ to allow to use strdup, putenv, etc. without warnings
CFLAGS="$CFLAGS -U__STRICT_ANSI__"
;;
esac
AM_CONDITIONAL(POSIX_ONLY_EXAMPLES_ENABLED, [test "$WITH_POSIX_ONLY_EXAMPLES" = "1"])
PKG_PROG_PKG_CONFIG
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([fcntl.h limits.h stdio.h stdlib.h stdint.h stddef.h stdbool.h sys/ioctl.h sys/param.h sys/time.h termios.h])
AC_CHECK_HEADERS([linux/spi/spidev.h], [spi_available="yes"])
AC_CHECK_HEADERS([linux/i2c-dev.h], [i2c_available="yes"])
AC_CHECK_FUNCS([memmove memset select strdup strerror strstr strtol usleep],
[AC_DEFINE([_XOPEN_SOURCE], [600], [Enable POSIX extensions if present])])
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])
# Note: malloc function should be tested but it produces some error while cross-compiling with MinGW
# AC_FUNC_MALLOC
# Checks for types
AC_TYPE_SIZE_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_OFF_T
LIBNFC_CFLAGS='-I$(top_srcdir)/libnfc -I$(top_builddir)/include -I$(top_srcdir)/include'
AC_SUBST(LIBNFC_CFLAGS)
# Log support (default:yes)
AC_ARG_ENABLE([log],AS_HELP_STRING([--disable-log],[Disable any logs]),[enable_log=$enableval],[enable_log="yes"])
AC_MSG_CHECKING(for log flag)
AC_MSG_RESULT($enable_log)
AM_CONDITIONAL([WITH_LOG], [test "$enable_log" != "no"])
if test x"$enable_log" = "xyes"
then
AC_DEFINE([LOG], [1], [Enable log])
fi
# Conffiles support (default:yes)
AC_ARG_ENABLE([conffiles],AS_HELP_STRING([--disable-conffiles],[Disable use of config files]),[enable_conffiles=$enableval],[enable_conffiles="yes"])
AC_MSG_CHECKING(for conffiles flag)
AC_MSG_RESULT($enable_conffiles)
AM_CONDITIONAL([WITH_CONFFILES], [test "$enable_conffiles" != "no"])
if test x"$enable_conffiles" = "xyes"
then
AC_DEFINE([CONFFILES], [1], [Enable conffiles])
fi
# Envvars support (default:yes)
AC_ARG_ENABLE([envvars],AS_HELP_STRING([--disable-envvars],[Disable use of environment variables]),[enable_envvars=$enableval],[enable_envvars="yes"])
AC_MSG_CHECKING(for envvars flag)
AC_MSG_RESULT($enable_envvars)
AM_CONDITIONAL([WITH_ENVVARS], [test "$enable_envvars" != "no"])
if test x"$enable_envvars" = "xyes"
then
AC_DEFINE([ENVVARS], [1], [Enable envvars])
fi
# Debug support (default:no)
AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debug mode]),[enable_debug=$enableval],[enable_debug="no"])
AC_MSG_CHECKING(for debug flag)
AC_MSG_RESULT($enable_debug)
AM_CONDITIONAL([WITH_DEBUG], [test "$enable_debug" != "no"])
if test x"$enable_debug" = "xyes"
then
AC_DEFINE([DEBUG], [1], [Enable debug flag])
CFLAGS="$CFLAGS -g -O0 -ggdb"
fi
# Handle --with-drivers option
LIBNFC_ARG_WITH_DRIVERS
# Enable UART if
AM_CONDITIONAL(UART_ENABLED, [test x"$uart_required" = x"yes"])
# Enable SPI if
AM_CONDITIONAL(SPI_ENABLED, [test x"$spi_required" = x"yes"])
# Enable I2C if
AM_CONDITIONAL(I2C_ENABLED, [test x"$i2c_required" = x"yes"])
# Documentation (default: no)
AC_ARG_ENABLE([doc],AS_HELP_STRING([--enable-doc],[Enable documentation generation.]),[enable_doc=$enableval],[enable_doc="no"])
AC_MSG_CHECKING(for documentation request)
AC_MSG_RESULT($enable_doc)
if test x"$enable_doc" = "xyes"
then
AC_PATH_PROG([DOXYGEN], [doxygen])
if test x$DOXYGEN = x
then
AC_MSG_ERROR([doxygen is mandatory.])
fi
fi
AM_CONDITIONAL(DOC_ENABLED, [test x"$enable_doc" = xyes])
# Dependencies
PKG_CONFIG_REQUIRES=""
LIBNFC_CHECK_LIBUSB
LIBNFC_CHECK_PCSC
AC_SUBST(PKG_CONFIG_REQUIRES)
AM_CONDITIONAL(LIBUSB_ENABLED, [test "$HAVE_LIBUSB" = "1"])
AM_CONDITIONAL(PCSC_ENABLED, [test "$HAVE_PCSC" = "1"])
CUTTER_REQUIRED_VERSION=1.1.7
m4_ifdef([AC_CHECK_CUTTER], [AC_CHECK_CUTTER([>= $CUTTER_REQUIRED_VERSION])], [ac_cv_use_cutter="no"])
if test x$ac_cv_with_cutter = xyes -a x$ac_cv_use_cutter = xno; then
AC_MSG_ERROR([cutter >= $CUTTER_REQUIRED_VERSION is mandatory.])
fi
AM_CONDITIONAL([WITH_CUTTER], [test "$ac_cv_use_cutter" != "no"])
AC_CHECK_READLINE
# Help us to write great code ;-)
CFLAGS="$CFLAGS -Wall -pedantic -Wextra"
# Defines and C flags
CFLAGS="$CFLAGS -std=c99"
# Workarounds for libusb in c99
CFLAGS="$CFLAGS -Du_int8_t=uint8_t -Du_int16_t=uint16_t"
AC_CONFIG_FILES([
Doxyfile
Makefile
cmake/Makefile
cmake/modules/Makefile
contrib/Makefile
contrib/devd/Makefile
contrib/libnfc/Makefile
contrib/linux/Makefile
contrib/udev/Makefile
contrib/win32/Makefile
contrib/win32/sys/Makefile
contrib/win32/libnfc/Makefile
contrib/win32/libnfc/buses/Makefile
examples/Makefile
examples/pn53x-tamashell-scripts/Makefile
include/Makefile
include/nfc/Makefile
libnfc.pc
libnfc/Makefile
libnfc/buses/Makefile
libnfc/chips/Makefile
libnfc/drivers/Makefile
test/Makefile
utils/Makefile
])
AC_OUTPUT
LIBNFC_DRIVERS_SUMMARY
|
1060840728-lvgang
|
configure.ac
|
M4Sugar
|
lgpl
| 5,852
|
#include "contrib/windows.h"
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
#cmakedefine LIBNFC_SYSCONFDIR "@LIBNFC_SYSCONFDIR@"
|
1060840728-lvgang
|
cmake/config_windows.h.cmake
|
CMake
|
lgpl
| 222
|
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
#cmakedefine _XOPEN_SOURCE @_XOPEN_SOURCE@
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
1060840728-lvgang
|
cmake/config_posix.h.cmake
|
CMake
|
lgpl
| 221
|
SET(LIBNFC_DRIVER_ACR122_PCSC OFF CACHE BOOL "Enable ACR122 support (Depends on PC/SC)")
SET(LIBNFC_DRIVER_ACR122_USB ON CACHE BOOL "Enable ACR122 support (Direct USB connection)")
SET(LIBNFC_DRIVER_ACR122S ON CACHE BOOL "Enable ACR122S support (Use serial port)")
SET(LIBNFC_DRIVER_ARYGON ON CACHE BOOL "Enable ARYGON support (Use serial port)")
IF(WIN32)
SET(LIBNFC_DRIVER_PN532_I2C OFF CACHE BOOL "Enable PN532 I2C support (Use I2C bus)")
SET(LIBNFC_DRIVER_PN532_SPI OFF CACHE BOOL "Enable PN532 SPI support (Use SPI bus)")
ELSE(WIN32)
SET(LIBNFC_DRIVER_PN532_I2C ON CACHE BOOL "Enable PN532 I2C support (Use I2C bus)")
SET(LIBNFC_DRIVER_PN532_SPI ON CACHE BOOL "Enable PN532 SPI support (Use SPI bus)")
ENDIF(WIN32)
SET(LIBNFC_DRIVER_PN532_UART ON CACHE BOOL "Enable PN532 UART support (Use serial port)")
SET(LIBNFC_DRIVER_PN53X_USB ON CACHE BOOL "Enable PN531 and PN531 USB support (Depends on libusb)")
IF(LIBNFC_DRIVER_ACR122_PCSC)
FIND_PACKAGE(PCSC REQUIRED)
ADD_DEFINITIONS("-DDRIVER_ACR122_PCSC_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_pcsc")
ENDIF(LIBNFC_DRIVER_ACR122_PCSC)
IF(LIBNFC_DRIVER_ACR122_USB)
FIND_PACKAGE(LIBUSB REQUIRED)
ADD_DEFINITIONS("-DDRIVER_ACR122_USB_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb")
ENDIF(LIBNFC_DRIVER_ACR122_USB)
IF(LIBNFC_DRIVER_ACR122S)
ADD_DEFINITIONS("-DDRIVER_ACR122S_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122s")
SET(UART_REQUIRED TRUE)
ENDIF(LIBNFC_DRIVER_ACR122S)
IF(LIBNFC_DRIVER_ARYGON)
ADD_DEFINITIONS("-DDRIVER_ARYGON_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/arygon")
SET(UART_REQUIRED TRUE)
ENDIF(LIBNFC_DRIVER_ARYGON)
IF(LIBNFC_DRIVER_PN532_I2C)
ADD_DEFINITIONS("-DDRIVER_PN532_I2C_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_i2c")
SET(I2C_REQUIRED TRUE)
ENDIF(LIBNFC_DRIVER_PN532_I2C)
IF(LIBNFC_DRIVER_PN532_SPI)
ADD_DEFINITIONS("-DDRIVER_PN532_SPI_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_spi")
SET(SPI_REQUIRED TRUE)
ENDIF(LIBNFC_DRIVER_PN532_SPI)
IF(LIBNFC_DRIVER_PN532_UART)
ADD_DEFINITIONS("-DDRIVER_PN532_UART_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_uart")
SET(UART_REQUIRED TRUE)
ENDIF(LIBNFC_DRIVER_PN532_UART)
IF(LIBNFC_DRIVER_PN53X_USB)
FIND_PACKAGE(LIBUSB REQUIRED)
ADD_DEFINITIONS("-DDRIVER_PN53X_USB_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn53x_usb")
SET(USB_REQUIRED TRUE)
ENDIF(LIBNFC_DRIVER_PN53X_USB)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/drivers)
|
1060840728-lvgang
|
cmake/modules/LibnfcDrivers.cmake
|
CMake
|
lgpl
| 2,579
|
# This CMake script wants to use libusb functionality, therefore it looks
# for libusb include files and libraries.
#
# Operating Systems Supported:
# - Unix (requires pkg-config)
# Tested with Ubuntu 9.04 and Fedora 11
# - Windows (requires MinGW)
# Tested with Windows XP/Windows 7
#
# This should work for both 32 bit and 64 bit systems.
#
# Author: F. Kooman <fkooman@tuxed.net>
#
# FreeBSD has built-in libusb since 800069
IF(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
EXEC_PROGRAM(sysctl ARGS -n kern.osreldate OUTPUT_VARIABLE FREEBSD_VERSION)
SET(MIN_FREEBSD_VERSION 800068)
IF(FREEBSD_VERSION GREATER ${MIN_FREEBSD_VERSION})
SET(LIBUSB_FOUND TRUE)
SET(LIBUSB_INCLUDE_DIRS "/usr/include")
SET(LIBUSB_LIBRARIES "usb")
SET(LIBUSB_LIBRARY_DIRS "/usr/lib/")
ENDIF(FREEBSD_VERSION GREATER ${MIN_FREEBSD_VERSION})
ENDIF(CMAKE_SYSTEM_NAME MATCHES FreeBSD)
IF(NOT LIBUSB_FOUND)
IF(WIN32)
FIND_PATH(LIBUSB_INCLUDE_DIRS lusb0_usb.h "$ENV{ProgramFiles}/LibUSB-Win32/include" NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(LIBUSB_LIBRARIES NAMES libusb PATHS "$ENV{ProgramFiles}/LibUSB-Win32/lib/gcc")
SET(LIBUSB_LIBRARY_DIR "$ENV{ProgramFiles}/LibUSB-Win32/bin/x86/")
# Must fix up variable to avoid backslashes during packaging
STRING(REGEX REPLACE "\\\\" "/" LIBUSB_LIBRARY_DIR ${LIBUSB_LIBRARY_DIR})
ELSE(WIN32)
# If not under Windows we use PkgConfig
FIND_PACKAGE (PkgConfig)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(LIBUSB REQUIRED libusb)
ELSE(PKG_CONFIG_FOUND)
MESSAGE(FATAL_ERROR "Could not find PkgConfig")
ENDIF(PKG_CONFIG_FOUND)
ENDIF(WIN32)
IF(LIBUSB_INCLUDE_DIRS AND LIBUSB_LIBRARIES)
SET(LIBUSB_FOUND TRUE)
ENDIF(LIBUSB_INCLUDE_DIRS AND LIBUSB_LIBRARIES)
ENDIF(NOT LIBUSB_FOUND)
IF(LIBUSB_FOUND)
IF(NOT LIBUSB_FIND_QUIETLY)
MESSAGE(STATUS "Found LIBUSB: ${LIBUSB_LIBRARIES} ${LIBUSB_INCLUDE_DIRS}")
ENDIF (NOT LIBUSB_FIND_QUIETLY)
ELSE(LIBUSB_FOUND)
IF(LIBUSB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find LIBUSB")
ENDIF(LIBUSB_FIND_REQUIRED)
ENDIF(LIBUSB_FOUND)
|
1060840728-lvgang
|
cmake/modules/FindLIBUSB.cmake
|
CMake
|
lgpl
| 2,081
|
# - Run Doxygen
#
# Adds a doxygen target that runs doxygen to generate the html
# and optionally the LaTeX API documentation.
# The doxygen target is added to the doc target as dependency.
# i.e.: the API documentation is built with:
# make doc
#
# USAGE: GLOBAL INSTALL
#
# Install it with:
# cmake ./ && sudo make install
# Add the following to the CMakeLists.txt of your project:
# include(UseDoxygen OPTIONAL)
# Optionally copy Doxyfile.in in the directory of CMakeLists.txt and edit it.
#
# USAGE: INCLUDE IN PROJECT
#
# set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# include(UseDoxygen)
# Add the Doxyfile.in and UseDoxygen.cmake files to the projects source directory.
#
#
# Variables you may define are:
# DOXYFILE_OUTPUT_DIR - Path where the Doxygen output is stored. Defaults to "doc".
#
# DOXYFILE_LATEX_DIR - Directory where the Doxygen LaTeX output is stored. Defaults to "latex".
#
# DOXYFILE_HTML_DIR - Directory where the Doxygen html output is stored. Defaults to "html".
#
#
# Copyright (c) 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
macro(usedoxygen_set_default name value)
if(NOT DEFINED "${name}")
set("${name}" "${value}")
endif()
endmacro()
find_package(Doxygen)
if(DOXYGEN_FOUND)
find_file(DOXYFILE_IN "Doxyfile.in"
PATHS "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_ROOT}/Modules/")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Doxyfile.in DEFAULT_MSG DOXYFILE_IN)
endif()
if(DOXYGEN_FOUND AND DOXYFILE_IN)
add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
usedoxygen_set_default(DOXYFILE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc")
usedoxygen_set_default(DOXYFILE_HTML_DIR "html")
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_HTML_DIR}")
set(DOXYFILE_LATEX "NO")
set(DOXYFILE_PDFLATEX "NO")
set(DOXYFILE_DOT "NO")
find_package(LATEX)
if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
set(DOXYFILE_LATEX "YES")
usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
"${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
if(PDFLATEX_COMPILER)
set(DOXYFILE_PDFLATEX "YES")
endif()
if(DOXYGEN_DOT_EXECUTABLE)
set(DOXYFILE_DOT "YES")
endif()
add_custom_command(TARGET doxygen
POST_BUILD
COMMAND ${CMAKE_MAKE_PROGRAM}
WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
endif()
configure_file(${DOXYFILE_IN} Doxyfile ESCAPE_QUOTES IMMEDIATE @ONLY)
get_target_property(DOC_TARGET doc TYPE)
if(NOT DOC_TARGET)
add_custom_target(doc)
endif()
add_dependencies(doc doxygen)
endif()
|
1060840728-lvgang
|
cmake/modules/UseDoxygen.cmake
|
CMake
|
lgpl
| 2,841
|
EXTRA_DIST = \
COPYING-CMAKE-SCRIPTS \
FindLIBUSB.cmake \
FindPCSC.cmake \
FindPCRE.cmake \
UseDoxygen.cmake \
LibnfcDrivers.cmake
|
1060840728-lvgang
|
cmake/modules/Makefile.am
|
Makefile
|
lgpl
| 137
|
# This CMake script wants to use pcre functionality needed for windows
# compilation. However, since PCRE isn't really a default install location
# there isn't much to search.
#
# Operating Systems Supported:
# - Windows (requires MinGW)
# Tested with Windows XP/Windows 7
#
# This should work for both 32 bit and 64 bit systems.
#
# Author: A. Lian <alex.lian@gmail.com>
#
IF(WIN32)
IF(NOT PCRE_FOUND)
FIND_PATH(PCRE_INCLUDE_DIRS regex.h)
FIND_LIBRARY(PCRE_LIBRARIES NAMES PCRE pcre)
FIND_PATH(PCRE_BIN_DIRS pcre3.dll)
IF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES AND PCRE_BIN_DIRS)
SET(PCRE_FOUND TRUE)
ENDIF(PCRE_INCLUDE_DIRS AND PCRE_LIBRARIES AND PCRE_BIN_DIRS)
ENDIF(NOT PCRE_FOUND)
IF(PCRE_FOUND)
IF(NOT PCRE_FIND_QUIETLY)
MESSAGE(STATUS "Found PCRE: ${PCRE_LIBRARIES} ${PCRE_INCLUDE_DIRS} ${PCRE_BIN_DIRS}")
ENDIF (NOT PCRE_FIND_QUIETLY)
ELSE(PCRE_FOUND)
IF(PCRE_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find PCRE")
ENDIF(PCRE_FIND_REQUIRED)
ENDIF(PCRE_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
PCRE_LIBRARIES
PCRE_INCLUDE_DIRS
PCRE_BIN_DIRS
)
ENDIF(WIN32)
|
1060840728-lvgang
|
cmake/modules/FindPCRE.cmake
|
CMake
|
lgpl
| 1,215
|
# - Try to find the PC/SC smart card library
# Once done this will define
#
# PCSC_FOUND - system has the PC/SC library
# PCSC_INCLUDE_DIRS - the PC/SC include directory
# PCSC_LIBRARIES - The libraries needed to use PC/SC
#
# Author: F. Kooman <fkooman@tuxed.net>
# Version: 20101019
#
FIND_PACKAGE (PkgConfig)
IF(PKG_CONFIG_FOUND)
# Will find PC/SC library on Linux/BSDs using PkgConfig
PKG_CHECK_MODULES(PCSC libpcsclite)
# PKG_CHECK_MODULES(PCSC QUIET libpcsclite) # IF CMake >= 2.8.2?
ENDIF(PKG_CONFIG_FOUND)
IF(NOT PCSC_FOUND)
# Will find PC/SC headers both on Mac and Windows
FIND_PATH(PCSC_INCLUDE_DIRS WinSCard.h)
# PCSC library is for Mac, WinSCard library is for Windows
FIND_LIBRARY(PCSC_LIBRARIES NAMES PCSC libwinscard)
ENDIF(NOT PCSC_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC DEFAULT_MSG
PCSC_LIBRARIES
PCSC_INCLUDE_DIRS
)
MARK_AS_ADVANCED(PCSC_INCLUDE_DIRS PCSC_LIBRARIES)
|
1060840728-lvgang
|
cmake/modules/FindPCSC.cmake
|
CMake
|
lgpl
| 967
|
INCLUDE(BundleUtilities)
# set bundle to the full path of the executable already existing in the install tree
SET(bundle "${CMAKE_INSTALL_PREFIX}/bin/nfc-list@CMAKE_EXECUTABLE_SUFFIX@")
# set other_libs to a list of additional libs that cannot be reached by dependency analysis
SET(other_libs "")
SET(dirs "@LIBUSB_LIBRARY_DIR@" "@PCRE_BIN_DIRS@")
fixup_bundle("${bundle}" "${other_libs}" "${dirs}")
|
1060840728-lvgang
|
cmake/FixBundle.cmake.in
|
CMake
|
lgpl
| 404
|
SUBDIRS = modules
EXTRA_DIST = \
FixBundle.cmake.in \
config_posix.h.cmake \
config_windows.h.cmake
|
1060840728-lvgang
|
cmake/Makefile.am
|
Makefile
|
lgpl
| 119
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file target-subr.c
* @brief Target-related subroutines. (ie. determine target type, print target, etc.)
*/
#include <inttypes.h>
#include <nfc/nfc.h>
#include "target-subr.h"
struct card_atqa {
uint16_t atqa;
uint16_t mask;
char type[128];
// list of up to 8 SAK values compatible with this ATQA
int saklist[8];
};
struct card_sak {
uint8_t sak;
uint8_t mask;
char type[128];
};
struct card_atqa const_ca[] = {
{
0x0044, 0xffff, "MIFARE Ultralight",
{0, -1}
},
{
0x0044, 0xffff, "MIFARE Ultralight C",
{0, -1}
},
{
0x0004, 0xff0f, "MIFARE Mini 0.3K",
{1, -1}
},
{
0x0004, 0xff0f, "MIFARE Classic 1K",
{2, -1}
},
{
0x0002, 0xff0f, "MIFARE Classic 4K",
{3, -1}
},
{
0x0004, 0xffff, "MIFARE Plus (4 Byte UID or 4 Byte RID)",
{4, 5, 6, 7, 8, 9, -1}
},
{
0x0002, 0xffff, "MIFARE Plus (4 Byte UID or 4 Byte RID)",
{4, 5, 6, 7, 8, 9, -1}
},
{
0x0044, 0xffff, "MIFARE Plus (7 Byte UID)",
{4, 5, 6, 7, 8, 9, -1}
},
{
0x0042, 0xffff, "MIFARE Plus (7 Byte UID)",
{4, 5, 6, 7, 8, 9, -1}
},
{
0x0344, 0xffff, "MIFARE DESFire",
{10, 11, -1}
},
{
0x0044, 0xffff, "P3SR008",
{ -1}
}, // TODO we need SAK info
{
0x0004, 0xf0ff, "SmartMX with MIFARE 1K emulation",
{12, -1}
},
{
0x0002, 0xf0ff, "SmartMX with MIFARE 4K emulation",
{12, -1}
},
{
0x0048, 0xf0ff, "SmartMX with 7 Byte UID",
{12, -1}
}
};
struct card_sak const_cs[] = {
{0x00, 0xff, "" }, // 00 MIFARE Ultralight / Ultralight C
{0x09, 0xff, "" }, // 01 MIFARE Mini 0.3K
{0x08, 0xff, "" }, // 02 MIFARE Classic 1K
{0x18, 0xff, "" }, // 03 MIFARE Classik 4K
{0x08, 0xff, " 2K, Security level 1" }, // 04 MIFARE Plus
{0x18, 0xff, " 4K, Security level 1" }, // 05 MIFARE Plus
{0x10, 0xff, " 2K, Security level 2" }, // 06 MIFARE Plus
{0x11, 0xff, " 4K, Security level 2" }, // 07 MIFARE Plus
{0x20, 0xff, " 2K, Security level 3" }, // 08 MIFARE Plus
{0x20, 0xff, " 4K, Security level 3" }, // 09 MIFARE Plus
{0x20, 0xff, " 4K" }, // 10 MIFARE DESFire
{0x20, 0xff, " EV1 2K/4K/8K" }, // 11 MIFARE DESFire
{0x00, 0x00, "" }, // 12 SmartMX
};
int
snprint_hex(char *dst, size_t size, const uint8_t *pbtData, const size_t szBytes)
{
size_t szPos;
size_t res = 0;
for (szPos = 0; szPos < szBytes; szPos++) {
res += snprintf(dst + res, size - res, "%02x ", pbtData[szPos]);
}
res += snprintf(dst + res, size - res, "\n");
return res;
}
#define SAK_UID_NOT_COMPLETE 0x04
#define SAK_ISO14443_4_COMPLIANT 0x20
#define SAK_ISO18092_COMPLIANT 0x40
void
snprint_nfc_iso14443a_info(char *dst, size_t size, const nfc_iso14443a_info *pnai, bool verbose)
{
int off = 0;
off += snprintf(dst + off, size - off, " ATQA (SENS_RES): ");
off += snprint_hex(dst + off, size - off, pnai->abtAtqa, 2);
if (verbose) {
off += snprintf(dst + off, size - off, "* UID size: ");
switch ((pnai->abtAtqa[1] & 0xc0) >> 6) {
case 0:
off += snprintf(dst + off, size - off, "single\n");
break;
case 1:
off += snprintf(dst + off, size - off, "double\n");
break;
case 2:
off += snprintf(dst + off, size - off, "triple\n");
break;
case 3:
off += snprintf(dst + off, size - off, "RFU\n");
break;
}
off += snprintf(dst + off, size - off, "* bit frame anticollision ");
switch (pnai->abtAtqa[1] & 0x1f) {
case 0x01:
case 0x02:
case 0x04:
case 0x08:
case 0x10:
off += snprintf(dst + off, size - off, "supported\n");
break;
default:
off += snprintf(dst + off, size - off, "not supported\n");
break;
}
}
off += snprintf(dst + off, size - off, " UID (NFCID%c): ", (pnai->abtUid[0] == 0x08 ? '3' : '1'));
off += snprint_hex(dst + off, size - off, pnai->abtUid, pnai->szUidLen);
if (verbose) {
if (pnai->abtUid[0] == 0x08) {
off += snprintf(dst + off, size - off, "* Random UID\n");
}
}
off += snprintf(dst + off, size - off, " SAK (SEL_RES): ");
off += snprint_hex(dst + off, size - off, &pnai->btSak, 1);
if (verbose) {
if (pnai->btSak & SAK_UID_NOT_COMPLETE) {
off += snprintf(dst + off, size - off, "* Warning! Cascade bit set: UID not complete\n");
}
if (pnai->btSak & SAK_ISO14443_4_COMPLIANT) {
off += snprintf(dst + off, size - off, "* Compliant with ISO/IEC 14443-4\n");
} else {
off += snprintf(dst + off, size - off, "* Not compliant with ISO/IEC 14443-4\n");
}
if (pnai->btSak & SAK_ISO18092_COMPLIANT) {
off += snprintf(dst + off, size - off, "* Compliant with ISO/IEC 18092\n");
} else {
off += snprintf(dst + off, size - off, "* Not compliant with ISO/IEC 18092\n");
}
}
if (pnai->szAtsLen) {
off += snprintf(dst + off, size - off, " ATS: ");
off += snprint_hex(dst + off, size - off, pnai->abtAts, pnai->szAtsLen);
}
if (pnai->szAtsLen && verbose) {
// Decode ATS according to ISO/IEC 14443-4 (5.2 Answer to select)
const int iMaxFrameSizes[] = { 16, 24, 32, 40, 48, 64, 96, 128, 256 };
off += snprintf(dst + off, size - off, "* Max Frame Size accepted by PICC: %d bytes\n", iMaxFrameSizes[pnai->abtAts[0] & 0x0F]);
size_t offset = 1;
if (pnai->abtAts[0] & 0x10) { // TA(1) present
uint8_t TA = pnai->abtAts[offset];
offset++;
off += snprintf(dst + off, size - off, "* Bit Rate Capability:\n");
if (TA == 0) {
off += snprintf(dst + off, size - off, " * PICC supports only 106 kbits/s in both directions\n");
}
if (TA & 1 << 7) {
off += snprintf(dst + off, size - off, " * Same bitrate in both directions mandatory\n");
}
if (TA & 1 << 4) {
off += snprintf(dst + off, size - off, " * PICC to PCD, DS=2, bitrate 212 kbits/s supported\n");
}
if (TA & 1 << 5) {
off += snprintf(dst + off, size - off, " * PICC to PCD, DS=4, bitrate 424 kbits/s supported\n");
}
if (TA & 1 << 6) {
off += snprintf(dst + off, size - off, " * PICC to PCD, DS=8, bitrate 847 kbits/s supported\n");
}
if (TA & 1 << 0) {
off += snprintf(dst + off, size - off, " * PCD to PICC, DR=2, bitrate 212 kbits/s supported\n");
}
if (TA & 1 << 1) {
off += snprintf(dst + off, size - off, " * PCD to PICC, DR=4, bitrate 424 kbits/s supported\n");
}
if (TA & 1 << 2) {
off += snprintf(dst + off, size - off, " * PCD to PICC, DR=8, bitrate 847 kbits/s supported\n");
}
if (TA & 1 << 3) {
off += snprintf(dst + off, size - off, " * ERROR unknown value\n");
}
}
if (pnai->abtAts[0] & 0x20) { // TB(1) present
uint8_t TB = pnai->abtAts[offset];
offset++;
off += snprintf(dst + off, size - off, "* Frame Waiting Time: %.4g ms\n", 256.0 * 16.0 * (1 << ((TB & 0xf0) >> 4)) / 13560.0);
if ((TB & 0x0f) == 0) {
off += snprintf(dst + off, size - off, "* No Start-up Frame Guard Time required\n");
} else {
off += snprintf(dst + off, size - off, "* Start-up Frame Guard Time: %.4g ms\n", 256.0 * 16.0 * (1 << (TB & 0x0f)) / 13560.0);
}
}
if (pnai->abtAts[0] & 0x40) { // TC(1) present
uint8_t TC = pnai->abtAts[offset];
offset++;
if (TC & 0x1) {
off += snprintf(dst + off, size - off, "* Node Address supported\n");
} else {
off += snprintf(dst + off, size - off, "* Node Address not supported\n");
}
if (TC & 0x2) {
off += snprintf(dst + off, size - off, "* Card IDentifier supported\n");
} else {
off += snprintf(dst + off, size - off, "* Card IDentifier not supported\n");
}
}
if (pnai->szAtsLen > offset) {
off += snprintf(dst + off, size - off, "* Historical bytes Tk: ");
off += snprint_hex(dst + off, size - off, pnai->abtAts + offset, (pnai->szAtsLen - offset));
uint8_t CIB = pnai->abtAts[offset];
offset++;
if (CIB != 0x00 && CIB != 0x10 && (CIB & 0xf0) != 0x80) {
off += snprintf(dst + off, size - off, " * Proprietary format\n");
if (CIB == 0xc1) {
off += snprintf(dst + off, size - off, " * Tag byte: Mifare or virtual cards of various types\n");
uint8_t L = pnai->abtAts[offset];
offset++;
if (L != (pnai->szAtsLen - offset)) {
off += snprintf(dst + off, size - off, " * Warning: Type Identification Coding length (%i)", L);
off += snprintf(dst + off, size - off, " not matching Tk length (%" PRIdPTR ")\n", (pnai->szAtsLen - offset));
}
if ((pnai->szAtsLen - offset - 2) > 0) { // Omit 2 CRC bytes
uint8_t CTC = pnai->abtAts[offset];
offset++;
off += snprintf(dst + off, size - off, " * Chip Type: ");
switch (CTC & 0xf0) {
case 0x00:
off += snprintf(dst + off, size - off, "(Multiple) Virtual Cards\n");
break;
case 0x10:
off += snprintf(dst + off, size - off, "Mifare DESFire\n");
break;
case 0x20:
off += snprintf(dst + off, size - off, "Mifare Plus\n");
break;
default:
off += snprintf(dst + off, size - off, "RFU\n");
break;
}
off += snprintf(dst + off, size - off, " * Memory size: ");
switch (CTC & 0x0f) {
case 0x00:
off += snprintf(dst + off, size - off, "<1 kbyte\n");
break;
case 0x01:
off += snprintf(dst + off, size - off, "1 kbyte\n");
break;
case 0x02:
off += snprintf(dst + off, size - off, "2 kbyte\n");
break;
case 0x03:
off += snprintf(dst + off, size - off, "4 kbyte\n");
break;
case 0x04:
off += snprintf(dst + off, size - off, "8 kbyte\n");
break;
case 0x0f:
off += snprintf(dst + off, size - off, "Unspecified\n");
break;
default:
off += snprintf(dst + off, size - off, "RFU\n");
break;
}
}
if ((pnai->szAtsLen - offset) > 0) { // Omit 2 CRC bytes
uint8_t CVC = pnai->abtAts[offset];
offset++;
off += snprintf(dst + off, size - off, " * Chip Status: ");
switch (CVC & 0xf0) {
case 0x00:
off += snprintf(dst + off, size - off, "Engineering sample\n");
break;
case 0x20:
off += snprintf(dst + off, size - off, "Released\n");
break;
default:
off += snprintf(dst + off, size - off, "RFU\n");
break;
}
off += snprintf(dst + off, size - off, " * Chip Generation: ");
switch (CVC & 0x0f) {
case 0x00:
off += snprintf(dst + off, size - off, "Generation 1\n");
break;
case 0x01:
off += snprintf(dst + off, size - off, "Generation 2\n");
break;
case 0x02:
off += snprintf(dst + off, size - off, "Generation 3\n");
break;
case 0x0f:
off += snprintf(dst + off, size - off, "Unspecified\n");
break;
default:
off += snprintf(dst + off, size - off, "RFU\n");
break;
}
}
if ((pnai->szAtsLen - offset) > 0) { // Omit 2 CRC bytes
uint8_t VCS = pnai->abtAts[offset];
offset++;
off += snprintf(dst + off, size - off, " * Specifics (Virtual Card Selection):\n");
if ((VCS & 0x09) == 0x00) {
off += snprintf(dst + off, size - off, " * Only VCSL supported\n");
} else if ((VCS & 0x09) == 0x01) {
off += snprintf(dst + off, size - off, " * VCS, VCSL and SVC supported\n");
}
if ((VCS & 0x0e) == 0x00) {
off += snprintf(dst + off, size - off, " * SL1, SL2(?), SL3 supported\n");
} else if ((VCS & 0x0e) == 0x02) {
off += snprintf(dst + off, size - off, " * SL3 only card\n");
} else if ((VCS & 0x0f) == 0x0e) {
off += snprintf(dst + off, size - off, " * No VCS command supported\n");
} else if ((VCS & 0x0f) == 0x0f) {
off += snprintf(dst + off, size - off, " * Unspecified\n");
} else {
off += snprintf(dst + off, size - off, " * RFU\n");
}
}
}
} else {
if (CIB == 0x00) {
off += snprintf(dst + off, size - off, " * Tk after 0x00 consist of optional consecutive COMPACT-TLV data objects\n");
off += snprintf(dst + off, size - off, " followed by a mandatory status indicator (the last three bytes, not in TLV)\n");
off += snprintf(dst + off, size - off, " See ISO/IEC 7816-4 8.1.1.3 for more info\n");
}
if (CIB == 0x10) {
off += snprintf(dst + off, size - off, " * DIR data reference: %02x\n", pnai->abtAts[offset]);
}
if (CIB == 0x80) {
if (pnai->szAtsLen == offset) {
off += snprintf(dst + off, size - off, " * No COMPACT-TLV objects found, no status found\n");
} else {
off += snprintf(dst + off, size - off, " * Tk after 0x80 consist of optional consecutive COMPACT-TLV data objects;\n");
off += snprintf(dst + off, size - off, " the last data object may carry a status indicator of one, two or three bytes.\n");
off += snprintf(dst + off, size - off, " See ISO/IEC 7816-4 8.1.1.3 for more info\n");
}
}
}
}
}
if (verbose) {
off += snprintf(dst + off, size - off, "\nFingerprinting based on MIFARE type Identification Procedure:\n"); // AN10833
uint16_t atqa = 0;
uint8_t sak = 0;
uint8_t i, j;
bool found_possible_match = false;
atqa = (((uint16_t)pnai->abtAtqa[0] & 0xff) << 8);
atqa += (((uint16_t)pnai->abtAtqa[1] & 0xff));
sak = ((uint8_t)pnai->btSak & 0xff);
for (i = 0; i < sizeof(const_ca) / sizeof(const_ca[0]); i++) {
if ((atqa & const_ca[i].mask) == const_ca[i].atqa) {
for (j = 0; (j < sizeof(const_ca[i].saklist) / sizeof(const_ca[i].saklist[0])) && (const_ca[i].saklist[j] >= 0); j++) {
int sakindex = const_ca[i].saklist[j];
if ((sak & const_cs[sakindex].mask) == const_cs[sakindex].sak) {
off += snprintf(dst + off, size - off, "* %s%s\n", const_ca[i].type, const_cs[sakindex].type);
found_possible_match = true;
}
}
}
}
// Other matches not described in
// AN10833 MIFARE Type Identification Procedure
// but seen in the field:
off += snprintf(dst + off, size - off, "Other possible matches based on ATQA & SAK values:\n");
uint32_t atqasak = 0;
atqasak += (((uint32_t)pnai->abtAtqa[0] & 0xff) << 16);
atqasak += (((uint32_t)pnai->abtAtqa[1] & 0xff) << 8);
atqasak += ((uint32_t)pnai->btSak & 0xff);
switch (atqasak) {
case 0x000488:
off += snprintf(dst + off, size - off, "* Mifare Classic 1K Infineon\n");
found_possible_match = true;
break;
case 0x000298:
off += snprintf(dst + off, size - off, "* Gemplus MPCOS\n");
found_possible_match = true;
break;
case 0x030428:
off += snprintf(dst + off, size - off, "* JCOP31\n");
found_possible_match = true;
break;
case 0x004820:
off += snprintf(dst + off, size - off, "* JCOP31 v2.4.1\n");
off += snprintf(dst + off, size - off, "* JCOP31 v2.2\n");
found_possible_match = true;
break;
case 0x000428:
off += snprintf(dst + off, size - off, "* JCOP31 v2.3.1\n");
found_possible_match = true;
break;
case 0x000453:
off += snprintf(dst + off, size - off, "* Fudan FM1208SH01\n");
found_possible_match = true;
break;
case 0x000820:
off += snprintf(dst + off, size - off, "* Fudan FM1208\n");
found_possible_match = true;
break;
case 0x000238:
off += snprintf(dst + off, size - off, "* MFC 4K emulated by Nokia 6212 Classic\n");
found_possible_match = true;
break;
case 0x000838:
off += snprintf(dst + off, size - off, "* MFC 4K emulated by Nokia 6131 NFC\n");
found_possible_match = true;
break;
}
if (! found_possible_match) {
snprintf(dst + off, size - off, "* Unknown card, sorry\n");
}
}
}
void
snprint_nfc_felica_info(char *dst, size_t size, const nfc_felica_info *pnfi, bool verbose)
{
(void) verbose;
int off = 0;
off += snprintf(dst + off, size - off, " ID (NFCID2): ");
off += snprint_hex(dst + off, size - off, pnfi->abtId, 8);
off += snprintf(dst + off, size - off, " Parameter (PAD): ");
off += snprint_hex(dst + off, size - off, pnfi->abtPad, 8);
off += snprintf(dst + off, size - off, " System Code (SC): ");
snprint_hex(dst + off, size - off, pnfi->abtSysCode, 2);
}
void
snprint_nfc_jewel_info(char *dst, size_t size, const nfc_jewel_info *pnji, bool verbose)
{
(void) verbose;
int off = 0;
off += snprintf(dst + off, size - off, " ATQA (SENS_RES): ");
off += snprint_hex(dst + off, size - off, pnji->btSensRes, 2);
off += snprintf(dst + off, size - off, " 4-LSB JEWELID: ");
snprint_hex(dst + off, size - off, pnji->btId, 4);
}
#define PI_ISO14443_4_SUPPORTED 0x01
#define PI_NAD_SUPPORTED 0x01
#define PI_CID_SUPPORTED 0x02
void
snprint_nfc_iso14443b_info(char *dst, size_t size, const nfc_iso14443b_info *pnbi, bool verbose)
{
int off = 0;
off += snprintf(dst + off, size - off, " PUPI: ");
off += snprint_hex(dst + off, size - off, pnbi->abtPupi, 4);
off += snprintf(dst + off, size - off, " Application Data: ");
off += snprint_hex(dst + off, size - off, pnbi->abtApplicationData, 4);
off += snprintf(dst + off, size - off, " Protocol Info: ");
off += snprint_hex(dst + off, size - off, pnbi->abtProtocolInfo, 3);
if (verbose) {
off += snprintf(dst + off, size - off, "* Bit Rate Capability:\n");
if (pnbi->abtProtocolInfo[0] == 0) {
off += snprintf(dst + off, size - off, " * PICC supports only 106 kbits/s in both directions\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 7) {
off += snprintf(dst + off, size - off, " * Same bitrate in both directions mandatory\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 4) {
off += snprintf(dst + off, size - off, " * PICC to PCD, 1etu=64/fc, bitrate 212 kbits/s supported\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 5) {
off += snprintf(dst + off, size - off, " * PICC to PCD, 1etu=32/fc, bitrate 424 kbits/s supported\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 6) {
off += snprintf(dst + off, size - off, " * PICC to PCD, 1etu=16/fc, bitrate 847 kbits/s supported\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 0) {
off += snprintf(dst + off, size - off, " * PCD to PICC, 1etu=64/fc, bitrate 212 kbits/s supported\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 1) {
off += snprintf(dst + off, size - off, " * PCD to PICC, 1etu=32/fc, bitrate 424 kbits/s supported\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 2) {
off += snprintf(dst + off, size - off, " * PCD to PICC, 1etu=16/fc, bitrate 847 kbits/s supported\n");
}
if (pnbi->abtProtocolInfo[0] & 1 << 3) {
off += snprintf(dst + off, size - off, " * ERROR unknown value\n");
}
if ((pnbi->abtProtocolInfo[1] & 0xf0) <= 0x80) {
const int iMaxFrameSizes[] = { 16, 24, 32, 40, 48, 64, 96, 128, 256 };
off += snprintf(dst + off, size - off, "* Maximum frame sizes: %d bytes\n", iMaxFrameSizes[((pnbi->abtProtocolInfo[1] & 0xf0) >> 4)]);
}
if ((pnbi->abtProtocolInfo[1] & 0x01) == PI_ISO14443_4_SUPPORTED) {
// in principle low nibble could only be 0000 or 0001 and other values are RFU
// but in practice we found 0011 so let's use only last bit for -4 compatibility
off += snprintf(dst + off, size - off, "* Protocol types supported: ISO/IEC 14443-4\n");
}
off += snprintf(dst + off, size - off, "* Frame Waiting Time: %.4g ms\n", 256.0 * 16.0 * (1 << ((pnbi->abtProtocolInfo[2] & 0xf0) >> 4)) / 13560.0);
if ((pnbi->abtProtocolInfo[2] & (PI_NAD_SUPPORTED | PI_CID_SUPPORTED)) != 0) {
off += snprintf(dst + off, size - off, "* Frame options supported: ");
if ((pnbi->abtProtocolInfo[2] & PI_NAD_SUPPORTED) != 0) off += snprintf(dst + off, size - off, "NAD ");
if ((pnbi->abtProtocolInfo[2] & PI_CID_SUPPORTED) != 0) off += snprintf(dst + off, size - off, "CID ");
snprintf(dst + off, size - off, "\n");
}
}
}
void
snprint_nfc_iso14443bi_info(char *dst, size_t size, const nfc_iso14443bi_info *pnii, bool verbose)
{
int off = 0;
off += snprintf(dst + off, size - off, " DIV: ");
off += snprint_hex(dst + off, size - off, pnii->abtDIV, 4);
if (verbose) {
int version = (pnii->btVerLog & 0x1e) >> 1;
off += snprintf(dst + off, size - off, " Software Version: ");
if (version == 15) {
off += snprintf(dst + off, size - off, "Undefined\n");
} else {
off += snprintf(dst + off, size - off, "%i\n", version);
}
if ((pnii->btVerLog & 0x80) && (pnii->btConfig & 0x80)) {
off += snprintf(dst + off, size - off, " Wait Enable: yes");
}
}
if ((pnii->btVerLog & 0x80) && (pnii->btConfig & 0x40)) {
off += snprintf(dst + off, size - off, " ATS: ");
snprint_hex(dst + off, size - off, pnii->abtAtr, pnii->szAtrLen);
}
}
void
snprint_nfc_iso14443b2sr_info(char *dst, size_t size, const nfc_iso14443b2sr_info *pnsi, bool verbose)
{
(void) verbose;
int off = 0;
off += snprintf(dst + off, size - off, " UID: ");
snprint_hex(dst + off, size - off, pnsi->abtUID, 8);
}
void
snprint_nfc_iso14443b2ct_info(char *dst, size_t size, const nfc_iso14443b2ct_info *pnci, bool verbose)
{
(void) verbose;
int off = 0;
uint32_t uid;
uid = (pnci->abtUID[3] << 24) + (pnci->abtUID[2] << 16) + (pnci->abtUID[1] << 8) + pnci->abtUID[0];
off += snprintf(dst + off, size - off, " UID: ");
off += snprint_hex(dst + off, size - off, pnci->abtUID, sizeof(pnci->abtUID));
off += snprintf(dst + off, size - off, " UID (decimal): %010u\n", uid);
off += snprintf(dst + off, size - off, " Product Code: %02X\n", pnci->btProdCode);
snprintf(dst + off, size - off, " Fab Code: %02X\n", pnci->btFabCode);
}
void
snprint_nfc_dep_info(char *dst, size_t size, const nfc_dep_info *pndi, bool verbose)
{
(void) verbose;
int off = 0;
off += snprintf(dst + off, size - off, " NFCID3: ");
off += snprint_hex(dst + off, size - off, pndi->abtNFCID3, 10);
off += snprintf(dst + off, size - off, " BS: %02x\n", pndi->btBS);
off += snprintf(dst + off, size - off, " BR: %02x\n", pndi->btBR);
off += snprintf(dst + off, size - off, " TO: %02x\n", pndi->btTO);
off += snprintf(dst + off, size - off, " PP: %02x\n", pndi->btPP);
if (pndi->szGB) {
off += snprintf(dst + off, size - off, "General Bytes: ");
snprint_hex(dst + off, size - off, pndi->abtGB, pndi->szGB);
}
}
void
snprint_nfc_target(char *dst, size_t size, const nfc_target *pnt, bool verbose)
{
if (NULL != pnt) {
int off = 0;
off += snprintf(dst + off, size - off, "%s (%s%s) target:\n", str_nfc_modulation_type(pnt->nm.nmt), str_nfc_baud_rate(pnt->nm.nbr), (pnt->nm.nmt != NMT_DEP) ? "" : (pnt->nti.ndi.ndm == NDM_ACTIVE) ? "active mode" : "passive mode");
switch (pnt->nm.nmt) {
case NMT_ISO14443A:
snprint_nfc_iso14443a_info(dst + off, size - off, &pnt->nti.nai, verbose);
break;
case NMT_JEWEL:
snprint_nfc_jewel_info(dst + off, size - off, &pnt->nti.nji, verbose);
break;
case NMT_FELICA:
snprint_nfc_felica_info(dst + off, size - off, &pnt->nti.nfi, verbose);
break;
case NMT_ISO14443B:
snprint_nfc_iso14443b_info(dst + off, size - off, &pnt->nti.nbi, verbose);
break;
case NMT_ISO14443BI:
snprint_nfc_iso14443bi_info(dst + off, size - off, &pnt->nti.nii, verbose);
break;
case NMT_ISO14443B2SR:
snprint_nfc_iso14443b2sr_info(dst + off, size - off, &pnt->nti.nsi, verbose);
break;
case NMT_ISO14443B2CT:
snprint_nfc_iso14443b2ct_info(dst + off, size - off, &pnt->nti.nci, verbose);
break;
case NMT_DEP:
snprint_nfc_dep_info(dst + off, size - off, &pnt->nti.ndi, verbose);
break;
}
}
}
|
1060840728-lvgang
|
libnfc/target-subr.c
|
C
|
lgpl
| 26,384
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef __LOG_INTERNAL_H__
#define __LOG_INTERNAL_H__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include <stdarg.h>
// Internal methods so different platforms can route the logging
// Offering both forms of the variadic function
// These are implemented in the log_<platform> specific file
void log_put_internal(const char *format, ...);
void log_vput_internal(const char *format, va_list args);
#endif // __LOG_INTERNAL_H__
|
1060840728-lvgang
|
libnfc/log-internal.h
|
C
|
lgpl
| 1,536
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file mirror-subr.c
* @brief Mirror bytes
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include <stdio.h>
#include "mirror-subr.h"
static const uint8_t ByteMirror[256] = {
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30,
0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98,
0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64,
0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc,
0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02,
0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2,
0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a,
0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e,
0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81,
0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71,
0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9,
0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15,
0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad,
0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43,
0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b,
0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97,
0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f,
0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
};
uint8_t
mirror(uint8_t bt)
{
return ByteMirror[bt];
}
static void
mirror_bytes(uint8_t *pbts, size_t szLen)
{
size_t szByteNr;
for (szByteNr = 0; szByteNr < szLen; szByteNr++) {
*pbts = ByteMirror[*pbts];
pbts++;
}
}
uint32_t
mirror32(uint32_t ui32Bits)
{
mirror_bytes((uint8_t *) & ui32Bits, 4);
return ui32Bits;
}
uint64_t
mirror64(uint64_t ui64Bits)
{
mirror_bytes((uint8_t *) & ui64Bits, 8);
return ui64Bits;
}
|
1060840728-lvgang
|
libnfc/mirror-subr.c
|
C
|
lgpl
| 3,312
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef __NFC_CONF_H__
#define __NFC_CONF_H__
#include <nfc/nfc-types.h>
void conf_load(nfc_context *context);
#endif // __NFC_CONF_H__
|
1060840728-lvgang
|
libnfc/conf.h
|
C
|
lgpl
| 1,221
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file nfc-internal.c
* @brief Provide some useful internal functions
*/
#include <nfc/nfc.h>
#include "nfc-internal.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef CONFFILES
#include "conf.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#define LOG_GROUP NFC_LOG_GROUP_GENERAL
#define LOG_CATEGORY "libnfc.general"
void
string_as_boolean(const char *s, bool *value)
{
if (s) {
if (!(*value)) {
if ((strcmp(s, "yes") == 0) ||
(strcmp(s, "true") == 0) ||
(strcmp(s, "1") == 0)) {
*value = true;
return;
}
} else {
if ((strcmp(s, "no") == 0) ||
(strcmp(s, "false") == 0) ||
(strcmp(s, "0") == 0)) {
*value = false;
return;
}
}
}
}
nfc_context *
nfc_context_new(void)
{
nfc_context *res = malloc(sizeof(*res));
if (!res) {
return NULL;
}
// Set default context values
res->allow_autoscan = true;
res->allow_intrusive_scan = false;
#ifdef DEBUG
res->log_level = 3;
#else
res->log_level = 1;
#endif
// Clear user defined devices array
for (int i = 0; i < MAX_USER_DEFINED_DEVICES; i++) {
strcpy(res->user_defined_devices[i].name, "");
strcpy(res->user_defined_devices[i].connstring, "");
res->user_defined_devices[i].optional = false;
}
res->user_defined_device_count = 0;
#ifdef ENVVARS
// Load user defined device from environment variable at first
char *envvar = getenv("LIBNFC_DEFAULT_DEVICE");
if (envvar) {
strcpy(res->user_defined_devices[0].name, "user defined default device");
strncpy(res->user_defined_devices[0].connstring, envvar, NFC_BUFSIZE_CONNSTRING);
res->user_defined_devices[0].connstring[NFC_BUFSIZE_CONNSTRING - 1] = '\0';
res->user_defined_device_count++;
}
#endif // ENVVARS
#ifdef CONFFILES
// Load options from configuration file (ie. /etc/nfc/libnfc.conf)
conf_load(res);
#endif // CONFFILES
#ifdef ENVVARS
// Environment variables
// Load user defined device from environment variable as the only reader
envvar = getenv("LIBNFC_DEVICE");
if (envvar) {
strcpy(res->user_defined_devices[0].name, "user defined device");
strncpy(res->user_defined_devices[0].connstring, envvar, NFC_BUFSIZE_CONNSTRING);
res->user_defined_devices[0].connstring[NFC_BUFSIZE_CONNSTRING - 1] = '\0';
res->user_defined_device_count = 1;
}
// Load "auto scan" option
envvar = getenv("LIBNFC_AUTO_SCAN");
string_as_boolean(envvar, &(res->allow_autoscan));
// Load "intrusive scan" option
envvar = getenv("LIBNFC_INTRUSIVE_SCAN");
string_as_boolean(envvar, &(res->allow_intrusive_scan));
// log level
envvar = getenv("LIBNFC_LOG_LEVEL");
if (envvar) {
res->log_level = atoi(envvar);
}
#endif // ENVVARS
// Initialize log before use it...
log_init(res);
// Debug context state
#if defined DEBUG
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_NONE, "log_level is set to %"PRIu32, res->log_level);
#else
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "log_level is set to %"PRIu32, res->log_level);
#endif
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "allow_autoscan is set to %s", (res->allow_autoscan) ? "true" : "false");
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "allow_intrusive_scan is set to %s", (res->allow_intrusive_scan) ? "true" : "false");
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%d device(s) defined by user", res->user_defined_device_count);
for (uint32_t i = 0; i < res->user_defined_device_count; i++) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, " #%d name: \"%s\", connstring: \"%s\"", i, res->user_defined_devices[i].name, res->user_defined_devices[i].connstring);
}
return res;
}
void
nfc_context_free(nfc_context *context)
{
log_exit();
free(context);
}
void
prepare_initiator_data(const nfc_modulation nm, uint8_t **ppbtInitiatorData, size_t *pszInitiatorData)
{
switch (nm.nmt) {
case NMT_ISO14443B: {
// Application Family Identifier (AFI) must equals 0x00 in order to wakeup all ISO14443-B PICCs (see ISO/IEC 14443-3)
*ppbtInitiatorData = (uint8_t *) "\x00";
*pszInitiatorData = 1;
}
break;
case NMT_ISO14443BI: {
// APGEN
*ppbtInitiatorData = (uint8_t *) "\x01\x0b\x3f\x80";
*pszInitiatorData = 4;
}
break;
case NMT_ISO14443B2SR: {
// Get_UID
*ppbtInitiatorData = (uint8_t *) "\x0b";
*pszInitiatorData = 1;
}
break;
case NMT_ISO14443B2CT: {
// SELECT-ALL
*ppbtInitiatorData = (uint8_t *) "\x9F\xFF\xFF";
*pszInitiatorData = 3;
}
break;
case NMT_FELICA: {
// polling payload must be present (see ISO/IEC 18092 11.2.2.5)
*ppbtInitiatorData = (uint8_t *) "\x00\xff\xff\x01\x00";
*pszInitiatorData = 5;
}
break;
case NMT_ISO14443A:
case NMT_JEWEL:
case NMT_DEP:
*ppbtInitiatorData = NULL;
*pszInitiatorData = 0;
break;
}
}
int
connstring_decode(const nfc_connstring connstring, const char *driver_name, const char *bus_name, char **pparam1, char **pparam2)
{
if (driver_name == NULL) {
driver_name = "";
}
if (bus_name == NULL) {
bus_name = "";
}
int n = strlen(connstring) + 1;
char *param0 = malloc(n);
if (param0 == NULL) {
perror("malloc");
return 0;
}
char *param1 = malloc(n);
if (param1 == NULL) {
perror("malloc");
free(param0);
return 0;
}
char *param2 = malloc(n);
if (param2 == NULL) {
perror("malloc");
free(param0);
free(param1);
return 0;
}
char format[32];
snprintf(format, sizeof(format), "%%%i[^:]:%%%i[^:]:%%%i[^:]", n - 1, n - 1, n - 1);
int res = sscanf(connstring, format, param0, param1, param2);
if (res < 1 || ((0 != strcmp(param0, driver_name)) &&
(bus_name != NULL) &&
(0 != strcmp(param0, bus_name)))) {
// Driver name does not match.
res = 0;
}
if (pparam1 != NULL) {
if (res < 2) {
free(param1);
*pparam1 = NULL;
} else {
*pparam1 = param1;
}
} else {
free(param1);
}
if (pparam2 != NULL) {
if (res < 3) {
free(param2);
*pparam2 = NULL;
} else {
*pparam2 = param2;
}
} else {
free(param2);
}
free(param0);
return res;
}
|
1060840728-lvgang
|
libnfc/nfc-internal.c
|
C
|
lgpl
| 7,447
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef __LOG_H__
#define __LOG_H__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "nfc-internal.h"
#define NFC_LOG_PRIORITY_NONE 0
#define NFC_LOG_PRIORITY_ERROR 1
#define NFC_LOG_PRIORITY_INFO 2
#define NFC_LOG_PRIORITY_DEBUG 3
#define NFC_LOG_GROUP_GENERAL 1
#define NFC_LOG_GROUP_CONFIG 2
#define NFC_LOG_GROUP_CHIP 3
#define NFC_LOG_GROUP_DRIVER 4
#define NFC_LOG_GROUP_COM 5
#define NFC_LOG_GROUP_LIBUSB 6
/*
To enable log only for one (or more) group, you can use this formula:
log_level = NFC_LOG_PRIORITY(main) + NFC_LOG_PRIORITY(group) * 2 ^ (NFC_LOG_GROUP(group) * 2)
Examples:
* Main log level is NONE and only communication group log is set to DEBUG verbosity (for rx/tx trace):
LIBNFC_LOG_LEVEL=3072 // 0+3072
* Main log level is ERROR and driver layer log is set to DEBUG level:
LIBNFC_LOG_LEVEL=769 // 1+768
* Main log level is ERROR, driver layer is set to INFO and communication is set to DEBUG:
LIBNFC_LOG_LEVEL=3585 // 1+512+3072
*/
//int log_priority_to_int(const char* priority);
const char *log_priority_to_str(const int priority);
#if defined LOG
# ifndef __has_attribute
# define __has_attribute(x) 0
# endif
# if __has_attribute(format) || defined(__GNUC__)
# define __has_attribute_format 1
# endif
void log_init(const nfc_context *context);
void log_exit(void);
void log_put(const uint8_t group, const char *category, const uint8_t priority, const char *format, ...)
# if __has_attribute_format
__attribute__((format(printf, 4, 5)))
# endif
;
#else
// No logging
#define log_init(nfc_context) ((void) 0)
#define log_exit() ((void) 0)
#define log_put(group, category, priority, format, ...) do {} while (0)
#endif // LOG
/**
* @macro LOG_HEX
* @brief Log a byte-array in hexadecimal format
* Max values: pcTag of 121 bytes + ": " + 300 bytes of data+ "\0" => acBuf of 1024 bytes
*/
# ifdef LOG
# define LOG_HEX(group, pcTag, pbtData, szBytes) do { \
size_t __szPos; \
char __acBuf[1024]; \
size_t __szBuf = 0; \
if ((int)szBytes < 0) { \
fprintf (stderr, "%s:%d: Attempt to print %d bytes!\n", __FILE__, __LINE__, (int)szBytes); \
log_put (group, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s:%d: Attempt to print %d bytes!\n", __FILE__, __LINE__, (int)szBytes); \
abort(); \
break; \
} \
snprintf (__acBuf + __szBuf, sizeof(__acBuf) - __szBuf, "%s: ", pcTag); \
__szBuf += strlen (pcTag) + 2; \
for (__szPos=0; (__szPos < (size_t)(szBytes)) && (__szBuf < sizeof(__acBuf)); __szPos++) { \
snprintf (__acBuf + __szBuf, sizeof(__acBuf) - __szBuf, "%02x ",((uint8_t *)(pbtData))[__szPos]); \
__szBuf += 3; \
} \
log_put (group, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", __acBuf); \
} while (0);
# else
# define LOG_HEX(group, pcTag, pbtData, szBytes) do { \
(void) group; \
(void) pcTag; \
(void) pbtData; \
(void) szBytes; \
} while (0);
# endif
#endif // __LOG_H__
|
1060840728-lvgang
|
libnfc/log.h
|
C
|
lgpl
| 4,109
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "conf.h"
#ifdef CONFFILES
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
#include <regex.h>
#include <sys/stat.h>
#include <nfc/nfc.h>
#include "nfc-internal.h"
#include "log.h"
#define LOG_CATEGORY "libnfc.config"
#define LOG_GROUP NFC_LOG_GROUP_CONFIG
#ifndef LIBNFC_SYSCONFDIR
// If this define does not already exists, we build it using SYSCONFDIR
#ifndef SYSCONFDIR
#error "SYSCONFDIR is not defined but required."
#endif // SYSCONFDIR
#define LIBNFC_SYSCONFDIR SYSCONFDIR"/nfc"
#endif // LIBNFC_SYSCONFDIR
#define LIBNFC_CONFFILE LIBNFC_SYSCONFDIR"/libnfc.conf"
#define LIBNFC_DEVICECONFDIR LIBNFC_SYSCONFDIR"/devices.d"
static bool
conf_parse_file(const char *filename, void (*conf_keyvalue)(void *data, const char *key, const char *value), void *data)
{
FILE *f = fopen(filename, "r");
if (!f) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Unable to open file: %s", filename);
return false;
}
char line[BUFSIZ];
const char *str_regex = "^[[:space:]]*([[:alnum:]_.]+)[[:space:]]*=[[:space:]]*(\"(.+)\"|([^[:space:]]+))[[:space:]]*$";
regex_t preg;
if (regcomp(&preg, str_regex, REG_EXTENDED | REG_NOTEOL) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Regular expression used for configuration file parsing is not valid.");
fclose(f);
return false;
}
size_t nmatch = preg.re_nsub + 1;
regmatch_t *pmatch = malloc(sizeof(*pmatch) * nmatch);
if (!pmatch) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Not enough memory: malloc failed.");
regfree(&preg);
fclose(f);
return false;
}
int lineno = 0;
while (fgets(line, BUFSIZ, f) != NULL) {
lineno++;
switch (line[0]) {
case '#':
case '\n':
break;
default: {
int match;
if ((match = regexec(&preg, line, nmatch, pmatch, 0)) == 0) {
const size_t key_size = pmatch[1].rm_eo - pmatch[1].rm_so;
const off_t value_pmatch = pmatch[3].rm_eo != -1 ? 3 : 4;
const size_t value_size = pmatch[value_pmatch].rm_eo - pmatch[value_pmatch].rm_so;
char key[key_size + 1];
char value[value_size + 1];
strncpy(key, line + (pmatch[1].rm_so), key_size);
key[key_size] = '\0';
strncpy(value, line + (pmatch[value_pmatch].rm_so), value_size);
value[value_size] = '\0';
conf_keyvalue(data, key, value);
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Parse error on line #%d: %s", lineno, line);
}
}
break;
}
}
free(pmatch);
regfree(&preg);
fclose(f);
return false;
}
static void
conf_keyvalue_context(void *data, const char *key, const char *value)
{
nfc_context *context = (nfc_context *)data;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "key: [%s], value: [%s]", key, value);
if (strcmp(key, "allow_autoscan") == 0) {
string_as_boolean(value, &(context->allow_autoscan));
} else if (strcmp(key, "allow_intrusive_scan") == 0) {
string_as_boolean(value, &(context->allow_intrusive_scan));
} else if (strcmp(key, "log_level") == 0) {
context->log_level = atoi(value);
} else if (strcmp(key, "device.name") == 0) {
if ((context->user_defined_device_count == 0) || strcmp(context->user_defined_devices[context->user_defined_device_count - 1].name, "") != 0) {
if (context->user_defined_device_count >= MAX_USER_DEFINED_DEVICES) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Configuration exceeded maximum user-defined devices.");
return;
}
context->user_defined_device_count++;
}
strncpy(context->user_defined_devices[context->user_defined_device_count - 1].name, value, DEVICE_NAME_LENGTH - 1);
context->user_defined_devices[context->user_defined_device_count - 1].name[DEVICE_NAME_LENGTH - 1] = '\0';
} else if (strcmp(key, "device.connstring") == 0) {
if ((context->user_defined_device_count == 0) || strcmp(context->user_defined_devices[context->user_defined_device_count - 1].connstring, "") != 0) {
if (context->user_defined_device_count >= MAX_USER_DEFINED_DEVICES) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Configuration exceeded maximum user-defined devices.");
return;
}
context->user_defined_device_count++;
}
strncpy(context->user_defined_devices[context->user_defined_device_count - 1].connstring, value, NFC_BUFSIZE_CONNSTRING - 1);
context->user_defined_devices[context->user_defined_device_count - 1].connstring[NFC_BUFSIZE_CONNSTRING - 1] = '\0';
} else if (strcmp(key, "device.optional") == 0) {
if ((context->user_defined_device_count == 0) || context->user_defined_devices[context->user_defined_device_count - 1].optional) {
if (context->user_defined_device_count >= MAX_USER_DEFINED_DEVICES) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Configuration exceeded maximum user-defined devices.");
return;
}
context->user_defined_device_count++;
}
if ((strcmp(value, "true") == 0) || (strcmp(value, "True") == 0) || (strcmp(value, "1") == 0)) //optional
context->user_defined_devices[context->user_defined_device_count - 1].optional = true;
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Unknown key in config line: %s = %s", key, value);
}
}
static void
conf_keyvalue_device(void *data, const char *key, const char *value)
{
char newkey[BUFSIZ];
sprintf(newkey, "device.%s", key);
conf_keyvalue_context(data, newkey, value);
}
static void
conf_devices_load(const char *dirname, nfc_context *context)
{
DIR *d = opendir(dirname);
if (!d) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Unable to open directory: %s", dirname);
} else {
struct dirent *de;
#ifdef WIN32
while ((de = readdir(d)) != NULL) {
#else
struct dirent entry;
struct dirent *result;
while ((readdir_r(d, &entry, &result) == 0) && (result != NULL)) {
de = &entry;
#endif
if (de->d_name[0] != '.') {
const size_t filename_len = strlen(de->d_name);
const size_t extension_len = strlen(".conf");
if ((filename_len > extension_len) &&
(strncmp(".conf", de->d_name + (filename_len - extension_len), extension_len) == 0)) {
char filename[BUFSIZ] = LIBNFC_DEVICECONFDIR"/";
strcat(filename, de->d_name);
struct stat s;
if (stat(filename, &s) == -1) {
perror("stat");
continue;
}
if (S_ISREG(s.st_mode)) {
conf_parse_file(filename, conf_keyvalue_device, context);
}
}
}
}
closedir(d);
}
}
void
conf_load(nfc_context *context)
{
conf_parse_file(LIBNFC_CONFFILE, conf_keyvalue_context, context);
conf_devices_load(LIBNFC_DEVICECONFDIR, context);
}
#endif // CONFFILES
|
1060840728-lvgang
|
libnfc/conf.c
|
C
|
lgpl
| 8,154
|
# Windows MinGW workarounds
IF(WIN32)
SET(WINDOWS_SOURCES ../contrib/win32/stdlib)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
# Add in the rc for version information in the dll
LIST(APPEND WINDOWS_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/../windows/libnfc.rc)
ENDIF(WIN32)
# Library's chips
SET(CHIPS_SOURCES chips/pn53x)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/chips)
# Library's buses
IF(USB_REQUIRED)
LIST(APPEND BUSES_SOURCES buses/usbbus)
ENDIF(USB_REQUIRED)
IF(UART_REQUIRED)
IF(WIN32)
# Windows have a special implementation for UART
LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/uart)
ELSE(WIN32)
LIST(APPEND BUSES_SOURCES buses/uart)
ENDIF(WIN32)
ENDIF(UART_REQUIRED)
IF(I2C_REQUIRED)
IF(WIN32)
# Windows is not supported at the moment
#LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/i2c)
MESSAGE( FATAL_ERROR "I2C not (yet) supported under Windows!" )
ELSE(WIN32)
LIST(APPEND BUSES_SOURCES buses/i2c)
ENDIF(WIN32)
ENDIF(I2C_REQUIRED)
IF(SPI_REQUIRED)
IF(WIN32)
# Windows is not supported at the moment
#LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/spi)
MESSAGE( FATAL_ERROR "SPI not (yet) supported under Windows!" )
ELSE(WIN32)
LIST(APPEND BUSES_SOURCES buses/spi)
ENDIF(WIN32)
ENDIF(SPI_REQUIRED)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/buses)
IF(WIN32)
# Windows now requires regex, so we utilize PCRE
# since Windows doesn't get the benefit of finding in CMake
# it has to be added manually
IF(PCRE_FOUND)
INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIRS})
LINK_DIRECTORIES(${PCRE_LIBRARY_DIRS})
ENDIF(PCRE_FOUND)
ENDIF(WIN32)
IF(PCSC_FOUND)
INCLUDE_DIRECTORIES(${PCSC_INCLUDE_DIRS})
LINK_DIRECTORIES(${PCSC_LIBRARY_DIRS})
ENDIF(PCSC_FOUND)
IF(LIBUSB_FOUND)
INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBUSB_LIBRARY_DIRS})
ENDIF(LIBUSB_FOUND)
# Library
SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation nfc-internal conf iso14443-subr mirror-subr target-subr ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES} ${WINDOWS_SOURCES})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
IF(LIBNFC_LOG)
IF(WIN32)
SET(CMAKE_C_FLAGS "-fgnu89-inline ${CMAKE_C_FLAGS}")
LIST(APPEND LIBRARY_SOURCES log ../contrib/win32/libnfc/log-internal)
ELSE(WIN32)
LIST(APPEND LIBRARY_SOURCES log log-internal)
ENDIF(WIN32)
ENDIF(LIBNFC_LOG)
ADD_LIBRARY(nfc SHARED ${LIBRARY_SOURCES})
IF(PCSC_FOUND)
TARGET_LINK_LIBRARIES(nfc ${PCSC_LIBRARIES})
ENDIF(PCSC_FOUND)
IF(LIBUSB_FOUND)
TARGET_LINK_LIBRARIES(nfc ${LIBUSB_LIBRARIES})
ENDIF(LIBUSB_FOUND)
SET_TARGET_PROPERTIES(nfc PROPERTIES SOVERSION 0)
IF(WIN32)
# Libraries that are windows specific
TARGET_LINK_LIBRARIES(nfc wsock32)
IF(PCRE_FOUND)
TARGET_LINK_LIBRARIES(nfc ${PCRE_LIBRARIES})
ENDIF(PCRE_FOUND)
ADD_CUSTOM_COMMAND(
OUTPUT libnfc.lib
COMMAND dlltool -d ${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32/nfc.def -l ${CMAKE_CURRENT_BINARY_DIR}/libnfc.lib ${CMAKE_CURRENT_BINARY_DIR}/libnfc.dll
DEPENDS nfc ${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32/nfc.def
)
ADD_CUSTOM_TARGET(win32lib ALL DEPENDS libnfc.lib)
# On Windows the shared (runtime) library should be either in the same
# directory as the excutables or in the path, we add it to same directory
INSTALL(TARGETS nfc RUNTIME DESTINATION bin COMPONENT libraries)
# At compile time we need the .LIB file, we place it in the lib directory
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libnfc.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
ELSE(WIN32)
INSTALL(TARGETS nfc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
ENDIF(WIN32)
|
1060840728-lvgang
|
libnfc/CMakeLists.txt
|
CMake
|
lgpl
| 3,718
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file nfc-internal.h
* @brief Internal defines and macros
*/
#ifndef __NFC_INTERNAL_H__
#define __NFC_INTERNAL_H__
#include <stdbool.h>
#include <err.h>
# include <sys/time.h>
#include "nfc/nfc.h"
#include "log.h"
/**
* @macro HAL
* @brief Execute corresponding driver function if exists.
*/
#define HAL( FUNCTION, ... ) pnd->last_error = 0; \
if (pnd->driver->FUNCTION) { \
return pnd->driver->FUNCTION( __VA_ARGS__ ); \
} else { \
pnd->last_error = NFC_EDEVNOTSUPP; \
return false; \
}
#ifndef MIN
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
/*
* Buffer management macros.
*
* The following macros ease setting-up and using buffers:
* BUFFER_INIT (data, 5); // data -> [ xx, xx, xx, xx, xx ]
* BUFFER_SIZE (data); // size -> 0
* BUFFER_APPEND (data, 0x12); // data -> [ 12, xx, xx, xx, xx ]
* BUFFER_SIZE (data); // size -> 1
* uint16_t x = 0x3456; // We suppose we are little endian
* BUFFER_APPEND_BYTES (data, x, 2);
* // data -> [ 12, 56, 34, xx, xx ]
* BUFFER_SIZE (data); // size -> 3
* BUFFER_APPEND_LE (data, x, 2, sizeof (x));
* // data -> [ 12, 56, 34, 34, 56 ]
* BUFFER_SIZE (data); // size -> 5
*/
/*
* Initialise a buffer named buffer_name of size bytes.
*/
#define BUFFER_INIT(buffer_name, size) \
uint8_t buffer_name[size]; \
size_t __##buffer_name##_n = 0
/*
* Create a wrapper for an existing buffer.
* BEWARE! It eats children!
*/
#define BUFFER_ALIAS(buffer_name, origin) \
uint8_t *buffer_name = (void *)origin; \
size_t __##buffer_name##_n = 0;
#define BUFFER_SIZE(buffer_name) (__##buffer_name##_n)
#define BUFFER_CLEAR(buffer_name) (__##buffer_name##_n = 0)
/*
* Append one byte of data to the buffer buffer_name.
*/
#define BUFFER_APPEND(buffer_name, data) \
do { \
buffer_name[__##buffer_name##_n++] = data; \
} while (0)
/*
* Append size bytes of data to the buffer buffer_name.
*/
#define BUFFER_APPEND_BYTES(buffer_name, data, size) \
do { \
size_t __n = 0; \
while (__n < size) { \
buffer_name[__##buffer_name##_n++] = ((uint8_t *)data)[__n++]; \
} \
} while (0)
typedef enum {
NOT_INTRUSIVE,
INTRUSIVE,
NOT_AVAILABLE,
} scan_type_enum;
struct nfc_driver {
const char *name;
const scan_type_enum scan_type;
size_t (*scan)(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len);
struct nfc_device *(*open)(const nfc_context *context, const nfc_connstring connstring);
void (*close)(struct nfc_device *pnd);
const char *(*strerror)(const struct nfc_device *pnd);
int (*initiator_init)(struct nfc_device *pnd);
int (*initiator_init_secure_element)(struct nfc_device *pnd);
int (*initiator_select_passive_target)(struct nfc_device *pnd, const nfc_modulation nm, const uint8_t *pbtInitData, const size_t szInitData, nfc_target *pnt);
int (*initiator_poll_target)(struct nfc_device *pnd, const nfc_modulation *pnmModulations, const size_t szModulations, const uint8_t uiPollNr, const uint8_t btPeriod, nfc_target *pnt);
int (*initiator_select_dep_target)(struct nfc_device *pnd, const nfc_dep_mode ndm, const nfc_baud_rate nbr, const nfc_dep_info *pndiInitiator, nfc_target *pnt, const int timeout);
int (*initiator_deselect_target)(struct nfc_device *pnd);
int (*initiator_transceive_bytes)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, int timeout);
int (*initiator_transceive_bits)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar);
int (*initiator_transceive_bytes_timed)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, uint32_t *cycles);
int (*initiator_transceive_bits_timed)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar, uint32_t *cycles);
int (*initiator_target_is_present)(struct nfc_device *pnd, const nfc_target *pnt);
int (*target_init)(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRx, int timeout);
int (*target_send_bytes)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout);
int (*target_receive_bytes)(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, int timeout);
int (*target_send_bits)(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar);
int (*target_receive_bits)(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtRxPar);
int (*device_set_property_bool)(struct nfc_device *pnd, const nfc_property property, const bool bEnable);
int (*device_set_property_int)(struct nfc_device *pnd, const nfc_property property, const int value);
int (*get_supported_modulation)(struct nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
int (*get_supported_baud_rate)(struct nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);
int (*device_get_information_about)(struct nfc_device *pnd, char **buf);
int (*abort_command)(struct nfc_device *pnd);
int (*idle)(struct nfc_device *pnd);
int (*powerdown)(struct nfc_device *pnd);
};
# define DEVICE_NAME_LENGTH 256
# define DEVICE_PORT_LENGTH 64
#define MAX_USER_DEFINED_DEVICES 4
struct nfc_user_defined_device {
char name[DEVICE_NAME_LENGTH];
nfc_connstring connstring;
bool optional;
};
/**
* @struct nfc_context
* @brief NFC library context
* Struct which contains internal options, references, pointers, etc. used by library
*/
struct nfc_context {
bool allow_autoscan;
bool allow_intrusive_scan;
uint32_t log_level;
struct nfc_user_defined_device user_defined_devices[MAX_USER_DEFINED_DEVICES];
unsigned int user_defined_device_count;
};
nfc_context *nfc_context_new(void);
void nfc_context_free(nfc_context *context);
/**
* @struct nfc_device
* @brief NFC device information
*/
struct nfc_device {
const nfc_context *context;
const struct nfc_driver *driver;
void *driver_data;
void *chip_data;
/** Device name string, including device wrapper firmware */
char name[DEVICE_NAME_LENGTH];
/** Device connection string */
nfc_connstring connstring;
/** Is the CRC automaticly added, checked and removed from the frames */
bool bCrc;
/** Does the chip handle parity bits, all parities are handled as data */
bool bPar;
/** Should the chip handle frames encapsulation and chaining */
bool bEasyFraming;
/** Should the chip try forever on select? */
bool bInfiniteSelect;
/** Should the chip switch automatically activate ISO14443-4 when
selecting tags supporting it? */
bool bAutoIso14443_4;
/** Supported modulation encoded in a byte */
uint8_t btSupportByte;
/** Last reported error */
int last_error;
};
nfc_device *nfc_device_new(const nfc_context *context, const nfc_connstring connstring);
void nfc_device_free(nfc_device *dev);
void string_as_boolean(const char *s, bool *value);
void iso14443_cascade_uid(const uint8_t abtUID[], const size_t szUID, uint8_t *pbtCascadedUID, size_t *pszCascadedUID);
void prepare_initiator_data(const nfc_modulation nm, uint8_t **ppbtInitiatorData, size_t *pszInitiatorData);
int connstring_decode(const nfc_connstring connstring, const char *driver_name, const char *bus_name, char **pparam1, char **pparam2);
#endif // __NFC_INTERNAL_H__
|
1060840728-lvgang
|
libnfc/nfc-internal.h
|
C
|
lgpl
| 8,735
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file nfc.c
* @brief NFC library implementation
*/
/**
* @defgroup lib Library initialization/deinitialization
* This page details how to initialize and deinitialize libnfc. Initialization
* must be performed before using any libnfc functionality, and similarly you
* must not call any libnfc functions after deinitialization.
*/
/**
* @defgroup dev NFC Device/Hardware manipulation
* The functionality documented below is designed to help with the following
* operations:
* - Enumerating the NFC devices currently attached to the system
* - Opening and closing the chosen device
*/
/**
* @defgroup initiator NFC initiator
* This page details how to act as "reader".
*/
/**
* @defgroup target NFC target
* This page details how to act as tag (i.e. MIFARE Classic) or NFC target device.
*/
/**
* @defgroup error Error reporting
* Most libnfc functions return 0 on success or one of error codes defined on failure.
*/
/**
* @defgroup data Special data accessors
* The functionnality documented below allow to access to special data as device name or device connstring.
*/
/**
* @defgroup properties Properties accessors
* The functionnality documented below allow to configure parameters and registers.
*/
/**
* @defgroup misc Miscellaneous
*
*/
/**
* @defgroup string-converter To-string converters
* The functionnality documented below allow to retreive some information in text format.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <nfc/nfc.h>
#include "nfc-internal.h"
#include "target-subr.h"
#include "drivers.h"
#if defined (DRIVER_ACR122_PCSC_ENABLED)
# include "drivers/acr122_pcsc.h"
#endif /* DRIVER_ACR122_PCSC_ENABLED */
#if defined (DRIVER_ACR122_USB_ENABLED)
# include "drivers/acr122_usb.h"
#endif /* DRIVER_ACR122_USB_ENABLED */
#if defined (DRIVER_ACR122S_ENABLED)
# include "drivers/acr122s.h"
#endif /* DRIVER_ACR122S_ENABLED */
#if defined (DRIVER_PN53X_USB_ENABLED)
# include "drivers/pn53x_usb.h"
#endif /* DRIVER_PN53X_USB_ENABLED */
#if defined (DRIVER_ARYGON_ENABLED)
# include "drivers/arygon.h"
#endif /* DRIVER_ARYGON_ENABLED */
#if defined (DRIVER_PN532_UART_ENABLED)
# include "drivers/pn532_uart.h"
#endif /* DRIVER_PN532_UART_ENABLED */
#if defined (DRIVER_PN532_SPI_ENABLED)
# include "drivers/pn532_spi.h"
#endif /* DRIVER_PN532_SPI_ENABLED */
#if defined (DRIVER_PN532_I2C_ENABLED)
# include "drivers/pn532_i2c.h"
#endif /* DRIVER_PN532_I2C_ENABLED */
#define LOG_CATEGORY "libnfc.general"
#define LOG_GROUP NFC_LOG_GROUP_GENERAL
struct nfc_driver_list {
const struct nfc_driver_list *next;
const struct nfc_driver *driver;
};
const struct nfc_driver_list *nfc_drivers = NULL;
static void
nfc_drivers_init(void)
{
#if defined (DRIVER_PN53X_USB_ENABLED)
nfc_register_driver(&pn53x_usb_driver);
#endif /* DRIVER_PN53X_USB_ENABLED */
#if defined (DRIVER_ACR122_PCSC_ENABLED)
nfc_register_driver(&acr122_pcsc_driver);
#endif /* DRIVER_ACR122_PCSC_ENABLED */
#if defined (DRIVER_ACR122_USB_ENABLED)
nfc_register_driver(&acr122_usb_driver);
#endif /* DRIVER_ACR122_USB_ENABLED */
#if defined (DRIVER_ACR122S_ENABLED)
nfc_register_driver(&acr122s_driver);
#endif /* DRIVER_ACR122S_ENABLED */
#if defined (DRIVER_PN532_UART_ENABLED)
nfc_register_driver(&pn532_uart_driver);
#endif /* DRIVER_PN532_UART_ENABLED */
#if defined (DRIVER_PN532_SPI_ENABLED)
nfc_register_driver(&pn532_spi_driver);
#endif /* DRIVER_PN532_SPI_ENABLED */
#if defined (DRIVER_PN532_I2C_ENABLED)
nfc_register_driver(&pn532_i2c_driver);
#endif /* DRIVER_PN532_I2C_ENABLED */
#if defined (DRIVER_ARYGON_ENABLED)
nfc_register_driver(&arygon_driver);
#endif /* DRIVER_ARYGON_ENABLED */
}
static int
nfc_device_validate_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation *nm);
/** @ingroup lib
* @brief Register an NFC device driver with libnfc.
* This function registers a driver with libnfc, the caller is responsible of managing the lifetime of the
* driver and make sure that any resources associated with the driver are available after registration.
* @param pnd Pointer to an NFC device driver to be registered.
* @retval NFC_SUCCESS If the driver registration succeeds.
*/
int
nfc_register_driver(const struct nfc_driver *ndr)
{
if (!ndr)
return NFC_EINVARG;
struct nfc_driver_list *pndl = (struct nfc_driver_list *)malloc(sizeof(struct nfc_driver_list));
if (!pndl)
return NFC_ESOFT;
pndl->driver = ndr;
pndl->next = nfc_drivers;
nfc_drivers = pndl;
return NFC_SUCCESS;
}
/** @ingroup lib
* @brief Initialize libnfc.
* This function must be called before calling any other libnfc function
* @param context Output location for nfc_context
*/
void
nfc_init(nfc_context **context)
{
*context = nfc_context_new();
if (!*context) {
perror("malloc");
return;
}
if (!nfc_drivers)
nfc_drivers_init();
}
/** @ingroup lib
* @brief Deinitialize libnfc.
* Should be called after closing all open devices and before your application terminates.
* @param context The context to deinitialize
*/
void
nfc_exit(nfc_context *context)
{
while (nfc_drivers) {
struct nfc_driver_list *pndl = (struct nfc_driver_list *) nfc_drivers;
nfc_drivers = pndl->next;
free(pndl);
}
nfc_context_free(context);
}
/** @ingroup dev
* @brief Open a NFC device
* @param context The context to operate on.
* @param connstring The device connection string if specific device is wanted, \c NULL otherwise
* @return Returns pointer to a \a nfc_device struct if successfull; otherwise returns \c NULL value.
*
* If \e connstring is \c NULL, the first available device from \a nfc_list_devices function is used.
*
* If \e connstring is set, this function will try to claim the right device using information provided by \e connstring.
*
* When it has successfully claimed a NFC device, memory is allocated to save the device information.
* It will return a pointer to a \a nfc_device struct.
* This pointer should be supplied by every next functions of libnfc that should perform an action with this device.
*
* @note Depending on the desired operation mode, the device needs to be configured by using nfc_initiator_init() or nfc_target_init(),
* optionally followed by manual tuning of the parameters if the default parameters are not suiting your goals.
*/
nfc_device *
nfc_open(nfc_context *context, const nfc_connstring connstring)
{
nfc_device *pnd = NULL;
nfc_connstring ncs;
if (connstring == NULL) {
if (!nfc_list_devices(context, &ncs, 1)) {
return NULL;
}
} else {
strncpy(ncs, connstring, sizeof(nfc_connstring));
ncs[sizeof(nfc_connstring) - 1] = '\0';
}
// Search through the device list for an available device
const struct nfc_driver_list *pndl = nfc_drivers;
while (pndl) {
const struct nfc_driver *ndr = pndl->driver;
// Specific device is requested: using device description
if (0 != strncmp(ndr->name, ncs, strlen(ndr->name))) {
// Check if connstring driver is usb -> accept any driver *_usb
if ((0 != strncmp("usb", ncs, strlen("usb"))) || 0 != strncmp("_usb", ndr->name + (strlen(ndr->name) - 4), 4)) {
pndl = pndl->next;
continue;
}
}
pnd = ndr->open(context, ncs);
// Test if the opening was successful
if (pnd == NULL) {
if (0 == strncmp("usb", ncs, strlen("usb"))) {
// We've to test the other usb drivers before giving up
pndl = pndl->next;
continue;
}
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Unable to open \"%s\".", ncs);
return NULL;
}
for (uint32_t i = 0; i > context->user_defined_device_count; i++) {
if (strcmp(ncs, context->user_defined_devices[i].connstring) == 0) {
// This is a device sets by user, we use the device name given by user
strcpy(pnd->name, context->user_defined_devices[i].name);
break;
}
}
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "\"%s\" (%s) has been claimed.", pnd->name, pnd->connstring);
return pnd;
}
// Too bad, no driver can decode connstring
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "No driver available to handle \"%s\".", ncs);
return NULL;
}
/** @ingroup dev
* @brief Close from a NFC device
* @param pnd \a nfc_device struct pointer that represent currently used device
*
* Initiator's selected tag is closed and the device, including allocated \a nfc_device struct, is released.
*/
void
nfc_close(nfc_device *pnd)
{
if (pnd) {
// Close, clean up and release the device
pnd->driver->close(pnd);
}
}
/** @ingroup dev
* @brief Scan for discoverable supported devices (ie. only available for some drivers)
* @return Returns the number of devices found.
* @param context The context to operate on, or NULL for the default context.
* @param connstrings array of \a nfc_connstring.
* @param connstrings_len size of the \a connstrings array.
*
*/
size_t
nfc_list_devices(nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
size_t device_found = 0;
#ifdef CONFFILES
// Load manually configured devices (from config file and env variables)
// TODO From env var...
for (uint32_t i = 0; i < context->user_defined_device_count; i++) {
if (context->user_defined_devices[i].optional) {
// let's make sure the device exists
nfc_device *pnd = NULL;
#ifdef ENVVARS
char *env_log_level = getenv("LIBNFC_LOG_LEVEL");
char *old_env_log_level = NULL;
// do it silently
if (env_log_level) {
if ((old_env_log_level = malloc(strlen(env_log_level) + 1)) == NULL) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to malloc()");
return 0;
}
strcpy(old_env_log_level, env_log_level);
}
setenv("LIBNFC_LOG_LEVEL", "0", 1);
#endif // ENVVARS
pnd = nfc_open(context, context->user_defined_devices[i].connstring);
#ifdef ENVVARS
if (old_env_log_level) {
setenv("LIBNFC_LOG_LEVEL", old_env_log_level, 1);
free(old_env_log_level);
} else {
unsetenv("LIBNFC_LOG_LEVEL");
}
#endif // ENVVARS
if (pnd) {
nfc_close(pnd);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "User device %s found", context->user_defined_devices[i].name);
strcpy((char *)(connstrings + device_found), context->user_defined_devices[i].connstring);
device_found ++;
if (device_found == connstrings_len)
break;
}
} else {
// manual choice is not marked as optional so let's take it blindly
strcpy((char *)(connstrings + device_found), context->user_defined_devices[i].connstring);
device_found++;
if (device_found >= connstrings_len)
return device_found;
}
}
#endif // CONFFILES
// Device auto-detection
if (context->allow_autoscan) {
const struct nfc_driver_list *pndl = nfc_drivers;
while (pndl) {
const struct nfc_driver *ndr = pndl->driver;
if ((ndr->scan_type == NOT_INTRUSIVE) || ((context->allow_intrusive_scan) && (ndr->scan_type == INTRUSIVE))) {
size_t _device_found = ndr->scan(context, connstrings + (device_found), connstrings_len - (device_found));
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%ld device(s) found using %s driver", (unsigned long) _device_found, ndr->name);
if (_device_found > 0) {
device_found += _device_found;
if (device_found == connstrings_len)
break;
}
} // scan_type is INTRUSIVE but not allowed or NOT_AVAILABLE
pndl = pndl->next;
}
} else if (context->user_defined_device_count == 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Warning: %s" , "user must specify device(s) manually when autoscan is disabled");
}
return device_found;
}
/** @ingroup properties
* @brief Set a device's integer-property value
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param property \a nfc_property which will be set
* @param value integer value
*
* Sets integer property.
*
* @see nfc_property enum values
*/
int
nfc_device_set_property_int(nfc_device *pnd, const nfc_property property, const int value)
{
HAL(device_set_property_int, pnd, property, value);
}
/** @ingroup properties
* @brief Set a device's boolean-property value
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param property \a nfc_property which will be set
* @param bEnable boolean to activate/disactivate the property
*
* Configures parameters and registers that control for example timing,
* modulation, frame and error handling. There are different categories for
* configuring the \e PN53X chip features (handle, activate, infinite and
* accept).
*/
int
nfc_device_set_property_bool(nfc_device *pnd, const nfc_property property, const bool bEnable)
{
HAL(device_set_property_bool, pnd, property, bEnable);
}
/** @ingroup initiator
* @brief Initialize NFC device as initiator (reader)
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
*
* The NFC device is configured to function as RFID reader.
* After initialization it can be used to communicate to passive RFID tags and active NFC devices.
* The reader will act as initiator to communicate peer 2 peer (NFCIP) to other active NFC devices.
* - Crc is handled by the device (NP_HANDLE_CRC = true)
* - Parity is handled the device (NP_HANDLE_PARITY = true)
* - Cryto1 cipher is disabled (NP_ACTIVATE_CRYPTO1 = false)
* - Easy framing is enabled (NP_EASY_FRAMING = true)
* - Auto-switching in ISO14443-4 mode is enabled (NP_AUTO_ISO14443_4 = true)
* - Invalid frames are not accepted (NP_ACCEPT_INVALID_FRAMES = false)
* - Multiple frames are not accepted (NP_ACCEPT_MULTIPLE_FRAMES = false)
* - 14443-A mode is activated (NP_FORCE_ISO14443_A = true)
* - speed is set to 106 kbps (NP_FORCE_SPEED_106 = true)
* - Let the device try forever to find a target (NP_INFINITE_SELECT = true)
* - RF field is shortly dropped (if it was enabled) then activated again
*/
int
nfc_initiator_init(nfc_device *pnd)
{
int res = 0;
// Drop the field for a while
if ((res = nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, false)) < 0)
return res;
// Enable field so more power consuming cards can power themselves up
if ((res = nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, true)) < 0)
return res;
// Let the device try forever to find a target/tag
if ((res = nfc_device_set_property_bool(pnd, NP_INFINITE_SELECT, true)) < 0)
return res;
// Activate auto ISO14443-4 switching by default
if ((res = nfc_device_set_property_bool(pnd, NP_AUTO_ISO14443_4, true)) < 0)
return res;
// Force 14443-A mode
if ((res = nfc_device_set_property_bool(pnd, NP_FORCE_ISO14443_A, true)) < 0)
return res;
// Force speed at 106kbps
if ((res = nfc_device_set_property_bool(pnd, NP_FORCE_SPEED_106, true)) < 0)
return res;
// Disallow invalid frame
if ((res = nfc_device_set_property_bool(pnd, NP_ACCEPT_INVALID_FRAMES, false)) < 0)
return res;
// Disallow multiple frames
if ((res = nfc_device_set_property_bool(pnd, NP_ACCEPT_MULTIPLE_FRAMES, false)) < 0)
return res;
HAL(initiator_init, pnd);
}
/** @ingroup initiator
* @brief Initialize NFC device as initiator with its secure element initiator (reader)
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
*
* The NFC device is configured to function as secure element reader.
* After initialization it can be used to communicate with the secure element.
* @note RF field is desactvated in order to some power
*/
int
nfc_initiator_init_secure_element(nfc_device *pnd)
{
HAL(initiator_init_secure_element, pnd);
}
/** @ingroup initiator
* @brief Select a passive or emulated tag
* @return Returns selected passive target count on success, otherwise returns libnfc's error code (negative value)
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param nm desired modulation
* @param pbtInitData optional initiator data, NULL for using the default values.
* @param szInitData length of initiator data \a pbtInitData.
* @note pbtInitData is used with different kind of data depending on modulation type:
* - for an ISO/IEC 14443 type A modulation, pbbInitData contains the UID you want to select;
* - for an ISO/IEC 14443 type B modulation, pbbInitData contains Application Family Identifier (AFI) (see ISO/IEC 14443-3)
and optionally a second byte = 0x01 if you want to use probabilistic approach instead of timeslot approach;
* - for a FeliCa modulation, pbbInitData contains a 5-byte polling payload (see ISO/IEC 18092 11.2.2.5).
* - for ISO14443B', ASK CTx and ST SRx, see corresponding standards
* - if NULL, default values adequate for the chosen modulation will be used.
*
* @param[out] pnt \a nfc_target struct pointer which will filled if available
*
* The NFC device will try to find one available passive tag or emulated tag.
*
* The chip needs to know with what kind of tag it is dealing with, therefore
* the initial modulation and speed (106, 212 or 424 kbps) should be supplied.
*/
int
nfc_initiator_select_passive_target(nfc_device *pnd,
const nfc_modulation nm,
const uint8_t *pbtInitData, const size_t szInitData,
nfc_target *pnt)
{
uint8_t *abtInit = NULL;
uint8_t abtTmpInit[MAX(12, szInitData)];
size_t szInit = 0;
int res;
if ((res = nfc_device_validate_modulation(pnd, N_INITIATOR, &nm)) != NFC_SUCCESS)
return res;
if (szInitData == 0) {
// Provide default values, if any
prepare_initiator_data(nm, &abtInit, &szInit);
} else if (nm.nmt == NMT_ISO14443A) {
abtInit = abtTmpInit;
iso14443_cascade_uid(pbtInitData, szInitData, abtInit, &szInit);
} else {
abtInit = abtTmpInit;
memcpy(abtInit, pbtInitData, szInitData);
szInit = szInitData;
}
HAL(initiator_select_passive_target, pnd, nm, abtInit, szInit, pnt);
}
/** @ingroup initiator
* @brief List passive or emulated tags
* @return Returns the number of targets found on success, otherwise returns libnfc's error code (negative value)
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param nm desired modulation
* @param[out] ant array of \a nfc_target that will be filled with targets info
* @param szTargets size of \a ant (will be the max targets listed)
*
* The NFC device will try to find the available passive tags. Some NFC devices
* are capable to emulate passive tags. The standards (ISO18092 and ECMA-340)
* describe the modulation that can be used for reader to passive
* communications. The chip needs to know with what kind of tag it is dealing
* with, therefore the initial modulation and speed (106, 212 or 424 kbps)
* should be supplied.
*/
int
nfc_initiator_list_passive_targets(nfc_device *pnd,
const nfc_modulation nm,
nfc_target ant[], const size_t szTargets)
{
nfc_target nt;
size_t szTargetFound = 0;
uint8_t *pbtInitData = NULL;
size_t szInitDataLen = 0;
int res = 0;
pnd->last_error = 0;
// Let the reader only try once to find a tag
bool bInfiniteSelect = pnd->bInfiniteSelect;
if ((res = nfc_device_set_property_bool(pnd, NP_INFINITE_SELECT, false)) < 0) {
return res;
}
prepare_initiator_data(nm, &pbtInitData, &szInitDataLen);
while (nfc_initiator_select_passive_target(pnd, nm, pbtInitData, szInitDataLen, &nt) > 0) {
size_t i;
bool seen = false;
// Check if we've already seen this tag
for (i = 0; i < szTargetFound; i++) {
if (memcmp(&(ant[i]), &nt, sizeof(nfc_target)) == 0) {
seen = true;
}
}
if (seen) {
break;
}
memcpy(&(ant[szTargetFound]), &nt, sizeof(nfc_target));
szTargetFound++;
if (szTargets == szTargetFound) {
break;
}
nfc_initiator_deselect_target(pnd);
// deselect has no effect on FeliCa and Jewel cards so we'll stop after one...
// ISO/IEC 14443 B' cards are polled at 100% probability so it's not possible to detect correctly two cards at the same time
if ((nm.nmt == NMT_FELICA) || (nm.nmt == NMT_JEWEL) || (nm.nmt == NMT_ISO14443BI) || (nm.nmt == NMT_ISO14443B2SR) || (nm.nmt == NMT_ISO14443B2CT)) {
break;
}
}
if (bInfiniteSelect) {
if ((res = nfc_device_set_property_bool(pnd, NP_INFINITE_SELECT, true)) < 0) {
return res;
}
}
return szTargetFound;
}
/** @ingroup initiator
* @brief Polling for NFC targets
* @return Returns polled targets count, otherwise returns libnfc's error code (negative value).
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pnmModulations desired modulations
* @param szModulations size of \a pnmModulations
* @param uiPollNr specifies the number of polling (0x01 – 0xFE: 1 up to 254 polling, 0xFF: Endless polling)
* @note one polling is a polling for each desired target type
* @param uiPeriod indicates the polling period in units of 150 ms (0x01 – 0x0F: 150ms – 2.25s)
* @note e.g. if uiPeriod=10, it will poll each desired target type during 1.5s
* @param[out] pnt pointer on \a nfc_target (over)writable struct
*/
int
nfc_initiator_poll_target(nfc_device *pnd,
const nfc_modulation *pnmModulations, const size_t szModulations,
const uint8_t uiPollNr, const uint8_t uiPeriod,
nfc_target *pnt)
{
HAL(initiator_poll_target, pnd, pnmModulations, szModulations, uiPollNr, uiPeriod, pnt);
}
/** @ingroup initiator
* @brief Select a target and request active or passive mode for D.E.P. (Data Exchange Protocol)
* @return Returns selected D.E.P targets count on success, otherwise returns libnfc's error code (negative value).
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param ndm desired D.E.P. mode (\a NDM_ACTIVE or \a NDM_PASSIVE for active, respectively passive mode)
* @param nbr desired baud rate
* @param ndiInitiator pointer \a nfc_dep_info struct that contains \e NFCID3 and \e General \e Bytes to set to the initiator device (optionnal, can be \e NULL)
* @param[out] pnt is a \a nfc_target struct pointer where target information will be put.
* @param timeout in milliseconds
*
* The NFC device will try to find an available D.E.P. target. The standards
* (ISO18092 and ECMA-340) describe the modulation that can be used for reader
* to passive communications.
*
* @note \a nfc_dep_info will be returned when the target was acquired successfully.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_initiator_select_dep_target(nfc_device *pnd,
const nfc_dep_mode ndm, const nfc_baud_rate nbr,
const nfc_dep_info *pndiInitiator, nfc_target *pnt, const int timeout)
{
HAL(initiator_select_dep_target, pnd, ndm, nbr, pndiInitiator, pnt, timeout);
}
/** @ingroup initiator
* @brief Poll a target and request active or passive mode for D.E.P. (Data Exchange Protocol)
* @return Returns selected D.E.P targets count on success, otherwise returns libnfc's error code (negative value).
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param ndm desired D.E.P. mode (\a NDM_ACTIVE or \a NDM_PASSIVE for active, respectively passive mode)
* @param nbr desired baud rate
* @param ndiInitiator pointer \a nfc_dep_info struct that contains \e NFCID3 and \e General \e Bytes to set to the initiator device (optionnal, can be \e NULL)
* @param[out] pnt is a \a nfc_target struct pointer where target information will be put.
* @param timeout in milliseconds
*
* The NFC device will try to find an available D.E.P. target. The standards
* (ISO18092 and ECMA-340) describe the modulation that can be used for reader
* to passive communications.
*
* @note \a nfc_dep_info will be returned when the target was acquired successfully.
*/
int
nfc_initiator_poll_dep_target(struct nfc_device *pnd,
const nfc_dep_mode ndm, const nfc_baud_rate nbr,
const nfc_dep_info *pndiInitiator,
nfc_target *pnt,
const int timeout)
{
const int period = 300;
int remaining_time = timeout;
int res;
int result = 0;
bool bInfiniteSelect = pnd->bInfiniteSelect;
if ((res = nfc_device_set_property_bool(pnd, NP_INFINITE_SELECT, true)) < 0)
return res;
while (remaining_time > 0) {
if ((res = nfc_initiator_select_dep_target(pnd, ndm, nbr, pndiInitiator, pnt, period)) < 0) {
if (res != NFC_ETIMEOUT) {
result = res;
goto end;
}
}
if (res == 1) {
result = res;
goto end;
}
remaining_time -= period;
}
end:
if (! bInfiniteSelect) {
if ((res = nfc_device_set_property_bool(pnd, NP_INFINITE_SELECT, false)) < 0) {
return res;
}
}
return result;
}
/** @ingroup initiator
* @brief Deselect a selected passive or emulated tag
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value).
* @param pnd \a nfc_device struct pointer that represents currently used device
*
* After selecting and communicating with a passive tag, this function could be
* used to deactivate and release the tag. This is very useful when there are
* multiple tags available in the field. It is possible to use the \fn
* nfc_initiator_select_passive_target() function to select the first available
* tag, test it for the available features and support, deselect it and skip to
* the next tag until the correct tag is found.
*/
int
nfc_initiator_deselect_target(nfc_device *pnd)
{
HAL(initiator_deselect_target, pnd);
}
/** @ingroup initiator
* @brief Send data to target then retrieve data from target
* @return Returns received bytes count on success, otherwise returns libnfc's error code
*
* @param pnd \a nfc_device struct pointer that represents currently used device
* @param pbtTx contains a byte array of the frame that needs to be transmitted.
* @param szTx contains the length in bytes.
* @param[out] pbtRx response from the target
* @param szRx size of \a pbtRx (Will return NFC_EOVFLOW if RX exceeds this size)
* @param timeout in milliseconds
*
* The NFC device (configured as initiator) will transmit the supplied bytes (\a pbtTx) to the target.
* It waits for the response and stores the received bytes in the \a pbtRx byte array.
*
* If \a NP_EASY_FRAMING option is disabled the frames will sent and received in raw mode: \e PN53x will not handle input neither output data.
*
* The parity bits are handled by the \e PN53x chip. The CRC can be generated automatically or handled manually.
* Using this function, frames can be communicated very fast via the NFC initiator to the tag.
*
* Tests show that on average this way of communicating is much faster than using the regular driver/middle-ware (often supplied by manufacturers).
*
* @warning The configuration option \a NP_HANDLE_PARITY must be set to \c true (the default value).
*
* @note When used with MIFARE Classic, NFC_EMFCAUTHFAIL error is returned if authentication command failed. You need to re-select the tag to operate with.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_initiator_transceive_bytes(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx,
const size_t szRx, int timeout)
{
HAL(initiator_transceive_bytes, pnd, pbtTx, szTx, pbtRx, szRx, timeout)
}
/** @ingroup initiator
* @brief Transceive raw bit-frames to a target
* @return Returns received bits count on success, otherwise returns libnfc's error code
*
* @param pnd \a nfc_device struct pointer that represents currently used device
* @param pbtTx contains a byte array of the frame that needs to be transmitted.
* @param szTxBits contains the length in bits.
*
* @note For example the REQA (0x26) command (first anti-collision command of
* ISO14443-A) must be precise 7 bits long. This is not possible by using
* nfc_initiator_transceive_bytes(). With that function you can only
* communicate frames that consist of full bytes. When you send a full byte (8
* bits + 1 parity) with the value of REQA (0x26), a tag will simply not
* respond. More information about this can be found in the anti-collision
* example (\e nfc-anticol).
*
* @param pbtTxPar parameter contains a byte array of the corresponding parity bits needed to send per byte.
*
* @note For example if you send the SELECT_ALL (0x93, 0x20) = [ 10010011,
* 00100000 ] command, you have to supply the following parity bytes (0x01,
* 0x00) to define the correct odd parity bits. This is only an example to
* explain how it works, if you just are sending two bytes with ISO14443-A
* compliant parity bits you better can use the
* nfc_initiator_transceive_bytes() function.
*
* @param[out] pbtRx response from the target
* @param szRx size of \a pbtRx (Will return NFC_EOVFLOW if RX exceeds this size)
* @param[out] pbtRxPar parameter contains a byte array of the corresponding parity bits
*
* The NFC device (configured as \e initiator) will transmit low-level messages
* where only the modulation is handled by the \e PN53x chip. Construction of
* the frame (data, CRC and parity) is completely done by libnfc. This can be
* very useful for testing purposes. Some protocols (e.g. MIFARE Classic)
* require to violate the ISO14443-A standard by sending incorrect parity and
* CRC bytes. Using this feature you are able to simulate these frames.
*/
int
nfc_initiator_transceive_bits(nfc_device *pnd,
const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar,
uint8_t *pbtRx, const size_t szRx,
uint8_t *pbtRxPar)
{
(void)szRx;
HAL(initiator_transceive_bits, pnd, pbtTx, szTxBits, pbtTxPar, pbtRx, pbtRxPar);
}
/** @ingroup initiator
* @brief Send data to target then retrieve data from target
* @return Returns received bytes count on success, otherwise returns libnfc's error code.
*
* @param pnd \a nfc_device struct pointer that represents currently used device
* @param pbtTx contains a byte array of the frame that needs to be transmitted.
* @param szTx contains the length in bytes.
* @param[out] pbtRx response from the target
* @param szRx size of \a pbtRx (Will return NFC_EOVFLOW if RX exceeds this size)
*
* This function is similar to nfc_initiator_transceive_bytes() with the following differences:
* - A precise cycles counter will indicate the number of cycles between emission & reception of frames.
* - It only supports mode with \a NP_EASY_FRAMING option disabled.
* - Overall communication with the host is heavier and slower.
*
* Timer control:
* By default timer configuration tries to maximize the precision, which also limits the maximum
* cycles count before saturation/timeout.
* E.g. with PN53x it can count up to 65535 cycles, so about 4.8ms, with a precision of about 73ns.
* - If you're ok with the defaults, set *cycles = 0 before calling this function.
* - If you need to count more cycles, set *cycles to the maximum you expect but don't forget
* you'll loose in precision and it'll take more time before timeout, so don't abuse!
*
* @warning The configuration option \a NP_EASY_FRAMING must be set to \c false.
* @warning The configuration option \a NP_HANDLE_PARITY must be set to \c true (the default value).
*/
int
nfc_initiator_transceive_bytes_timed(nfc_device *pnd,
const uint8_t *pbtTx, const size_t szTx,
uint8_t *pbtRx, const size_t szRx,
uint32_t *cycles)
{
HAL(initiator_transceive_bytes_timed, pnd, pbtTx, szTx, pbtRx, szRx, cycles);
}
/** @ingroup initiator
* @brief Check target presence
* @return Returns 0 on success, otherwise returns libnfc's error code.
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pnt a \a nfc_target struct pointer where desired target information was stored (optionnal, can be \e NULL).
* This function tests if \a nfc_target (or last selected tag if \e NULL) is currently present on NFC device.
* @warning The target have to be selected before check its presence
* @warning To run the test, one or more commands will be sent to target
*/
int
nfc_initiator_target_is_present(nfc_device *pnd, const nfc_target *pnt)
{
HAL(initiator_target_is_present, pnd, pnt);
}
/** @ingroup initiator
* @brief Transceive raw bit-frames to a target
* @return Returns received bits count on success, otherwise returns libnfc's error code
*
* This function is similar to nfc_initiator_transceive_bits() with the following differences:
* - A precise cycles counter will indicate the number of cycles between emission & reception of frames.
* - It only supports mode with \a NP_EASY_FRAMING option disabled and CRC must be handled manually.
* - Overall communication with the host is heavier and slower.
*
* Timer control:
* By default timer configuration tries to maximize the precision, which also limits the maximum
* cycles count before saturation/timeout.
* E.g. with PN53x it can count up to 65535 cycles, so about 4.8ms, with a precision of about 73ns.
* - If you're ok with the defaults, set *cycles = 0 before calling this function.
* - If you need to count more cycles, set *cycles to the maximum you expect but don't forget
* you'll loose in precision and it'll take more time before timeout, so don't abuse!
*
* @warning The configuration option \a NP_EASY_FRAMING must be set to \c false.
* @warning The configuration option \a NP_HANDLE_CRC must be set to \c false.
* @warning The configuration option \a NP_HANDLE_PARITY must be set to \c true (the default value).
*/
int
nfc_initiator_transceive_bits_timed(nfc_device *pnd,
const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar,
uint8_t *pbtRx, const size_t szRx,
uint8_t *pbtRxPar,
uint32_t *cycles)
{
(void)szRx;
HAL(initiator_transceive_bits_timed, pnd, pbtTx, szTxBits, pbtTxPar, pbtRx, pbtRxPar, cycles);
}
/** @ingroup target
* @brief Initialize NFC device as an emulated tag
* @return Returns received bytes count on success, otherwise returns libnfc's error code
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pnt pointer to \a nfc_target struct that represents the wanted emulated target
*
* @note \a pnt can be updated by this function: if you set NBR_UNDEFINED
* and/or NDM_UNDEFINED (ie. for DEP mode), these fields will be updated.
*
* @param[out] pbtRx Rx buffer pointer
* @param[out] szRx received bytes count
* @param timeout in milliseconds
*
* This function initializes NFC device in \e target mode in order to emulate a
* tag using the specified \a nfc_target_mode_t.
* - Crc is handled by the device (NP_HANDLE_CRC = true)
* - Parity is handled the device (NP_HANDLE_PARITY = true)
* - Cryto1 cipher is disabled (NP_ACTIVATE_CRYPTO1 = false)
* - Auto-switching in ISO14443-4 mode is enabled (NP_AUTO_ISO14443_4 = true)
* - Easy framing is disabled (NP_EASY_FRAMING = false)
* - Invalid frames are not accepted (NP_ACCEPT_INVALID_FRAMES = false)
* - Multiple frames are not accepted (NP_ACCEPT_MULTIPLE_FRAMES = false)
* - RF field is dropped
*
* @warning Be aware that this function will wait (hang) until a command is
* received that is not part of the anti-collision. The RATS command for
* example would wake up the emulator. After this is received, the send and
* receive functions can be used.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_target_init(nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRx, int timeout)
{
int res = 0;
// Disallow invalid frame
if ((res = nfc_device_set_property_bool(pnd, NP_ACCEPT_INVALID_FRAMES, false)) < 0)
return res;
// Disallow multiple frames
if ((res = nfc_device_set_property_bool(pnd, NP_ACCEPT_MULTIPLE_FRAMES, false)) < 0)
return res;
// Make sure we reset the CRC and parity to chip handling.
if ((res = nfc_device_set_property_bool(pnd, NP_HANDLE_CRC, true)) < 0)
return res;
if ((res = nfc_device_set_property_bool(pnd, NP_HANDLE_PARITY, true)) < 0)
return res;
// Activate auto ISO14443-4 switching by default
if ((res = nfc_device_set_property_bool(pnd, NP_AUTO_ISO14443_4, true)) < 0)
return res;
// Activate "easy framing" feature by default
if ((res = nfc_device_set_property_bool(pnd, NP_EASY_FRAMING, true)) < 0)
return res;
// Deactivate the CRYPTO1 cipher, it may could cause problems when still active
if ((res = nfc_device_set_property_bool(pnd, NP_ACTIVATE_CRYPTO1, false)) < 0)
return res;
// Drop explicitely the field
if ((res = nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, false)) < 0)
return res;
HAL(target_init, pnd, pnt, pbtRx, szRx, timeout);
}
/** @ingroup dev
* @brief Turn NFC device in idle mode
* @return Returns 0 on success, otherwise returns libnfc's error code.
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*
* This function switch the device in idle mode.
* In initiator mode, the RF field is turned off and the device is set to low power mode (if avaible);
* In target mode, the emulation is stoped (no target available from external initiator) and the device is set to low power mode (if avaible).
*/
int
nfc_idle(nfc_device *pnd)
{
HAL(idle, pnd);
}
/** @ingroup dev
* @brief Abort current running command
* @return Returns 0 on success, otherwise returns libnfc's error code.
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*
* Some commands (ie. nfc_target_init()) are blocking functions and will return only in particular conditions (ie. external initiator request).
* This function attempt to abort the current running command.
*
* @note The blocking function (ie. nfc_target_init()) will failed with DEABORT error.
*/
int
nfc_abort_command(nfc_device *pnd)
{
HAL(abort_command, pnd);
}
/** @ingroup target
* @brief Send bytes and APDU frames
* @return Returns sent bytes count on success, otherwise returns libnfc's error code
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pbtTx pointer to Tx buffer
* @param szTx size of Tx buffer
* @param timeout in milliseconds
*
* This function make the NFC device (configured as \e target) send byte frames
* (e.g. APDU responses) to the \e initiator.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_target_send_bytes(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout)
{
HAL(target_send_bytes, pnd, pbtTx, szTx, timeout);
}
/** @ingroup target
* @brief Receive bytes and APDU frames
* @return Returns received bytes count on success, otherwise returns libnfc's error code
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pbtRx pointer to Rx buffer
* @param szRx size of Rx buffer
* @param timeout in milliseconds
*
* This function retrieves bytes frames (e.g. ADPU) sent by the \e initiator to the NFC device (configured as \e target).
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_target_receive_bytes(nfc_device *pnd, uint8_t *pbtRx, const size_t szRx, int timeout)
{
HAL(target_receive_bytes, pnd, pbtRx, szRx, timeout);
}
/** @ingroup target
* @brief Send raw bit-frames
* @return Returns sent bits count on success, otherwise returns libnfc's error code.
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pbtTx pointer to Tx buffer
* @param szTxBits size of Tx buffer
* @param pbtTxPar parameter contains a byte array of the corresponding parity bits needed to send per byte.
* This function can be used to transmit (raw) bit-frames to the \e initiator
* using the specified NFC device (configured as \e target).
*/
int
nfc_target_send_bits(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar)
{
HAL(target_send_bits, pnd, pbtTx, szTxBits, pbtTxPar);
}
/** @ingroup target
* @brief Receive bit-frames
* @return Returns received bits count on success, otherwise returns libnfc's error code
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pbtRx pointer to Rx buffer
* @param szRx size of Rx buffer
* @param[out] pbtRxPar parameter contains a byte array of the corresponding parity bits
*
* This function makes it possible to receive (raw) bit-frames. It returns all
* the messages that are stored in the FIFO buffer of the \e PN53x chip. It
* does not require to send any frame and thereby could be used to snoop frames
* that are transmitted by a nearby \e initiator. @note Check out the
* NP_ACCEPT_MULTIPLE_FRAMES configuration option to avoid losing transmitted
* frames.
*/
int
nfc_target_receive_bits(nfc_device *pnd, uint8_t *pbtRx, const size_t szRx, uint8_t *pbtRxPar)
{
HAL(target_receive_bits, pnd, pbtRx, szRx, pbtRxPar);
}
static struct sErrorMessage {
int iErrorCode;
const char *pcErrorMsg;
} sErrorMessages[] = {
/* Chip-level errors (internal errors, RF errors, etc.) */
{ NFC_SUCCESS, "Success" },
{ NFC_EIO, "Input / Output Error" },
{ NFC_EINVARG, "Invalid argument(s)" },
{ NFC_EDEVNOTSUPP, "Not Supported by Device" },
{ NFC_ENOTSUCHDEV, "No Such Device" },
{ NFC_EOVFLOW, "Buffer Overflow" },
{ NFC_ETIMEOUT, "Timeout" },
{ NFC_EOPABORTED, "Operation Aborted" },
{ NFC_ENOTIMPL, "Not (yet) Implemented" },
{ NFC_ETGRELEASED, "Target Released" },
{ NFC_EMFCAUTHFAIL, "Mifare Authentication Failed" },
{ NFC_ERFTRANS, "RF Transmission Error" },
{ NFC_ECHIP, "Device's Internal Chip Error" },
};
/** @ingroup error
* @brief Return the last error string
* @return Returns a string
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*/
const char *
nfc_strerror(const nfc_device *pnd)
{
const char *pcRes = "Unknown error";
size_t i;
for (i = 0; i < (sizeof(sErrorMessages) / sizeof(struct sErrorMessage)); i++) {
if (sErrorMessages[i].iErrorCode == pnd->last_error) {
pcRes = sErrorMessages[i].pcErrorMsg;
break;
}
}
return pcRes;
}
/** @ingroup error
* @brief Renders the last error in pcStrErrBuf for a maximum size of szBufLen chars
* @return Returns 0 upon success
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pcStrErrBuf a string that contains the last error.
* @param szBufLen size of buffer
*/
int
nfc_strerror_r(const nfc_device *pnd, char *pcStrErrBuf, size_t szBufLen)
{
return (snprintf(pcStrErrBuf, szBufLen, "%s", nfc_strerror(pnd)) < 0) ? -1 : 0;
}
/** @ingroup error
* @brief Display the last error occured on a nfc_device
*
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param pcString a string
*/
void
nfc_perror(const nfc_device *pnd, const char *pcString)
{
fprintf(stderr, "%s: %s\n", pcString, nfc_strerror(pnd));
}
/** @ingroup error
* @brief Returns last error occured on a nfc_device
* @return Returns an integer that represents to libnfc's error code.
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*/
int
nfc_device_get_last_error(const nfc_device *pnd)
{
return pnd->last_error;
}
/* Special data accessors */
/** @ingroup data
* @brief Returns the device name
* @return Returns a string with the device name
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*/
const char *
nfc_device_get_name(nfc_device *pnd)
{
return pnd->name;
}
/** @ingroup data
* @brief Returns the device connection string
* @return Returns a string with the device connstring
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*/
const char *
nfc_device_get_connstring(nfc_device *pnd)
{
return pnd->connstring;
}
/** @ingroup data
* @brief Get supported modulations.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param mode \a nfc_mode.
* @param supported_mt pointer of \a nfc_modulation_type array.
*
*/
int
nfc_device_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt)
{
HAL(get_supported_modulation, pnd, mode, supported_mt);
}
/** @ingroup data
* @brief Get supported baud rates.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param mode \a nfc_mode.
* @param nmt \a nfc_modulation_type.
* @param supported_br pointer of \a nfc_baud_rate array.
*
*/
int
nfc_device_get_supported_baud_rate(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br)
{
HAL(get_supported_baud_rate, pnd, mode, nmt, supported_br);
}
/** @ingroup data
* @brief Validate combination of modulation and baud rate on the currently used device.
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param mode \a nfc_mode.
* @param nm \a nfc_modulation.
*
*/
static int
nfc_device_validate_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation *nm)
{
int res;
const nfc_modulation_type *nmt;
if ((res = nfc_device_get_supported_modulation(pnd, mode, &nmt)) < 0) {
return res;
}
for (int i = 0; nmt[i]; i++) {
if (nmt[i] == nm->nmt) {
const nfc_baud_rate *nbr;
if ((res = nfc_device_get_supported_baud_rate(pnd, mode, nmt[i], &nbr)) < 0) {
return res;
}
for (int j = 0; nbr[j]; j++) {
if (nbr[j] == nm->nbr)
return NFC_SUCCESS;
}
return NFC_EINVARG;
}
}
return NFC_EINVARG;
}
/* Misc. functions */
/** @ingroup misc
* @brief Returns the library version
* @return Returns a string with the library version
*
* @param pnd \a nfc_device struct pointer that represent currently used device
*/
const char *
nfc_version(void)
{
#ifdef GIT_REVISION
return GIT_REVISION;
#else
return PACKAGE_VERSION;
#endif // GIT_REVISION
}
/** @ingroup misc
* @brief Free buffer allocated by libnfc
*
* @param pointer on buffer that needs to be freed
*/
void
nfc_free(void *p)
{
free(p);
}
/** @ingroup misc
* @brief Print information about NFC device
* @return Upon successful return, this function returns the number of characters printed (excluding the null byte used to end output to strings), otherwise returns libnfc's error code (negative value)
* @param pnd \a nfc_device struct pointer that represent currently used device
* @param buf pointer where string will be allocated, then information printed
*
* @warning *buf must be freed using nfc_free()
*/
int
nfc_device_get_information_about(nfc_device *pnd, char **buf)
{
HAL(device_get_information_about, pnd, buf);
}
/** @ingroup string-converter
* @brief Convert \a nfc_baud_rate value to string
* @return Returns nfc baud rate
* @param \a nfc_baud_rate to convert
*/
const char *
str_nfc_baud_rate(const nfc_baud_rate nbr)
{
switch (nbr) {
case NBR_UNDEFINED:
return "undefined baud rate";
case NBR_106:
return "106 kbps";
case NBR_212:
return "212 kbps";
case NBR_424:
return "424 kbps";
case NBR_847:
return "847 kbps";
}
}
/** @ingroup string-converter
* @brief Convert \a nfc_modulation_type value to string
* @return Returns nfc modulation type
* @param \a nfc_modulation_type to convert
*/
const char *
str_nfc_modulation_type(const nfc_modulation_type nmt)
{
switch (nmt) {
case NMT_ISO14443A:
return "ISO/IEC 14443A";
case NMT_ISO14443B:
return "ISO/IEC 14443-4B";
case NMT_ISO14443BI:
return "ISO/IEC 14443-4B'";
case NMT_ISO14443B2CT:
return "ISO/IEC 14443-2B ASK CTx";
case NMT_ISO14443B2SR:
return "ISO/IEC 14443-2B ST SRx";
case NMT_FELICA:
return "FeliCa";
case NMT_JEWEL:
return "Innovision Jewel";
case NMT_DEP:
return "D.E.P.";
}
}
/** @ingroup string-converter
* @brief Convert \a nfc_modulation_type value to string
* @return Upon successful return, this function returns the number of characters printed (excluding the null byte used to end output to strings), otherwise returns libnfc's error code (negative value)
* @param nt \a nfc_target struct to print
* @param buf pointer where string will be allocated, then nfc target information printed
*
* @warning *buf must be freed using nfc_free()
*/
int
str_nfc_target(char **buf, const nfc_target *pnt, bool verbose)
{
*buf = malloc(4096);
if (! *buf)
return NFC_ESOFT;
(*buf)[0] = '\0';
snprint_nfc_target(*buf, 4096, pnt, verbose);
return strlen(*buf);
}
|
1060840728-lvgang
|
libnfc/nfc.c
|
C
|
lgpl
| 51,808
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file target-subr.c
* @brief Target-related subroutines. (ie. determine target type, print target, etc.)
*/
#ifndef _TARGET_SUBR_H_
#define _TARGET_SUBR_H_
int snprint_hex(char *dst, size_t size, const uint8_t *pbtData, const size_t szLen);
void snprint_nfc_iso14443a_info(char *dst, size_t size, const nfc_iso14443a_info *pnai, bool verbose);
void snprint_nfc_iso14443b_info(char *dst, size_t size, const nfc_iso14443b_info *pnbi, bool verbose);
void snprint_nfc_iso14443bi_info(char *dst, size_t size, const nfc_iso14443bi_info *pnii, bool verbose);
void snprint_nfc_iso14443b2sr_info(char *dst, size_t size, const nfc_iso14443b2sr_info *pnsi, bool verbose);
void snprint_nfc_iso14443b2ct_info(char *dst, size_t size, const nfc_iso14443b2ct_info *pnci, bool verbose);
void snprint_nfc_felica_info(char *dst, size_t size, const nfc_felica_info *pnfi, bool verbose);
void snprint_nfc_jewel_info(char *dst, size_t size, const nfc_jewel_info *pnji, bool verbose);
void snprint_nfc_dep_info(char *dst, size_t size, const nfc_dep_info *pndi, bool verbose);
void snprint_nfc_target(char *dst, size_t size, const nfc_target *pnt, bool verbose);
#endif
|
1060840728-lvgang
|
libnfc/target-subr.h
|
C
|
lgpl
| 2,271
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
* Copyright (C) 2013 Alex Lian
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#include "log-internal.h"
#include <stdio.h>
#include <stdarg.h>
void
log_vput_internal(const char *format, va_list args)
{
vfprintf(stderr, format, args);
}
void
log_put_internal(const char *format, ...)
{
va_list va;
va_start(va, format);
vfprintf(stderr, format, va);
va_end(va);
}
|
1060840728-lvgang
|
libnfc/log-internal.c
|
C
|
lgpl
| 1,417
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#include "log.h"
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdarg.h>
#include <fcntl.h>
const char *
log_priority_to_str(const int priority)
{
switch (priority) {
case NFC_LOG_PRIORITY_ERROR:
return "error";
case NFC_LOG_PRIORITY_INFO:
return "info";
case NFC_LOG_PRIORITY_DEBUG:
return "debug";
default:
break;
}
return "unknown";
}
#ifdef LOG
#include "log-internal.h"
void
log_init(const nfc_context *context)
{
#ifdef ENVVARS
char str[32];
sprintf(str, "%"PRIu32, context->log_level);
setenv("LIBNFC_LOG_LEVEL", str, 1);
#else
(void)context;
#endif
}
void
log_exit(void)
{
}
void
log_put(const uint8_t group, const char *category, const uint8_t priority, const char *format, ...)
{
char *env_log_level = NULL;
#ifdef ENVVARS
env_log_level = getenv("LIBNFC_LOG_LEVEL");
#endif
uint32_t log_level;
if (NULL == env_log_level) {
// LIBNFC_LOG_LEVEL is not set
#ifdef DEBUG
log_level = 3;
#else
log_level = 1;
#endif
} else {
log_level = atoi(env_log_level);
}
// printf("log_level = %"PRIu32" group = %"PRIu8" priority = %"PRIu8"\n", log_level, group, priority);
if (log_level) { // If log is not disabled by log_level=none
if (((log_level & 0x00000003) >= priority) || // Global log level
(((log_level >> (group * 2)) & 0x00000003) >= priority)) { // Group log level
va_list va;
va_start(va, format);
log_put_internal("%s\t%s\t", log_priority_to_str(priority), category);
log_vput_internal(format, va);
log_put_internal("\n");
va_end(va);
}
}
}
#endif // LOG
|
1060840728-lvgang
|
libnfc/log.c
|
C
|
lgpl
| 2,767
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file nfc-emulation.c
* @brief Provide a small API to ease emulation in libnfc
*/
#include <nfc/nfc.h>
#include <nfc/nfc-emulation.h>
#include "iso7816.h"
/** @ingroup emulation
* @brief Emulate a target
* @return Returns 0 on success, otherwise returns libnfc's error code (negative value).
*
* @param pnd \a nfc_device struct pointer that represents currently used device
* @param emulator \nfc_emulator struct point that handles input/output functions
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_emulate_target(nfc_device *pnd, struct nfc_emulator *emulator, const int timeout)
{
uint8_t abtRx[ISO7816_SHORT_R_APDU_MAX_LEN];
uint8_t abtTx[ISO7816_SHORT_C_APDU_MAX_LEN];
int res;
if ((res = nfc_target_init(pnd, emulator->target, abtRx, sizeof(abtRx), timeout)) < 0) {
return res;
}
size_t szRx = res;
int io_res = res;
while (io_res >= 0) {
io_res = emulator->state_machine->io(emulator, abtRx, szRx, abtTx, sizeof(abtTx));
if (io_res > 0) {
if ((res = nfc_target_send_bytes(pnd, abtTx, io_res, timeout)) < 0) {
return res;
}
}
if (io_res >= 0) {
if ((res = nfc_target_receive_bytes(pnd, abtRx, sizeof(abtRx), timeout)) < 0) {
return res;
}
szRx = res;
}
}
return io_res;
}
|
1060840728-lvgang
|
libnfc/nfc-emulation.c
|
C
|
lgpl
| 2,513
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file nfc-device.c
* @brief Provide internal function to manipulate nfc_device type
*/
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "nfc-internal.h"
nfc_device *
nfc_device_new(const nfc_context *context, const nfc_connstring connstring)
{
nfc_device *res = malloc(sizeof(*res));
if (!res) {
return NULL;
}
// Store associated context
res->context = context;
// Variables initiatialization
// Note: Actually, these initialization will be overwritten while the device
// will be setup. Putting them to _false_ while the default is _true_ ensure we
// send the command to the chip
res->bCrc = false;
res->bPar = false;
res->bEasyFraming = false;
res->bInfiniteSelect = false;
res->bAutoIso14443_4 = false;
res->last_error = 0;
memcpy(res->connstring, connstring, sizeof(res->connstring));
res->driver_data = NULL;
res->chip_data = NULL;
return res;
}
void
nfc_device_free(nfc_device *dev)
{
if (dev) {
free(dev->driver_data);
free(dev);
}
}
|
1060840728-lvgang
|
libnfc/nfc-device.c
|
C
|
lgpl
| 2,170
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file iso7816.h
* @brief Defines some macros extracted for ISO/IEC 7816-4
*/
#ifndef __LIBNFC_ISO7816_H__
#define __LIBNFC_ISO7816_H__
#define ISO7816_C_APDU_COMMAND_HEADER_LEN 4
#define ISO7816_SHORT_APDU_MAX_DATA_LEN 256
#define ISO7816_SHORT_C_APDU_MAX_OVERHEAD 2
#define ISO7816_SHORT_R_APDU_RESPONSE_TRAILER_LEN 2
#define ISO7816_SHORT_C_APDU_MAX_LEN (ISO7816_C_APDU_COMMAND_HEADER_LEN + ISO7816_SHORT_APDU_MAX_DATA_LEN + ISO7816_SHORT_C_APDU_MAX_OVERHEAD)
#define ISO7816_SHORT_R_APDU_MAX_LEN (ISO7816_SHORT_APDU_MAX_DATA_LEN + ISO7816_SHORT_R_APDU_RESPONSE_TRAILER_LEN)
#endif /* !__LIBNFC_ISO7816_H__ */
|
1060840728-lvgang
|
libnfc/iso7816.h
|
C
|
lgpl
| 1,704
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*
* @file mirror-subr.h
* @brief Mirror bytes
*/
#ifndef _LIBNFC_MIRROR_SUBR_H_
# define _LIBNFC_MIRROR_SUBR_H_
# include <stdint.h>
# include <nfc/nfc-types.h>
uint8_t mirror(uint8_t bt);
uint32_t mirror32(uint32_t ui32Bits);
uint64_t mirror64(uint64_t ui64Bits);
void mirror_uint8_ts(uint8_t *pbts, size_t szLen);
#endif // _LIBNFC_MIRROR_SUBR_H_
|
1060840728-lvgang
|
libnfc/mirror-subr.h
|
C
|
lgpl
| 1,446
|
SUBDIRS = chips buses drivers .
# set the include path found by configure
AM_CPPFLAGS = $(all_includes) $(LIBNFC_CFLAGS) -DSYSCONFDIR='"$(sysconfdir)"'
lib_LTLIBRARIES = libnfc.la
libnfc_la_SOURCES = \
conf.c \
iso14443-subr.c \
mirror-subr.c \
nfc.c \
nfc-device.c \
nfc-emulation.c \
nfc-internal.c \
target-subr.c \
conf.h \
drivers.h \
iso7816.h \
log.h \
log-internal.h \
mirror-subr.h \
nfc-internal.h \
target-subr.h
libnfc_la_LDFLAGS = -no-undefined -version-info 5:1:0 -export-symbols-regex '^nfc_|^iso14443a_|^str_nfc_|pn53x_transceive|pn532_SAMConfiguration|pn53x_read_register|pn53x_write_register'
libnfc_la_CFLAGS = @DRIVERS_CFLAGS@
libnfc_la_LIBADD = \
$(top_builddir)/libnfc/chips/libnfcchips.la \
$(top_builddir)/libnfc/buses/libnfcbuses.la \
$(top_builddir)/libnfc/drivers/libnfcdrivers.la
if PCSC_ENABLED
libnfc_la_CFLAGS += @libpcsclite_CFLAGS@ -DHAVE_PCSC
libnfc_la_LIBADD += @libpcsclite_LIBS@
endif
if LIBUSB_ENABLED
libnfc_la_CFLAGS += @libusb_CFLAGS@ -DHAVE_LIBUSB
libnfc_la_LIBADD += @libusb_LIBS@
endif
if WITH_LOG
libnfc_la_SOURCES += log.c log-internal.c
endif
EXTRA_DIST = \
CMakeLists.txt
|
1060840728-lvgang
|
libnfc/Makefile.am
|
Makefile
|
lgpl
| 1,238
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file acr122_usb.c
* @brief Driver for ACR122 using direct USB (without PCSC)
*/
/*
* This implementation was written based on information provided by the
* following documents:
*
* Smart Card CCID
* Specification for Integrated Circuit(s) Cards Interface Devices
* Revision 1.1
* April 22rd, 2005
* http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_CCID_Rev110.pdf
*
* ACR122U NFC Reader
* Application Programming Interface
* Revision 1.2
* http://acs.com.hk/drivers/eng/API_ACR122U.pdf
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
/*
Thanks to d18c7db and Okko for example code
*/
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <sys/select.h>
#include <errno.h>
#include <string.h>
#include <nfc/nfc.h>
#include "nfc-internal.h"
#include "buses/usbbus.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "drivers/acr122_usb.h"
#define ACR122_USB_DRIVER_NAME "acr122_usb"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
#define LOG_CATEGORY "libnfc.driver.acr122_usb"
#define USB_INFINITE_TIMEOUT 0
#define DRIVER_DATA(pnd) ((struct acr122_usb_data*)(pnd->driver_data))
/*
USB activity trace for PN533, ACR122 and Touchatag
--------------------------------------------------------------------
PN533
0000ff02fe d402 2a00
0000ff00ff00
ACK
0000ff06fa d50333020707 e500
--------------------------------------------------------------------
Acr122U PICC pseudo-APDU through PCSC Escape mechanism:
6b07000000000a000000 ff00000002 d402
PC_to_RDR_Escape APDU
Len..... ClInP1P2Lc
Slot=0 pseudo-APDU DirectTransmit
Seq=0a
RFU=000000
8308000000000a028100 d50332010407 9000
RDR_to_PC_Escape SW: OK
Len.....
Slot=0
Seq=0a
Slot Status=02 ??
Slot Error=81 ??
RFU=00
--------------------------------------------------------------------
Touchatag (Acr122U SAM) pseudo-APDU mechanism:
6f07000000000e000000 ff00000002 d402
PC_to_RDR_XfrBlock APDU
Len..... ClInP1P2Lc
Slot=0 pseudo-APDU DirectTransmit
Seq=0e
BWI=00
RFU=0000
8002000000000e000000 6108
RDR_to_PC_DataBlock SW: more data: 8 bytes
Slot=0
Seq=0e
Slot Status=00
Slot Error=00
RFU=00
6f05000000000f000000 ffc0000008
pseudo-ADPU GetResponse
8008000000000f000000 d50332010407 9000
SW: OK
--------------------------------------------------------------------
Apparently Acr122U PICC can also work without Escape (even if there is no card):
6f070000000000000000 ff00000002 d402
PC_to_RDR_XfrBlock APDU
Len..... ClInP1P2Lc
Slot=0 pseudo-APDU DirectTransmit
Seq=00
BWI=00
RFU=0000
80080000000000008100 d50332010407 9000
SW: OK
*/
#pragma pack(1)
struct ccid_header {
uint8_t bMessageType;
uint32_t dwLength;
uint8_t bSlot;
uint8_t bSeq;
uint8_t bMessageSpecific[3];
};
struct apdu_header {
uint8_t bClass;
uint8_t bIns;
uint8_t bP1;
uint8_t bP2;
uint8_t bLen;
};
struct acr122_usb_tama_frame {
struct ccid_header ccid_header;
struct apdu_header apdu_header;
uint8_t tama_header;
uint8_t tama_payload[254]; // According to ACR122U manual: Pseudo APDUs (Section 6.0), Lc is 1-byte long (Data In: 255-bytes).
};
struct acr122_usb_apdu_frame {
struct ccid_header ccid_header;
struct apdu_header apdu_header;
uint8_t apdu_payload[255]; // APDU Lc is 1-byte long
};
#pragma pack()
// Internal data struct
struct acr122_usb_data {
usb_dev_handle *pudh;
uint32_t uiEndPointIn;
uint32_t uiEndPointOut;
uint32_t uiMaxPacketSize;
volatile bool abort_flag;
// Keep some buffers to reduce memcpy() usage
struct acr122_usb_tama_frame tama_frame;
struct acr122_usb_apdu_frame apdu_frame;
};
// CCID Bulk-Out messages type
#define PC_to_RDR_IccPowerOn 0x62
#define PC_to_RDR_XfrBlock 0x6f
#define RDR_to_PC_DataBlock 0x80
// ISO 7816-4
#define SW1_More_Data_Available 0x61
#define SW1_Warning_with_NV_changed 0x63
#define PN53x_Specific_Application_Level_Error_Code 0x7f
// This frame template is copied at init time
// Its designed for TAMA sending but is also used for simple ADPU frame: acr122_build_frame_from_apdu() will overwrite needed bytes
const uint8_t acr122_usb_frame_template[] = {
PC_to_RDR_XfrBlock, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // CCID header
0xff, 0x00, 0x00, 0x00, 0x00, // ADPU header
0xd4, // PN532 direction
};
// APDUs instructions
#define APDU_GetAdditionnalData 0xc0
// Internal io struct
const struct pn53x_io acr122_usb_io;
// Prototypes
static int acr122_usb_init(nfc_device *pnd);
static int acr122_usb_ack(nfc_device *pnd);
static int acr122_usb_send_apdu(nfc_device *pnd,
const uint8_t ins, const uint8_t p1, const uint8_t p2, const uint8_t *const data, size_t data_len, const uint8_t le,
uint8_t *out, const size_t out_size);
static int
acr122_usb_bulk_read(struct acr122_usb_data *data, uint8_t abtRx[], const size_t szRx, const int timeout)
{
int res = usb_bulk_read(data->pudh, data->uiEndPointIn, (char *) abtRx, szRx, timeout);
if (res > 0) {
LOG_HEX(NFC_LOG_GROUP_COM, "RX", abtRx, res);
} else if (res < 0) {
if (res != -USB_TIMEDOUT) {
res = NFC_EIO;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to read from USB (%s)", _usb_strerror(res));
} else {
res = NFC_ETIMEOUT;
}
}
return res;
}
static int
acr122_usb_bulk_write(struct acr122_usb_data *data, uint8_t abtTx[], const size_t szTx, const int timeout)
{
LOG_HEX(NFC_LOG_GROUP_COM, "TX", abtTx, szTx);
int res = usb_bulk_write(data->pudh, data->uiEndPointOut, (char *) abtTx, szTx, timeout);
if (res > 0) {
// HACK This little hack is a well know problem of USB, see http://www.libusb.org/ticket/6 for more details
if ((res % data->uiMaxPacketSize) == 0) {
usb_bulk_write(data->pudh, data->uiEndPointOut, "\0", 0, timeout);
}
} else if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to write to USB (%s)", _usb_strerror(res));
if (res == -USB_TIMEDOUT) {
res = NFC_ETIMEOUT;
} else {
res = NFC_EIO;
}
}
return res;
}
struct acr122_usb_supported_device {
uint16_t vendor_id;
uint16_t product_id;
const char *name;
};
const struct acr122_usb_supported_device acr122_usb_supported_devices[] = {
{ 0x072F, 0x2200, "ACS ACR122" },
{ 0x072F, 0x90CC, "Touchatag" },
};
// Find transfer endpoints for bulk transfers
static void
acr122_usb_get_end_points(struct usb_device *dev, struct acr122_usb_data *data)
{
uint32_t uiIndex;
uint32_t uiEndPoint;
struct usb_interface_descriptor *puid = dev->config->interface->altsetting;
// 3 Endpoints maximum: Interrupt In, Bulk In, Bulk Out
for (uiIndex = 0; uiIndex < puid->bNumEndpoints; uiIndex++) {
// Only accept bulk transfer endpoints (ignore interrupt endpoints)
if (puid->endpoint[uiIndex].bmAttributes != USB_ENDPOINT_TYPE_BULK)
continue;
// Copy the endpoint to a local var, makes it more readable code
uiEndPoint = puid->endpoint[uiIndex].bEndpointAddress;
// Test if we dealing with a bulk IN endpoint
if ((uiEndPoint & USB_ENDPOINT_DIR_MASK) == USB_ENDPOINT_IN) {
data->uiEndPointIn = uiEndPoint;
data->uiMaxPacketSize = puid->endpoint[uiIndex].wMaxPacketSize;
}
// Test if we dealing with a bulk OUT endpoint
if ((uiEndPoint & USB_ENDPOINT_DIR_MASK) == USB_ENDPOINT_OUT) {
data->uiEndPointOut = uiEndPoint;
data->uiMaxPacketSize = puid->endpoint[uiIndex].wMaxPacketSize;
}
}
}
static size_t
acr122_usb_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
(void)context;
usb_prepare();
size_t device_found = 0;
uint32_t uiBusIndex = 0;
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev; dev = dev->next, uiBusIndex++) {
for (size_t n = 0; n < sizeof(acr122_usb_supported_devices) / sizeof(struct acr122_usb_supported_device); n++) {
if ((acr122_usb_supported_devices[n].vendor_id == dev->descriptor.idVendor) &&
(acr122_usb_supported_devices[n].product_id == dev->descriptor.idProduct)) {
// Make sure there are 2 endpoints available
// with libusb-win32 we got some null pointers so be robust before looking at endpoints:
if (dev->config == NULL || dev->config->interface == NULL || dev->config->interface->altsetting == NULL) {
// Nope, we maybe want the next one, let's try to find another
continue;
}
if (dev->config->interface->altsetting->bNumEndpoints < 2) {
// Nope, we maybe want the next one, let's try to find another
continue;
}
usb_dev_handle *udev = usb_open(dev);
if (udev == NULL)
continue;
// Set configuration
// acr122_usb_get_usb_device_name (dev, udev, pnddDevices[device_found].acDevice, sizeof (pnddDevices[device_found].acDevice));
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "device found: Bus %s Device %s Name %s", bus->dirname, dev->filename, acr122_usb_supported_devices[n].name);
usb_close(udev);
snprintf(connstrings[device_found], sizeof(nfc_connstring), "%s:%s:%s", ACR122_USB_DRIVER_NAME, bus->dirname, dev->filename);
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found == connstrings_len) {
return device_found;
}
}
}
}
}
return device_found;
}
struct acr122_usb_descriptor {
char *dirname;
char *filename;
};
static bool
acr122_usb_get_usb_device_name(struct usb_device *dev, usb_dev_handle *udev, char *buffer, size_t len)
{
*buffer = '\0';
if (dev->descriptor.iManufacturer || dev->descriptor.iProduct) {
if (udev) {
usb_get_string_simple(udev, dev->descriptor.iManufacturer, buffer, len);
if (strlen(buffer) > 0)
strcpy(buffer + strlen(buffer), " / ");
usb_get_string_simple(udev, dev->descriptor.iProduct, buffer + strlen(buffer), len - strlen(buffer));
}
}
if (!*buffer) {
for (size_t n = 0; n < sizeof(acr122_usb_supported_devices) / sizeof(struct acr122_usb_supported_device); n++) {
if ((acr122_usb_supported_devices[n].vendor_id == dev->descriptor.idVendor) &&
(acr122_usb_supported_devices[n].product_id == dev->descriptor.idProduct)) {
strncpy(buffer, acr122_usb_supported_devices[n].name, len);
buffer[len - 1] = '\0';
return true;
}
}
}
return false;
}
static nfc_device *
acr122_usb_open(const nfc_context *context, const nfc_connstring connstring)
{
nfc_device *pnd = NULL;
struct acr122_usb_descriptor desc = { NULL, NULL };
int connstring_decode_level = connstring_decode(connstring, ACR122_USB_DRIVER_NAME, "usb", &desc.dirname, &desc.filename);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%d element(s) have been decoded from \"%s\"", connstring_decode_level, connstring);
if (connstring_decode_level < 1) {
goto free_mem;
}
struct acr122_usb_data data = {
.pudh = NULL,
.uiEndPointIn = 0,
.uiEndPointOut = 0,
};
struct usb_bus *bus;
struct usb_device *dev;
usb_prepare();
for (bus = usb_get_busses(); bus; bus = bus->next) {
if (connstring_decode_level > 1) {
// A specific bus have been specified
if (0 != strcmp(bus->dirname, desc.dirname))
continue;
}
for (dev = bus->devices; dev; dev = dev->next) {
if (connstring_decode_level > 2) {
// A specific dev have been specified
if (0 != strcmp(dev->filename, desc.filename))
continue;
}
// Open the USB device
if ((data.pudh = usb_open(dev)) == NULL)
continue;
// Reset device
usb_reset(data.pudh);
// Retrieve end points
acr122_usb_get_end_points(dev, &data);
// Claim interface
int res = usb_claim_interface(data.pudh, 0);
if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to claim USB interface (%s)", _usb_strerror(res));
usb_close(data.pudh);
// we failed to use the specified device
goto free_mem;
}
res = usb_set_altinterface(data.pudh, 0);
if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to set alternate setting on USB interface (%s)", _usb_strerror(res));
usb_close(data.pudh);
// we failed to use the specified device
goto free_mem;
}
// Allocate memory for the device info and specification, fill it and return the info
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
goto error;
}
acr122_usb_get_usb_device_name(dev, data.pudh, pnd->name, sizeof(pnd->name));
pnd->driver_data = malloc(sizeof(struct acr122_usb_data));
if (!pnd->driver_data) {
perror("malloc");
goto error;
}
*DRIVER_DATA(pnd) = data;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &acr122_usb_io) == NULL) {
perror("malloc");
goto error;
}
memcpy(&(DRIVER_DATA(pnd)->tama_frame), acr122_usb_frame_template, sizeof(acr122_usb_frame_template));
memcpy(&(DRIVER_DATA(pnd)->apdu_frame), acr122_usb_frame_template, sizeof(acr122_usb_frame_template));
CHIP_DATA(pnd)->timer_correction = 46; // empirical tuning
pnd->driver = &acr122_usb_driver;
if (acr122_usb_init(pnd) < 0) {
usb_close(data.pudh);
goto error;
}
DRIVER_DATA(pnd)->abort_flag = false;
goto free_mem;
}
}
// We ran out of devices before the index required
goto free_mem;
error:
// Free allocated structure on error.
nfc_device_free(pnd);
pnd = NULL;
free_mem:
free(desc.dirname);
free(desc.filename);
return pnd;
}
static void
acr122_usb_close(nfc_device *pnd)
{
acr122_usb_ack(pnd);
pn53x_idle(pnd);
int res;
if ((res = usb_release_interface(DRIVER_DATA(pnd)->pudh, 0)) < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to release USB interface (%s)", _usb_strerror(res));
}
if ((res = usb_close(DRIVER_DATA(pnd)->pudh)) < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to close USB connection (%s)", _usb_strerror(res));
}
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
#if !defined(htole32)
uint32_t htole32(uint32_t u32);
uint32_t
htole32(uint32_t u32)
{
union {
uint8_t arr[4];
uint32_t u32;
} u;
for (int i = 0; i < 4; i++) {
u.arr[i] = (u32 & 0xff);
u32 >>= 8;
}
return u.u32;
}
#endif /* !defined(htole32) */
static int
acr122_build_frame_from_apdu(nfc_device *pnd, const uint8_t ins, const uint8_t p1, const uint8_t p2, const uint8_t *data, const size_t data_len, const uint8_t le)
{
if (data_len > sizeof(DRIVER_DATA(pnd)->apdu_frame.apdu_payload))
return NFC_EINVARG;
if ((data == NULL) && (data_len != 0))
return NFC_EINVARG;
DRIVER_DATA(pnd)->apdu_frame.ccid_header.dwLength = htole32(data_len + sizeof(struct apdu_header));
DRIVER_DATA(pnd)->apdu_frame.apdu_header.bIns = ins;
DRIVER_DATA(pnd)->apdu_frame.apdu_header.bP1 = p1;
DRIVER_DATA(pnd)->apdu_frame.apdu_header.bP2 = p2;
if (data) {
// bLen is Lc when data != NULL
DRIVER_DATA(pnd)->apdu_frame.apdu_header.bLen = data_len;
memcpy(DRIVER_DATA(pnd)->apdu_frame.apdu_payload, data, data_len);
} else {
// bLen is Le when no data.
DRIVER_DATA(pnd)->apdu_frame.apdu_header.bLen = le;
}
return (sizeof(struct ccid_header) + sizeof(struct apdu_header) + data_len);
}
static int
acr122_build_frame_from_tama(nfc_device *pnd, const uint8_t *tama, const size_t tama_len)
{
if (tama_len > sizeof(DRIVER_DATA(pnd)->tama_frame.tama_payload))
return NFC_EINVARG;
DRIVER_DATA(pnd)->tama_frame.ccid_header.dwLength = htole32(tama_len + sizeof(struct apdu_header) + 1);
DRIVER_DATA(pnd)->tama_frame.apdu_header.bLen = tama_len + 1;
memcpy(DRIVER_DATA(pnd)->tama_frame.tama_payload, tama, tama_len);
return (sizeof(struct ccid_header) + sizeof(struct apdu_header) + 1 + tama_len);
}
static int
acr122_usb_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, const int timeout)
{
int res;
if ((res = acr122_build_frame_from_tama(pnd, pbtData, szData)) < 0) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
if ((res = acr122_usb_bulk_write(DRIVER_DATA(pnd), (unsigned char *) & (DRIVER_DATA(pnd)->tama_frame), res, timeout)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
return NFC_SUCCESS;
}
#define USB_TIMEOUT_PER_PASS 200
static int
acr122_usb_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, const int timeout)
{
off_t offset = 0;
uint8_t abtRxBuf[255 + sizeof(struct ccid_header)];
int res;
/*
* If no timeout is specified but the command is blocking, force a 200ms (USB_TIMEOUT_PER_PASS)
* timeout to allow breaking the loop if the user wants to stop it.
*/
int usb_timeout;
int remaining_time = timeout;
read:
if (timeout == USB_INFINITE_TIMEOUT) {
usb_timeout = USB_TIMEOUT_PER_PASS;
} else {
// A user-provided timeout is set, we have to cut it in multiple chunk to be able to keep an nfc_abort_command() mecanism
remaining_time -= USB_TIMEOUT_PER_PASS;
if (remaining_time <= 0) {
pnd->last_error = NFC_ETIMEOUT;
return pnd->last_error;
} else {
usb_timeout = MIN(remaining_time, USB_TIMEOUT_PER_PASS);
}
}
res = acr122_usb_bulk_read(DRIVER_DATA(pnd), abtRxBuf, sizeof(abtRxBuf), usb_timeout);
uint8_t attempted_response = RDR_to_PC_DataBlock;
size_t len;
if (res == NFC_ETIMEOUT) {
if (DRIVER_DATA(pnd)->abort_flag) {
DRIVER_DATA(pnd)->abort_flag = false;
acr122_usb_ack(pnd);
pnd->last_error = NFC_EOPABORTED;
return pnd->last_error;
} else {
goto read;
}
}
if (res < 12) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Invalid RDR_to_PC_DataBlock frame");
// try to interrupt current device state
acr122_usb_ack(pnd);
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
if (abtRxBuf[offset] != attempted_response) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame header mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset++;
len = abtRxBuf[offset++];
if (!((len > 1) && (abtRxBuf[10] == 0xd5))) { // In case we didn't get an immediate answer:
if (len != 2) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Wrong reply");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
if (abtRxBuf[10] != SW1_More_Data_Available) {
if ((abtRxBuf[10] == SW1_Warning_with_NV_changed) && (abtRxBuf[11] == PN53x_Specific_Application_Level_Error_Code)) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "PN532 has detected an error at the application level");
} else if ((abtRxBuf[10] == SW1_Warning_with_NV_changed) && (abtRxBuf[11] == 0x00)) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "PN532 didn't reply");
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unexpected Status Word (SW1: %02x SW2: %02x)", abtRxBuf[10], abtRxBuf[11]);
}
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
res = acr122_usb_send_apdu(pnd, APDU_GetAdditionnalData, 0x00, 0x00, NULL, 0, abtRxBuf[11], abtRxBuf, sizeof(abtRxBuf));
if (res == NFC_ETIMEOUT) {
if (DRIVER_DATA(pnd)->abort_flag) {
DRIVER_DATA(pnd)->abort_flag = false;
acr122_usb_ack(pnd);
pnd->last_error = NFC_EOPABORTED;
return pnd->last_error;
} else {
goto read; // FIXME May cause some trouble on Touchatag, right ?
}
}
if (res < 12) {
// try to interrupt current device state
acr122_usb_ack(pnd);
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
}
offset = 0;
if (abtRxBuf[offset] != attempted_response) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame header mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset++;
// XXX In CCID specification, len is a 32-bits (dword), do we need to decode more than 1 byte ? (0-255 bytes for PN532 reply)
len = abtRxBuf[offset++];
if ((abtRxBuf[offset] != 0x00) && (abtRxBuf[offset + 1] != 0x00) && (abtRxBuf[offset + 2] != 0x00)) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Not implemented: only 1-byte length is supported, please report this bug with a full trace.");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 3;
if (len < 4) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Too small reply");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
len -= 4; // We skip 2 bytes for PN532 direction byte (D5) and command byte (CMD+1), then 2 bytes for APDU status (90 00).
if (len > szDataLen) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to receive data: buffer too small. (szDataLen: %" PRIuPTR ", len: %" PRIuPTR ")", szDataLen, len);
pnd->last_error = NFC_EOVFLOW;
return pnd->last_error;
}
// Skip CCID remaining bytes
offset += 2; // bSlot and bSeq are not used
offset += 2; // XXX bStatus and bError should maybe checked ?
offset += 1; // bRFU should be 0x00
// TFI + PD0 (CC+1)
if (abtRxBuf[offset] != 0xD5) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "TFI Mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 1;
if (abtRxBuf[offset] != CHIP_DATA(pnd)->last_command + 1) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 1;
memcpy(pbtData, abtRxBuf + offset, len);
return len;
}
int
acr122_usb_ack(nfc_device *pnd)
{
(void) pnd;
int res = 0;
uint8_t acr122_ack_frame[] = { GetFirmwareVersion }; // We can't send a PN532's ACK frame, so we use a normal command to cancel current command
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "ACR122 Abort");
if ((res = acr122_build_frame_from_tama(pnd, acr122_ack_frame, sizeof(acr122_ack_frame))) < 0)
return res;
if ((res = acr122_usb_bulk_write(DRIVER_DATA(pnd), (unsigned char *) & (DRIVER_DATA(pnd)->tama_frame), res, 1000)) < 0)
return res;
uint8_t abtRxBuf[255 + sizeof(struct ccid_header)];
res = acr122_usb_bulk_read(DRIVER_DATA(pnd), abtRxBuf, sizeof(abtRxBuf), 1000);
return res;
}
static int
acr122_usb_send_apdu(nfc_device *pnd,
const uint8_t ins, const uint8_t p1, const uint8_t p2, const uint8_t *const data, size_t data_len, const uint8_t le,
uint8_t *out, const size_t out_size)
{
int res;
size_t frame_len = acr122_build_frame_from_apdu(pnd, ins, p1, p2, data, data_len, le);
if ((res = acr122_usb_bulk_write(DRIVER_DATA(pnd), (unsigned char *) & (DRIVER_DATA(pnd)->apdu_frame), frame_len, 1000)) < 0)
return res;
if ((res = acr122_usb_bulk_read(DRIVER_DATA(pnd), out, out_size, 1000)) < 0)
return res;
return res;
}
int
acr122_usb_init(nfc_device *pnd)
{
int res = 0;
int i;
uint8_t abtRxBuf[255 + sizeof(struct ccid_header)];
/*
// See ACR122 manual: "Bi-Color LED and Buzzer Control" section
uint8_t acr122u_get_led_state_frame[] = {
0x6b, // CCID
0x09, // lenght of frame
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // padding
// frame:
0xff, // Class
0x00, // INS
0x40, // P1: Get LED state command
0x00, // P2: LED state control
0x04, // Lc
0x00, 0x00, 0x00, 0x00, // Blinking duration control
};
log_put (LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "ACR122 Get LED state");
if ((res = acr122_usb_bulk_write (DRIVER_DATA (pnd), (uint8_t *) acr122u_get_led_state_frame, sizeof (acr122u_get_led_state_frame), 1000)) < 0)
return res;
if ((res = acr122_usb_bulk_read (DRIVER_DATA (pnd), abtRxBuf, sizeof (abtRxBuf), 1000)) < 0)
return res;
*/
if ((res = pn53x_set_property_int(pnd, NP_TIMEOUT_COMMAND, 1000)) < 0)
return res;
// Power On ICC
uint8_t ccid_frame[] = {
PC_to_RDR_IccPowerOn, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00
};
if ((res = acr122_usb_bulk_write(DRIVER_DATA(pnd), ccid_frame, sizeof(struct ccid_header), 1000)) < 0)
return res;
if ((res = acr122_usb_bulk_read(DRIVER_DATA(pnd), abtRxBuf, sizeof(abtRxBuf), 1000)) < 0)
return res;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "ACR122 PICC Operating Parameters");
if ((res = acr122_usb_send_apdu(pnd, 0x00, 0x51, 0x00, NULL, 0, 0, abtRxBuf, sizeof(abtRxBuf))) < 0)
return res;
res = 0;
for (i = 0; i < 3; i++) {
if (res < 0)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "PN532 init failed, trying again...");
if ((res = pn53x_init(pnd)) >= 0)
break;
}
if (res < 0)
return res;
return NFC_SUCCESS;
}
static int
acr122_usb_abort_command(nfc_device *pnd)
{
DRIVER_DATA(pnd)->abort_flag = true;
return NFC_SUCCESS;
}
const struct pn53x_io acr122_usb_io = {
.send = acr122_usb_send,
.receive = acr122_usb_receive,
};
const struct nfc_driver acr122_usb_driver = {
.name = ACR122_USB_DRIVER_NAME,
.scan_type = NOT_INTRUSIVE,
.scan = acr122_usb_scan,
.open = acr122_usb_open,
.close = acr122_usb_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = NULL, // No secure-element support
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = acr122_usb_abort_command,
.idle = pn53x_idle,
/* Even if PN532, PowerDown is not recommended on those devices */
.powerdown = NULL,
};
|
1060840728-lvgang
|
libnfc/drivers/acr122_usb.c
|
C
|
lgpl
| 29,157
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file arygon.h
* @brief Driver for PN53x-equipped ARYGON device connected using UART
*/
#ifndef __NFC_DRIVER_ARYGON_H__
#define __NFC_DRIVER_ARYGON_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver arygon_driver;
#endif // ! __NFC_DRIVER_ARYGON_H__
|
1060840728-lvgang
|
libnfc/drivers/arygon.h
|
C
|
lgpl
| 1,356
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn532_uart.h
* @brief Driver for PN532 connected in UART (HSU)
*/
#ifndef __NFC_DRIVER_PN532_UART_H__
#define __NFC_DRIVER_PN532_UART_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver pn532_uart_driver;
#endif // ! __NFC_DRIVER_PN532_UART_H__
|
1060840728-lvgang
|
libnfc/drivers/pn532_uart.h
|
C
|
lgpl
| 1,356
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tarti?re
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
* Copyright (C) 2013 Laurent Latil
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn532_i2c.h
* @brief Driver for PN532 connected through I2C bus
*/
#ifndef __NFC_DRIVER_PN532_I2C_H__
#define __NFC_DRIVER_PN532_I2C_H__
#include <nfc/nfc-types.h>
/* Reference to the I2C driver structure */
extern const struct nfc_driver pn532_i2c_driver;
#endif // ! __NFC_DRIVER_I2C_H__
|
1060840728-lvgang
|
libnfc/drivers/pn532_i2c.h
|
C
|
lgpl
| 1,431
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
* Copyright (C) 2013 Evgeny Boger
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn532_spi.c
* @brief PN532 driver using SPI bus
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "pn532_spi.h"
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <nfc/nfc.h>
#include "drivers.h"
#include "nfc-internal.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "spi.h"
#define PN532_SPI_DEFAULT_SPEED 1000000 // 1 MHz
#define PN532_SPI_DRIVER_NAME "pn532_spi"
#define PN532_SPI_MODE SPI_MODE_0
#define LOG_CATEGORY "libnfc.driver.pn532_spi"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
#ifndef _WIN32
// Needed by sleep() under Unix
# include <unistd.h>
# include <time.h>
# define msleep(x) do { \
struct timespec xsleep; \
xsleep.tv_sec = x / 1000; \
xsleep.tv_nsec = (x - xsleep.tv_sec * 1000) * 1000 * 1000; \
nanosleep(&xsleep, NULL); \
} while (0)
#else
// Needed by Sleep() under Windows
# include <winbase.h>
# define msleep Sleep
#endif
// Internal data structs
const struct pn53x_io pn532_spi_io;
struct pn532_spi_data {
spi_port port;
volatile bool abort_flag;
};
static const uint8_t pn532_spi_cmd_dataread = 0x03;
static const uint8_t pn532_spi_cmd_datawrite = 0x01;
// Prototypes
int pn532_spi_ack(nfc_device *pnd);
int pn532_spi_wakeup(nfc_device *pnd);
#define DRIVER_DATA(pnd) ((struct pn532_spi_data*)(pnd->driver_data))
static size_t
pn532_spi_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
size_t device_found = 0;
spi_port sp;
char **acPorts = spi_list_ports();
const char *acPort;
int iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
sp = spi_open(acPort);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Trying to find PN532 device on SPI port: %s at %d Hz.", acPort, PN532_SPI_DEFAULT_SPEED);
if ((sp != INVALID_SPI_PORT) && (sp != CLAIMED_SPI_PORT)) {
// Serial port claimed but we need to check if a PN532_SPI is opened.
spi_set_speed(sp, PN532_SPI_DEFAULT_SPEED);
spi_set_mode(sp, PN532_SPI_MODE);
nfc_connstring connstring;
snprintf(connstring, sizeof(nfc_connstring), "%s:%s:%"PRIu32, PN532_SPI_DRIVER_NAME, acPort, PN532_SPI_DEFAULT_SPEED);
nfc_device *pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
spi_close(sp);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
pnd->driver = &pn532_spi_driver;
pnd->driver_data = malloc(sizeof(struct pn532_spi_data));
if (!pnd->driver_data) {
perror("malloc");
spi_close(sp);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
DRIVER_DATA(pnd)->port = sp;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn532_spi_io) == NULL) {
perror("malloc");
spi_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
// SAMConfiguration command if needed to wakeup the chip and pn53x_SAMConfiguration check if the chip is a PN532
CHIP_DATA(pnd)->type = PN532;
// This device starts in LowVBat power mode
CHIP_DATA(pnd)->power_mode = LOWVBAT;
DRIVER_DATA(pnd)->abort_flag = false;
// Check communication using "Diagnose" command, with "Communication test" (0x00)
int res = pn53x_check_communication(pnd);
spi_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
if (res < 0) {
continue;
}
memcpy(connstrings[device_found], connstring, sizeof(nfc_connstring));
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found >= connstrings_len)
break;
}
}
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return device_found;
}
struct pn532_spi_descriptor {
char *port;
uint32_t speed;
};
static void
pn532_spi_close(nfc_device *pnd)
{
pn53x_idle(pnd);
// Release SPI port
spi_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
static nfc_device *
pn532_spi_open(const nfc_context *context, const nfc_connstring connstring)
{
struct pn532_spi_descriptor ndd;
char *speed_s;
int connstring_decode_level = connstring_decode(connstring, PN532_SPI_DRIVER_NAME, NULL, &ndd.port, &speed_s);
if (connstring_decode_level == 3) {
ndd.speed = 0;
if (sscanf(speed_s, "%10"PRIu32, &ndd.speed) != 1) {
// speed_s is not a number
free(ndd.port);
free(speed_s);
return NULL;
}
free(speed_s);
}
if (connstring_decode_level < 2) {
return NULL;
}
if (connstring_decode_level < 3) {
ndd.speed = PN532_SPI_DEFAULT_SPEED;
}
spi_port sp;
nfc_device *pnd = NULL;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Attempt to open: %s at %d Hz.", ndd.port, ndd.speed);
sp = spi_open(ndd.port);
if (sp == INVALID_SPI_PORT)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Invalid SPI port: %s", ndd.port);
if (sp == CLAIMED_SPI_PORT)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "SPI port already claimed: %s", ndd.port);
if ((sp == CLAIMED_SPI_PORT) || (sp == INVALID_SPI_PORT)) {
free(ndd.port);
return NULL;
}
spi_set_speed(sp, ndd.speed);
spi_set_mode(sp, PN532_SPI_MODE);
// We have a connection
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
free(ndd.port);
spi_close(sp);
return NULL;
}
snprintf(pnd->name, sizeof(pnd->name), "%s:%s", PN532_SPI_DRIVER_NAME, ndd.port);
free(ndd.port);
pnd->driver_data = malloc(sizeof(struct pn532_spi_data));
if (!pnd->driver_data) {
perror("malloc");
spi_close(sp);
nfc_device_free(pnd);
return NULL;
}
DRIVER_DATA(pnd)->port = sp;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn532_spi_io) == NULL) {
perror("malloc");
spi_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
return NULL;
}
// SAMConfiguration command if needed to wakeup the chip and pn53x_SAMConfiguration check if the chip is a PN532
CHIP_DATA(pnd)->type = PN532;
// This device starts in LowVBat mode
CHIP_DATA(pnd)->power_mode = LOWVBAT;
// empirical tuning
CHIP_DATA(pnd)->timer_correction = 48;
pnd->driver = &pn532_spi_driver;
DRIVER_DATA(pnd)->abort_flag = false;
// Check communication using "Diagnose" command, with "Communication test" (0x00)
if (pn53x_check_communication(pnd) < 0) {
nfc_perror(pnd, "pn53x_check_communication");
pn532_spi_close(pnd);
return NULL;
}
pn53x_init(pnd);
return pnd;
}
static int
pn532_spi_read_spi_status(nfc_device *pnd)
{
static const uint8_t pn532_spi_statread_cmd = 0x02;
uint8_t spi_status = 0;
int res = spi_send_receive(DRIVER_DATA(pnd)->port, &pn532_spi_statread_cmd, 1, &spi_status, 1, true);
if (res != NFC_SUCCESS) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "Unable to read SPI status");
return res;
}
return spi_status;
}
int
pn532_spi_wakeup(nfc_device *pnd)
{
/* SPI wakeup is basically activating chipselect for several ms.
* To do so, we are sending harmless command at very low speed */
int res;
const uint32_t prev_port_speed = spi_get_speed(DRIVER_DATA(pnd)->port);
// Try to get byte from the SPI line. If PN532 is powered down, the byte will be 0xff (MISO line is high)
uint8_t spi_byte = 0;
res = spi_receive(DRIVER_DATA(pnd)->port, &spi_byte, 1, true);
if (res != NFC_SUCCESS) {
return res;
}
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Got %x byte from SPI line before wakeup", spi_byte);
CHIP_DATA(pnd)->power_mode = NORMAL; // PN532 will be awake soon
msleep(1);
if (spi_byte == 0xff) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "Wakeup is needed");
spi_set_speed(DRIVER_DATA(pnd)->port, 5000); // set slow speed
res = pn532_SAMConfiguration(pnd, PSM_NORMAL, 1000); // wakeup by sending SAMConfiguration, which works just fine
spi_set_speed(DRIVER_DATA(pnd)->port, prev_port_speed);
}
return res;
}
#define PN532_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
static int
pn532_spi_wait_for_data(nfc_device *pnd, int timeout)
{
static const uint8_t pn532_spi_ready = 0x01;
static const int pn532_spi_poll_interval = 10; //ms
int timer = 0;
int ret;
while ((ret = pn532_spi_read_spi_status(pnd)) != pn532_spi_ready) {
if (ret < 0) {
return ret;
}
if (DRIVER_DATA(pnd)->abort_flag) {
DRIVER_DATA(pnd)->abort_flag = false;
return NFC_EOPABORTED;
}
if (timeout > 0) {
timer += pn532_spi_poll_interval;
if (timer > timeout) {
return NFC_ETIMEOUT;
}
msleep(pn532_spi_poll_interval);
}
}
return NFC_SUCCESS;
}
static int
pn532_spi_receive_next_chunk(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen)
{
// According to datasheet, the entire read operation should be done at once
// However, it seems impossible to do since the length of the frame is stored in the frame
// itself and it's impossible to manually set CS to low between two read operations
// It's possible to read the response frame in a series of read operations, provided
// each read operation is preceded by SPI_DATAREAD byte from the host.
// Unfortunately, the PN532 sends first byte of the second and successive response chunks
// at the same time as host sends SPI_DATAREAD byte
// Many hardware SPI implementations are half-duplex, so it's became impossible to read this
// first response byte
// The following hack is used here: we first try to receive data from PN532 without SPI_DATAREAD
// and then begin full-featured read operation
// The PN532 does not shift the internal register on the receive operation, which allows us to read the whole response
// The example transfer log is as follows:
// CS ..._/---\___________________________/---\________/------\_____________/-----\_________/---\____________/---...
// MOSI (host=>pn532) ... 0x03 0x00 0x00 0x00 0x00 0x00 0x03 0x00 0x00 0x03 0x00
// MISO (pn532<=host) ... 0x01 0x00 0xff 0x02 0xfe 0xd5 0xd5 0x15 0x16 0x16 0x00
// linux send/receive s r r r r r s r r s r
// |<-- data -->| |<-data->| |<-data->| |<-data->| |<-data->|
// |<-- first chunk -->| |<-- second chunk -->| |<-- third chunk -->|
// The response frame is 0x00 0xff 0x02 0xfe 0xd5 0x15 0x16 0x00
int res = spi_receive(DRIVER_DATA(pnd)->port, pbtData, 1, true);
if (res != NFC_SUCCESS) {
return res;
}
res = spi_send_receive(DRIVER_DATA(pnd)->port, &pn532_spi_cmd_dataread, 1, pbtData + 1, szDataLen - 1, true);
return res;
}
static int
pn532_spi_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
uint8_t abtRxBuf[5];
size_t len;
pnd->last_error = pn532_spi_wait_for_data(pnd, timeout);
if (NFC_EOPABORTED == pnd->last_error) {
return pn532_spi_ack(pnd);
}
if (pnd->last_error != NFC_SUCCESS) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to wait for SPI data. (RX)");
goto error;
}
pnd->last_error = spi_send_receive(DRIVER_DATA(pnd)->port, &pn532_spi_cmd_dataread, 1, abtRxBuf , 4, true);
if (pnd->last_error < 0) {
goto error;
}
const uint8_t pn53x_long_preamble[3] = { 0x00, 0x00, 0xff };
if (0 == (memcmp(abtRxBuf, pn53x_long_preamble, 3))) {
// long preamble
// omit first byte
for (size_t i = 0; i < 3; ++i) {
abtRxBuf[i] = abtRxBuf[i + 1];
}
// need one more byte
pnd->last_error = pn532_spi_receive_next_chunk(pnd, abtRxBuf + 3, 1);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive one more byte for long preamble frame. (RX)");
goto error;
}
}
const uint8_t pn53x_preamble[2] = { 0x00, 0xff };
if (0 != (memcmp(abtRxBuf, pn53x_preamble, 2))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", " preamble+start code mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if ((0x01 == abtRxBuf[2]) && (0xff == abtRxBuf[3])) {
// Error frame
pn532_spi_receive_next_chunk(pnd, abtRxBuf, 3);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Application level error detected");
pnd->last_error = NFC_EIO;
goto error;
} else if ((0xff == abtRxBuf[2]) && (0xff == abtRxBuf[3])) {
// Extended frame
pnd->last_error = pn532_spi_receive_next_chunk(pnd, abtRxBuf, 3);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
// (abtRxBuf[0] << 8) + abtRxBuf[1] (LEN) include TFI + (CC+1)
len = (abtRxBuf[0] << 8) + abtRxBuf[1] - 2;
if (((abtRxBuf[0] + abtRxBuf[1] + abtRxBuf[2]) % 256) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
} else {
// Normal frame
if (256 != (abtRxBuf[2] + abtRxBuf[3])) {
// TODO: Retry
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
// abtRxBuf[3] (LEN) include TFI + (CC+1)
len = abtRxBuf[2] - 2;
}
if (len > szDataLen) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to receive data: buffer too small. (szDataLen: %zu, len: %zu)", szDataLen, len);
pnd->last_error = NFC_EIO;
goto error;
}
// TFI + PD0 (CC+1)
pnd->last_error = pn532_spi_receive_next_chunk(pnd, abtRxBuf, 2);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
if (abtRxBuf[0] != 0xD5) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "TFI Mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if (abtRxBuf[1] != CHIP_DATA(pnd)->last_command + 1) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO;
goto error;
}
if (len) {
pnd->last_error = pn532_spi_receive_next_chunk(pnd, pbtData, len);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
}
pnd->last_error = pn532_spi_receive_next_chunk(pnd, abtRxBuf, 2);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
uint8_t btDCS = (256 - 0xD5);
btDCS -= CHIP_DATA(pnd)->last_command + 1;
for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos];
}
if (btDCS != abtRxBuf[0]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Data checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if (0x00 != abtRxBuf[1]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame postamble mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
// The PN53x command is done and we successfully received the reply
return len;
error:
return pnd->last_error;
}
static int
pn532_spi_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
int res = 0;
switch (CHIP_DATA(pnd)->power_mode) {
case LOWVBAT: {
/** PN532C106 wakeup. */
if ((res = pn532_spi_wakeup(pnd)) < 0) {
return res;
}
// According to PN532 application note, C106 appendix: to go out Low Vbat mode and enter in normal mode we need to send a SAMConfiguration command
if ((res = pn532_SAMConfiguration(pnd, PSM_NORMAL, 1000)) < 0) {
return res;
}
}
break;
case POWERDOWN: {
if ((res = pn532_spi_wakeup(pnd)) < 0) {
return res;
}
}
break;
case NORMAL:
// Nothing to do :)
break;
};
uint8_t abtFrame[PN532_BUFFER_LEN + 1] = { pn532_spi_cmd_datawrite, 0x00, 0x00, 0xff }; // SPI data transfer starts with DATAWRITE (0x01) byte, Every packet must start with "00 00 ff"
size_t szFrame = 0;
if ((res = pn53x_build_frame(abtFrame + 1, &szFrame, pbtData, szData)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
res = spi_send(DRIVER_DATA(pnd)->port, abtFrame, szFrame, true);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
pnd->last_error = res;
return pnd->last_error;
}
res = pn532_spi_wait_for_data(pnd, timeout);
if (res != NFC_SUCCESS) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to wait for SPI data. (RX)");
pnd->last_error = res;
return pnd->last_error;
}
uint8_t abtRxBuf[PN53x_ACK_FRAME__LEN];
res = spi_send_receive(DRIVER_DATA(pnd)->port, &pn532_spi_cmd_dataread, 1, abtRxBuf, sizeof(abtRxBuf), true);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "Unable to read ACK");
pnd->last_error = res;
return pnd->last_error;
}
if (pn53x_check_ack_frame(pnd, abtRxBuf, sizeof(abtRxBuf)) == 0) {
// The PN53x is running the sent command
} else {
return pnd->last_error;
}
return NFC_SUCCESS;
}
int
pn532_spi_ack(nfc_device *pnd)
{
const size_t ack_frame_len = (sizeof(pn53x_ack_frame) / sizeof(pn53x_ack_frame[0]));
uint8_t ack_tx_buf [1 + ack_frame_len];
ack_tx_buf[0] = pn532_spi_cmd_datawrite;
memcpy(ack_tx_buf + 1, pn53x_ack_frame, ack_frame_len);
int res = spi_send(DRIVER_DATA(pnd)->port, ack_tx_buf, ack_frame_len + 1, true);
return res;
}
static int
pn532_spi_abort_command(nfc_device *pnd)
{
if (pnd) {
DRIVER_DATA(pnd)->abort_flag = true;
}
return NFC_SUCCESS;
}
const struct pn53x_io pn532_spi_io = {
.send = pn532_spi_send,
.receive = pn532_spi_receive,
};
const struct nfc_driver pn532_spi_driver = {
.name = PN532_SPI_DRIVER_NAME,
.scan_type = INTRUSIVE,
.scan = pn532_spi_scan,
.open = pn532_spi_open,
.close = pn532_spi_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = pn532_initiator_init_secure_element,
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = pn532_spi_abort_command,
.idle = pn53x_idle,
.powerdown = pn53x_PowerDown,
};
|
1060840728-lvgang
|
libnfc/drivers/pn532_spi.c
|
C
|
lgpl
| 21,751
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file arygon.c
* @brief ARYGON readers driver
*
* This driver can handle ARYGON readers that use UART as bus.
* UART connection can be direct (host<->arygon_uc) or could be provided by internal USB to serial interface (e.g. host<->ftdi_chip<->arygon_uc)
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "arygon.h"
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <nfc/nfc.h>
#include "drivers.h"
#include "nfc-internal.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "uart.h"
/** @def DEV_ARYGON_PROTOCOL_ARYGON_ASCII
* @brief High level language in ASCII format. (Common µC commands and Mifare® commands)
*/
#define DEV_ARYGON_PROTOCOL_ARYGON_ASCII '0'
/** @def DEV_ARYGON_MODE_HL_ASCII
* @brief High level language in Binary format With AddressingByte for party line. (Common µC commands and Mifare® commands)
*/
#define DEV_ARYGON_PROTOCOL_ARYGON_BINARY_WAB '1'
/** @def DEV_ARYGON_PROTOCOL_TAMA
* @brief Philips protocol (TAMA language) in binary format.
*/
#define DEV_ARYGON_PROTOCOL_TAMA '2'
/** @def DEV_ARYGON_PROTOCOL_TAMA_WAB
* @brief Philips protocol (TAMA language) in binary With AddressingByte for party line.
*/
#define DEV_ARYGON_PROTOCOL_TAMA_WAB '3'
#define ARYGON_DEFAULT_SPEED 9600
#define ARYGON_DRIVER_NAME "arygon"
#define LOG_CATEGORY "libnfc.driver.arygon"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
#define DRIVER_DATA(pnd) ((struct arygon_data*)(pnd->driver_data))
// Internal data structs
const struct pn53x_io arygon_tama_io;
struct arygon_data {
serial_port port;
#ifndef WIN32
int iAbortFds[2];
#else
volatile bool abort_flag;
#endif
};
// ARYGON frames
static const uint8_t arygon_error_none[] = "FF000000\x0d\x0a";
static const uint8_t arygon_error_incomplete_command[] = "FF0C0000\x0d\x0a";
static const uint8_t arygon_error_unknown_mode[] = "FF060000\x0d\x0a";
// Prototypes
int arygon_reset_tama(nfc_device *pnd);
void arygon_firmware(nfc_device *pnd, char *str);
static size_t
arygon_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
size_t device_found = 0;
serial_port sp;
char **acPorts = uart_list_ports();
const char *acPort;
int iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
sp = uart_open(acPort);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Trying to find ARYGON device on serial port: %s at %d baud.", acPort, ARYGON_DEFAULT_SPEED);
if ((sp != INVALID_SERIAL_PORT) && (sp != CLAIMED_SERIAL_PORT)) {
// We need to flush input to be sure first reply does not comes from older byte transceive
uart_flush_input(sp, true);
uart_set_speed(sp, ARYGON_DEFAULT_SPEED);
nfc_connstring connstring;
snprintf(connstring, sizeof(nfc_connstring), "%s:%s:%"PRIu32, ARYGON_DRIVER_NAME, acPort, ARYGON_DEFAULT_SPEED);
nfc_device *pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
uart_close(sp);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
pnd->driver = &arygon_driver;
pnd->driver_data = malloc(sizeof(struct arygon_data));
if (!pnd->driver_data) {
perror("malloc");
uart_close(sp);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
DRIVER_DATA(pnd)->port = sp;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &arygon_tama_io) == NULL) {
perror("malloc");
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
#ifndef WIN32
// pipe-based abort mecanism
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
int res = arygon_reset_tama(pnd);
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
if (res < 0) {
continue;
}
// ARYGON reader is found
memcpy(connstrings[device_found], connstring, sizeof(nfc_connstring));
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found >= connstrings_len)
break;
}
}
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return device_found;
}
struct arygon_descriptor {
char *port;
uint32_t speed;
};
static void
arygon_close_step2(nfc_device *pnd)
{
// Release UART port
uart_close(DRIVER_DATA(pnd)->port);
#ifndef WIN32
// Release file descriptors used for abort mecanism
close(DRIVER_DATA(pnd)->iAbortFds[0]);
close(DRIVER_DATA(pnd)->iAbortFds[1]);
#endif
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
static void
arygon_close(nfc_device *pnd)
{
pn53x_idle(pnd);
arygon_close_step2(pnd);
}
static nfc_device *
arygon_open(const nfc_context *context, const nfc_connstring connstring)
{
struct arygon_descriptor ndd;
char *speed_s;
int connstring_decode_level = connstring_decode(connstring, ARYGON_DRIVER_NAME, NULL, &ndd.port, &speed_s);
if (connstring_decode_level == 3) {
ndd.speed = 0;
if (sscanf(speed_s, "%10"PRIu32, &ndd.speed) != 1) {
// speed_s is not a number
free(ndd.port);
free(speed_s);
return NULL;
}
free(speed_s);
}
if (connstring_decode_level < 2) {
return NULL;
}
if (connstring_decode_level < 3) {
ndd.speed = ARYGON_DEFAULT_SPEED;
}
serial_port sp;
nfc_device *pnd = NULL;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Attempt to open: %s at %d baud.", ndd.port, ndd.speed);
sp = uart_open(ndd.port);
if (sp == INVALID_SERIAL_PORT)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Invalid serial port: %s", ndd.port);
if (sp == CLAIMED_SERIAL_PORT)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Serial port already claimed: %s", ndd.port);
if ((sp == CLAIMED_SERIAL_PORT) || (sp == INVALID_SERIAL_PORT)) {
free(ndd.port);
return NULL;
}
// We need to flush input to be sure first reply does not comes from older byte transceive
uart_flush_input(sp, true);
uart_set_speed(sp, ndd.speed);
// We have a connection
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
free(ndd.port);
uart_close(sp);
return NULL;
}
snprintf(pnd->name, sizeof(pnd->name), "%s:%s", ARYGON_DRIVER_NAME, ndd.port);
free(ndd.port);
pnd->driver_data = malloc(sizeof(struct arygon_data));
if (!pnd->driver_data) {
perror("malloc");
uart_close(sp);
nfc_device_free(pnd);
return NULL;
}
DRIVER_DATA(pnd)->port = sp;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &arygon_tama_io) == NULL) {
perror("malloc");
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
return NULL;
}
// The PN53x chip opened to ARYGON MCU doesn't seems to be in LowVBat mode
CHIP_DATA(pnd)->power_mode = NORMAL;
// empirical tuning
CHIP_DATA(pnd)->timer_correction = 46;
pnd->driver = &arygon_driver;
#ifndef WIN32
// pipe-based abort mecanism
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
return NULL;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
// Check communication using "Reset TAMA" command
if (arygon_reset_tama(pnd) < 0) {
arygon_close_step2(pnd);
return NULL;
}
char arygon_firmware_version[10];
arygon_firmware(pnd, arygon_firmware_version);
char *pcName;
pcName = strdup(pnd->name);
snprintf(pnd->name, sizeof(pnd->name), "%s %s", pcName, arygon_firmware_version);
free(pcName);
pn53x_init(pnd);
return pnd;
}
#define ARYGON_TX_BUFFER_LEN (PN53x_NORMAL_FRAME__DATA_MAX_LEN + PN53x_NORMAL_FRAME__OVERHEAD + 1)
#define ARYGON_RX_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
static int
arygon_tama_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
int res = 0;
// Before sending anything, we need to discard from any junk bytes
uart_flush_input(DRIVER_DATA(pnd)->port, false);
uint8_t abtFrame[ARYGON_TX_BUFFER_LEN] = { DEV_ARYGON_PROTOCOL_TAMA, 0x00, 0x00, 0xff }; // Every packet must start with "0x32 0x00 0x00 0xff"
size_t szFrame = 0;
if (szData > PN53x_NORMAL_FRAME__DATA_MAX_LEN) {
// ARYGON Reader with PN532 equipped does not support extended frame (bug in ARYGON firmware?)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "ARYGON device does not support more than %d bytes as payload (requested: %" PRIdPTR ")", PN53x_NORMAL_FRAME__DATA_MAX_LEN, szData);
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
if ((res = pn53x_build_frame(abtFrame + 1, &szFrame, pbtData, szData)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
if ((res = uart_send(DRIVER_DATA(pnd)->port, abtFrame, szFrame + 1, timeout)) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
pnd->last_error = res;
return pnd->last_error;
}
uint8_t abtRxBuf[PN53x_ACK_FRAME__LEN];
if ((res = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, sizeof(abtRxBuf), 0, timeout)) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to read ACK");
pnd->last_error = res;
return pnd->last_error;
}
if (pn53x_check_ack_frame(pnd, abtRxBuf, sizeof(abtRxBuf)) == 0) {
// The PN53x is running the sent command
} else if (0 == memcmp(arygon_error_unknown_mode, abtRxBuf, sizeof(abtRxBuf))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Bad frame format.");
// We have already read 6 bytes and arygon_error_unknown_mode is 10 bytes long
// so we have to read 4 remaining bytes to be synchronized at the next receiving pass.
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 4, 0, timeout);
return pnd->last_error;
} else {
return pnd->last_error;
}
return NFC_SUCCESS;
}
static int
arygon_abort(nfc_device *pnd)
{
// Send a valid TAMA packet to wakup the PN53x (we will not have an answer, according to Arygon manual)
uint8_t dummy[] = { 0x32, 0x00, 0x00, 0xff, 0x09, 0xf7, 0xd4, 0x00, 0x00, 0x6c, 0x69, 0x62, 0x6e, 0x66, 0x63, 0xbe, 0x00 };
uart_send(DRIVER_DATA(pnd)->port, dummy, sizeof(dummy), 0);
// Using Arygon device we can't send ACK frame to abort the running command
return pn53x_check_communication(pnd);
}
static int
arygon_tama_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
uint8_t abtRxBuf[5];
size_t len;
void *abort_p = NULL;
#ifndef WIN32
abort_p = &(DRIVER_DATA(pnd)->iAbortFds[1]);
#else
abort_p = (void *) & (DRIVER_DATA(pnd)->abort_flag);
#endif
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 5, abort_p, timeout);
if (abort_p && (NFC_EOPABORTED == pnd->last_error)) {
arygon_abort(pnd);
/* last_error got reset by arygon_abort() */
pnd->last_error = NFC_EOPABORTED;
return pnd->last_error;
}
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
return pnd->last_error;
}
const uint8_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
if (0 != (memcmp(abtRxBuf, pn53x_preamble, 3))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame preamble+start code mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
if ((0x01 == abtRxBuf[3]) && (0xff == abtRxBuf[4])) {
// Error frame
uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 3, 0, timeout);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Application level error detected");
pnd->last_error = NFC_EIO;
return pnd->last_error;
} else if ((0xff == abtRxBuf[3]) && (0xff == abtRxBuf[4])) {
// Extended frame
// ARYGON devices does not support extended frame sending
abort();
} else {
// Normal frame
if (256 != (abtRxBuf[3] + abtRxBuf[4])) {
// TODO: Retry
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// abtRxBuf[3] (LEN) include TFI + (CC+1)
len = abtRxBuf[3] - 2;
}
if (len > szDataLen) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to receive data: buffer too small. (szDataLen: %" PRIuPTR ", len: %" PRIuPTR ")", szDataLen, len);
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// TFI + PD0 (CC+1)
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 2, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
return pnd->last_error;
}
if (abtRxBuf[0] != 0xD5) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "TFI Mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
if (abtRxBuf[1] != CHIP_DATA(pnd)->last_command + 1) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
if (len) {
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, pbtData, len, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
return pnd->last_error;
}
}
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 2, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
return pnd->last_error;
}
uint8_t btDCS = (256 - 0xD5);
btDCS -= CHIP_DATA(pnd)->last_command + 1;
for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos];
}
if (btDCS != abtRxBuf[0]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Data checksum mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
if (0x00 != abtRxBuf[1]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame postamble mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// The PN53x command is done and we successfully received the reply
return len;
}
void
arygon_firmware(nfc_device *pnd, char *str)
{
const uint8_t arygon_firmware_version_cmd[] = { DEV_ARYGON_PROTOCOL_ARYGON_ASCII, 'a', 'v' };
uint8_t abtRx[16];
size_t szRx = sizeof(abtRx);
int res = uart_send(DRIVER_DATA(pnd)->port, arygon_firmware_version_cmd, sizeof(arygon_firmware_version_cmd), 0);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "Unable to send ARYGON firmware command.");
return;
}
res = uart_receive(DRIVER_DATA(pnd)->port, abtRx, szRx, 0, 0);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "Unable to retrieve ARYGON firmware version.");
return;
}
if (0 == memcmp(abtRx, arygon_error_none, 6)) {
uint8_t *p = abtRx + 6;
unsigned int szData;
sscanf((const char *)p, "%02x%9s", &szData, p);
if (szData > 9)
szData = 9;
memcpy(str, p, szData);
*(str + szData) = '\0';
}
}
int
arygon_reset_tama(nfc_device *pnd)
{
const uint8_t arygon_reset_tama_cmd[] = { DEV_ARYGON_PROTOCOL_ARYGON_ASCII, 'a', 'r' };
uint8_t abtRx[10]; // Attempted response is 10 bytes long
size_t szRx = sizeof(abtRx);
int res;
uart_send(DRIVER_DATA(pnd)->port, arygon_reset_tama_cmd, sizeof(arygon_reset_tama_cmd), 500);
// Two reply are possible from ARYGON device: arygon_error_none (ie. in case the byte is well-sent)
// or arygon_error_unknown_mode (ie. in case of the first byte was bad-transmitted)
res = uart_receive(DRIVER_DATA(pnd)->port, abtRx, szRx, 0, 1000);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "No reply to 'reset TAMA' command.");
pnd->last_error = res;
return pnd->last_error;
}
if (0 != memcmp(abtRx, arygon_error_none, sizeof(arygon_error_none) - 1)) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
return NFC_SUCCESS;
}
static int
arygon_abort_command(nfc_device *pnd)
{
if (pnd) {
#ifndef WIN32
close(DRIVER_DATA(pnd)->iAbortFds[0]);
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
return NFC_ESOFT;
}
#else
DRIVER_DATA(pnd)->abort_flag = true;
#endif
}
return NFC_SUCCESS;
}
const struct pn53x_io arygon_tama_io = {
.send = arygon_tama_send,
.receive = arygon_tama_receive,
};
const struct nfc_driver arygon_driver = {
.name = ARYGON_DRIVER_NAME,
.scan_type = INTRUSIVE,
.scan = arygon_scan,
.open = arygon_open,
.close = arygon_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = NULL, // No secure-element support
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = arygon_abort_command,
.idle = pn53x_idle,
/* Even if PN532, PowerDown is not recommended on those devices */
.powerdown = NULL,
};
|
1060840728-lvgang
|
libnfc/drivers/arygon.c
|
C
|
lgpl
| 20,371
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
* Copyright (C) 2013 Evgeny Boger
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn532_spi.h
* @brief Driver for PN532 connected in SPI
*/
#ifndef __NFC_DRIVER_PN532_SPI_H__
#define __NFC_DRIVER_PN532_SPI_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver pn532_spi_driver;
#endif // ! __NFC_DRIVER_PN532_SPI_H__
|
1060840728-lvgang
|
libnfc/drivers/pn532_spi.h
|
C
|
lgpl
| 1,384
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file acr122_pcsc.c
* @brief Driver for ACR122 devices (e.g. Tikitag, Touchatag, ACS ACR122) behind PC/SC
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <nfc/nfc.h>
#include "chips/pn53x.h"
#include "drivers/acr122_pcsc.h"
#include "nfc-internal.h"
// Bus
#ifdef __APPLE__
#include <PCSC/winscard.h>
#include <PCSC/wintypes.h>
#else
#include <winscard.h>
#endif
#define ACR122_PCSC_DRIVER_NAME "acr122_pcsc"
#if defined (_WIN32)
# define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE SCARD_CTL_CODE(3500)
#elif defined(__APPLE__)
# define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE (((0x31) << 16) | ((3500) << 2))
#elif defined (__FreeBSD__) || defined (__OpenBSD__)
# define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE (((0x31) << 16) | ((3500) << 2))
#elif defined (__linux__)
# include <reader.h>
// Escape IOCTL tested successfully:
# define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE SCARD_CTL_CODE(1)
#else
# error "Can't determine serial string for your system"
#endif
#include <nfc/nfc.h>
#define SCARD_OPERATION_SUCCESS 0x61
#define SCARD_OPERATION_ERROR 0x63
#ifndef SCARD_PROTOCOL_UNDEFINED
# define SCARD_PROTOCOL_UNDEFINED SCARD_PROTOCOL_UNSET
#endif
#define FIRMWARE_TEXT "ACR122U" // Tested on: ACR122U101(ACS), ACR122U102(Tikitag), ACR122U203(ACS)
#define ACR122_PCSC_WRAP_LEN 6
#define ACR122_PCSC_COMMAND_LEN 266
#define ACR122_PCSC_RESPONSE_LEN 268
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
#define LOG_CATEGORY "libnfc.driver.acr122_pcsc"
// Internal data struct
const struct pn53x_io acr122_pcsc_io;
// Prototypes
char *acr122_pcsc_firmware(nfc_device *pnd);
const char *supported_devices[] = {
"ACS ACR122", // ACR122U & Touchatag, last version
"ACS ACR 38U-CCID", // Touchatag, early version
"ACS ACR38U-CCID", // Touchatag, early version, under MacOSX
"ACS AET65", // Touchatag using CCID driver version >= 1.4.6
" CCID USB", // ??
NULL
};
struct acr122_pcsc_data {
SCARDHANDLE hCard;
SCARD_IO_REQUEST ioCard;
uint8_t abtRx[ACR122_PCSC_RESPONSE_LEN];
size_t szRx;
};
#define DRIVER_DATA(pnd) ((struct acr122_pcsc_data*)(pnd->driver_data))
static SCARDCONTEXT _SCardContext;
static int _iSCardContextRefCount = 0;
static SCARDCONTEXT *
acr122_pcsc_get_scardcontext(void)
{
if (_iSCardContextRefCount == 0) {
if (SCardEstablishContext(SCARD_SCOPE_USER, NULL, NULL, &_SCardContext) != SCARD_S_SUCCESS)
return NULL;
}
_iSCardContextRefCount++;
return &_SCardContext;
}
static void
acr122_pcsc_free_scardcontext(void)
{
if (_iSCardContextRefCount) {
_iSCardContextRefCount--;
if (!_iSCardContextRefCount) {
SCardReleaseContext(_SCardContext);
}
}
}
#define PCSC_MAX_DEVICES 16
/**
* @brief List opened devices
*
* Probe PCSC to find ACR122 devices (ACR122U and Touchatag/Tikitag).
*
* @param connstring array of nfc_connstring where found device's connection strings will be stored.
* @param connstrings_len size of connstrings array.
* @return number of devices found.
*/
static size_t
acr122_pcsc_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
(void) context;
size_t szPos = 0;
char acDeviceNames[256 + 64 * PCSC_MAX_DEVICES];
size_t szDeviceNamesLen = sizeof(acDeviceNames);
SCARDCONTEXT *pscc;
int i;
// Clear the reader list
memset(acDeviceNames, '\0', szDeviceNamesLen);
// Test if context succeeded
if (!(pscc = acr122_pcsc_get_scardcontext())) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Warning: %s", "PCSC context not found (make sure PCSC daemon is running).");
return 0;
}
// Retrieve the string array of all available pcsc readers
DWORD dwDeviceNamesLen = szDeviceNamesLen;
if (SCardListReaders(*pscc, NULL, acDeviceNames, &dwDeviceNamesLen) != SCARD_S_SUCCESS)
return 0;
size_t device_found = 0;
while ((acDeviceNames[szPos] != '\0') && (device_found < connstrings_len)) {
bool bSupported = false;
for (i = 0; supported_devices[i] && !bSupported; i++) {
int l = strlen(supported_devices[i]);
bSupported = 0 == strncmp(supported_devices[i], acDeviceNames + szPos, l);
}
if (bSupported) {
// Supported ACR122 device found
snprintf(connstrings[device_found], sizeof(nfc_connstring), "%s:%s", ACR122_PCSC_DRIVER_NAME, acDeviceNames + szPos);
device_found++;
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "PCSC device [%s] is not NFC capable or not supported by libnfc.", acDeviceNames + szPos);
}
// Find next device name position
while (acDeviceNames[szPos++] != '\0');
}
acr122_pcsc_free_scardcontext();
return device_found;
}
struct acr122_pcsc_descriptor {
char *pcsc_device_name;
};
static nfc_device *
acr122_pcsc_open(const nfc_context *context, const nfc_connstring connstring)
{
struct acr122_pcsc_descriptor ndd;
int connstring_decode_level = connstring_decode(connstring, ACR122_PCSC_DRIVER_NAME, "pcsc", &ndd.pcsc_device_name, NULL);
if (connstring_decode_level < 1) {
return NULL;
}
nfc_connstring fullconnstring;
if (connstring_decode_level == 1) {
// Device was not specified, take the first one we can find
size_t szDeviceFound = acr122_pcsc_scan(context, &fullconnstring, 1);
if (szDeviceFound < 1)
return NULL;
connstring_decode_level = connstring_decode(fullconnstring, ACR122_PCSC_DRIVER_NAME, "pcsc", &ndd.pcsc_device_name, NULL);
if (connstring_decode_level < 2) {
return NULL;
}
} else {
memcpy(fullconnstring, connstring, sizeof(nfc_connstring));
}
if (strlen(ndd.pcsc_device_name) < 5) { // We can assume it's a reader ID as pcsc_name always ends with "NN NN"
// Device was not specified, only ID, retrieve it
size_t index;
if (sscanf(ndd.pcsc_device_name, "%4" SCNuPTR, &index) != 1) {
free(ndd.pcsc_device_name);
return NULL;
}
nfc_connstring *ncs = malloc(sizeof(nfc_connstring) * (index + 1));
if (!ncs) {
perror("malloc");
free(ndd.pcsc_device_name);
return NULL;
}
size_t szDeviceFound = acr122_pcsc_scan(context, ncs, index + 1);
if (szDeviceFound < index + 1) {
free(ncs);
free(ndd.pcsc_device_name);
return NULL;
}
strncpy(fullconnstring, ncs[index], sizeof(nfc_connstring));
fullconnstring[sizeof(nfc_connstring) - 1] = '\0';
free(ncs);
connstring_decode_level = connstring_decode(fullconnstring, ACR122_PCSC_DRIVER_NAME, "pcsc", &ndd.pcsc_device_name, NULL);
if (connstring_decode_level < 2) {
free(ndd.pcsc_device_name);
return NULL;
}
}
char *pcFirmware;
nfc_device *pnd = nfc_device_new(context, fullconnstring);
if (!pnd) {
perror("malloc");
goto error;
}
pnd->driver_data = malloc(sizeof(struct acr122_pcsc_data));
if (!pnd->driver_data) {
perror("malloc");
goto error;
}
// Alloc and init chip's data
if (pn53x_data_new(pnd, &acr122_pcsc_io) == NULL) {
perror("malloc");
goto error;
}
SCARDCONTEXT *pscc;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Attempt to open %s", ndd.pcsc_device_name);
// Test if context succeeded
if (!(pscc = acr122_pcsc_get_scardcontext()))
goto error;
// Test if we were able to connect to the "emulator" card
if (SCardConnect(*pscc, ndd.pcsc_device_name, SCARD_SHARE_EXCLUSIVE, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1, &(DRIVER_DATA(pnd)->hCard), (void *) & (DRIVER_DATA(pnd)->ioCard.dwProtocol)) != SCARD_S_SUCCESS) {
// Connect to ACR122 firmware version >2.0
if (SCardConnect(*pscc, ndd.pcsc_device_name, SCARD_SHARE_DIRECT, 0, &(DRIVER_DATA(pnd)->hCard), (void *) & (DRIVER_DATA(pnd)->ioCard.dwProtocol)) != SCARD_S_SUCCESS) {
// We can not connect to this device.
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "PCSC connect failed");
goto error;
}
}
// Configure I/O settings for card communication
DRIVER_DATA(pnd)->ioCard.cbPciLength = sizeof(SCARD_IO_REQUEST);
// Retrieve the current firmware version
pcFirmware = acr122_pcsc_firmware(pnd);
if (strstr(pcFirmware, FIRMWARE_TEXT) != NULL) {
// Done, we found the reader we are looking for
snprintf(pnd->name, sizeof(pnd->name), "%s / %s", ndd.pcsc_device_name, pcFirmware);
// 50: empirical tuning on Touchatag
// 46: empirical tuning on ACR122U
CHIP_DATA(pnd)->timer_correction = 50;
pnd->driver = &acr122_pcsc_driver;
pn53x_init(pnd);
free(ndd.pcsc_device_name);
return pnd;
}
error:
free(ndd.pcsc_device_name);
nfc_device_free(pnd);
return NULL;
}
static void
acr122_pcsc_close(nfc_device *pnd)
{
pn53x_idle(pnd);
SCardDisconnect(DRIVER_DATA(pnd)->hCard, SCARD_LEAVE_CARD);
acr122_pcsc_free_scardcontext();
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
static int
acr122_pcsc_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
// FIXME: timeout is not handled
(void) timeout;
// Make sure the command does not overflow the send buffer
if (szData > ACR122_PCSC_COMMAND_LEN) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
// Prepare and transmit the send buffer
const size_t szTxBuf = szData + 6;
uint8_t abtTxBuf[ACR122_PCSC_WRAP_LEN + ACR122_PCSC_COMMAND_LEN] = { 0xFF, 0x00, 0x00, 0x00, szData + 1, 0xD4 };
memcpy(abtTxBuf + ACR122_PCSC_WRAP_LEN, pbtData, szData);
LOG_HEX(NFC_LOG_GROUP_COM, "TX", abtTxBuf, szTxBuf);
DRIVER_DATA(pnd)->szRx = 0;
DWORD dwRxLen = sizeof(DRIVER_DATA(pnd)->abtRx);
if (DRIVER_DATA(pnd)->ioCard.dwProtocol == SCARD_PROTOCOL_UNDEFINED) {
/*
* In this communication mode, we directly have the response from the
* PN532. Save it in the driver data structure so that it can be retrieved
* in ac122_receive().
*
* Some devices will never enter this state (e.g. Touchatag) but are still
* supported through SCardTransmit calls (see bellow).
*
* This state is generaly reached when the ACR122 has no target in it's
* field.
*/
if (SCardControl(DRIVER_DATA(pnd)->hCard, IOCTL_CCID_ESCAPE_SCARD_CTL_CODE, abtTxBuf, szTxBuf, DRIVER_DATA(pnd)->abtRx, ACR122_PCSC_RESPONSE_LEN, &dwRxLen) != SCARD_S_SUCCESS) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
} else {
/*
* In T=0 mode, we receive an acknoledge from the MCU, in T=1 mode, we
* receive the response from the PN532.
*/
if (SCardTransmit(DRIVER_DATA(pnd)->hCard, &(DRIVER_DATA(pnd)->ioCard), abtTxBuf, szTxBuf, NULL, DRIVER_DATA(pnd)->abtRx, &dwRxLen) != SCARD_S_SUCCESS) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
}
if (DRIVER_DATA(pnd)->ioCard.dwProtocol == SCARD_PROTOCOL_T0) {
/*
* Check the MCU response
*/
// Make sure we received the byte-count we expected
if (dwRxLen != 2) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// Check if the operation was successful, so an answer is available
if (DRIVER_DATA(pnd)->abtRx[0] == SCARD_OPERATION_ERROR) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
} else {
DRIVER_DATA(pnd)->szRx = dwRxLen;
}
return NFC_SUCCESS;
}
static int
acr122_pcsc_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szData, int timeout)
{
// FIXME: timeout is not handled
(void) timeout;
int len;
uint8_t abtRxCmd[5] = { 0xFF, 0xC0, 0x00, 0x00 };
if (DRIVER_DATA(pnd)->ioCard.dwProtocol == SCARD_PROTOCOL_T0) {
/*
* Retrieve the PN532 response.
*/
DWORD dwRxLen = sizeof(DRIVER_DATA(pnd)->abtRx);
abtRxCmd[4] = DRIVER_DATA(pnd)->abtRx[1];
if (SCardTransmit(DRIVER_DATA(pnd)->hCard, &(DRIVER_DATA(pnd)->ioCard), abtRxCmd, sizeof(abtRxCmd), NULL, DRIVER_DATA(pnd)->abtRx, &dwRxLen) != SCARD_S_SUCCESS) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
DRIVER_DATA(pnd)->szRx = dwRxLen;
} else {
/*
* We already have the PN532 answer, it was saved by acr122_pcsc_send().
*/
}
LOG_HEX(NFC_LOG_GROUP_COM, "RX", DRIVER_DATA(pnd)->abtRx, DRIVER_DATA(pnd)->szRx);
// Make sure we have an emulated answer that fits the return buffer
if (DRIVER_DATA(pnd)->szRx < 4 || (DRIVER_DATA(pnd)->szRx - 4) > szData) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// Wipe out the 4 APDU emulation bytes: D5 4B .. .. .. 90 00
len = DRIVER_DATA(pnd)->szRx - 4;
memcpy(pbtData, DRIVER_DATA(pnd)->abtRx + 2, len);
return len;
}
char *
acr122_pcsc_firmware(nfc_device *pnd)
{
uint8_t abtGetFw[5] = { 0xFF, 0x00, 0x48, 0x00, 0x00 };
uint32_t uiResult;
static char abtFw[11];
DWORD dwFwLen = sizeof(abtFw);
memset(abtFw, 0x00, sizeof(abtFw));
if (DRIVER_DATA(pnd)->ioCard.dwProtocol == SCARD_PROTOCOL_UNDEFINED) {
uiResult = SCardControl(DRIVER_DATA(pnd)->hCard, IOCTL_CCID_ESCAPE_SCARD_CTL_CODE, abtGetFw, sizeof(abtGetFw), (uint8_t *) abtFw, dwFwLen - 1, &dwFwLen);
} else {
uiResult = SCardTransmit(DRIVER_DATA(pnd)->hCard, &(DRIVER_DATA(pnd)->ioCard), abtGetFw, sizeof(abtGetFw), NULL, (uint8_t *) abtFw, &dwFwLen);
}
if (uiResult != SCARD_S_SUCCESS) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "No ACR122 firmware received, Error: %08x", uiResult);
}
return abtFw;
}
#if 0
bool
acr122_pcsc_led_red(nfc_device *pnd, bool bOn)
{
uint8_t abtLed[9] = { 0xFF, 0x00, 0x40, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00 };
uint8_t abtBuf[2];
DWORD dwBufLen = sizeof(abtBuf);
(void) bOn;
if (DRIVER_DATA(pnd)->ioCard.dwProtocol == SCARD_PROTOCOL_UNDEFINED) {
return (SCardControl(DRIVER_DATA(pnd)->hCard, IOCTL_CCID_ESCAPE_SCARD_CTL_CODE, abtLed, sizeof(abtLed), abtBuf, dwBufLen, &dwBufLen) == SCARD_S_SUCCESS);
} else {
return (SCardTransmit(DRIVER_DATA(pnd)->hCard, &(DRIVER_DATA(pnd)->ioCard), abtLed, sizeof(abtLed), NULL, abtBuf, &dwBufLen) == SCARD_S_SUCCESS);
}
}
#endif
const struct pn53x_io acr122_pcsc_io = {
.send = acr122_pcsc_send,
.receive = acr122_pcsc_receive,
};
const struct nfc_driver acr122_pcsc_driver = {
.name = ACR122_PCSC_DRIVER_NAME,
.scan = acr122_pcsc_scan,
.open = acr122_pcsc_open,
.close = acr122_pcsc_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = NULL, // No secure-element support
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = NULL, // Abort is not supported in this driver
.idle = pn53x_idle,
/* Even if PN532, PowerDown is not recommended on those devices */
.powerdown = NULL,
};
|
1060840728-lvgang
|
libnfc/drivers/acr122_pcsc.c
|
C
|
lgpl
| 17,160
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn53x_usb.c
* @brief Driver for PN53x using USB
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
/*
Thanks to d18c7db and Okko for example code
*/
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <sys/select.h>
#include <errno.h>
#include <string.h>
#include <nfc/nfc.h>
#include "nfc-internal.h"
#include "buses/usbbus.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "drivers/pn53x_usb.h"
#define PN53X_USB_DRIVER_NAME "pn53x_usb"
#define LOG_CATEGORY "libnfc.driver.pn53x_usb"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
#define USB_INFINITE_TIMEOUT 0
#define DRIVER_DATA(pnd) ((struct pn53x_usb_data*)(pnd->driver_data))
const nfc_modulation_type no_target_support[] = {0};
typedef enum {
UNKNOWN,
NXP_PN531,
SONY_PN531,
NXP_PN533,
ASK_LOGO,
SCM_SCL3711,
SONY_RCS360
} pn53x_usb_model;
// Internal data struct
struct pn53x_usb_data {
usb_dev_handle *pudh;
pn53x_usb_model model;
uint32_t uiEndPointIn;
uint32_t uiEndPointOut;
uint32_t uiMaxPacketSize;
volatile bool abort_flag;
};
// Internal io struct
const struct pn53x_io pn53x_usb_io;
// Prototypes
bool pn53x_usb_get_usb_device_name(struct usb_device *dev, usb_dev_handle *udev, char *buffer, size_t len);
int pn53x_usb_init(nfc_device *pnd);
static int
pn53x_usb_bulk_read(struct pn53x_usb_data *data, uint8_t abtRx[], const size_t szRx, const int timeout)
{
int res = usb_bulk_read(data->pudh, data->uiEndPointIn, (char *) abtRx, szRx, timeout);
if (res > 0) {
LOG_HEX(NFC_LOG_GROUP_COM, "RX", abtRx, res);
} else if (res < 0) {
if (res != -USB_TIMEDOUT)
log_put(NFC_LOG_GROUP_COM, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to read from USB (%s)", _usb_strerror(res));
}
return res;
}
static int
pn53x_usb_bulk_write(struct pn53x_usb_data *data, uint8_t abtTx[], const size_t szTx, const int timeout)
{
LOG_HEX(NFC_LOG_GROUP_COM, "TX", abtTx, szTx);
int res = usb_bulk_write(data->pudh, data->uiEndPointOut, (char *) abtTx, szTx, timeout);
if (res > 0) {
// HACK This little hack is a well know problem of USB, see http://www.libusb.org/ticket/6 for more details
if ((res % data->uiMaxPacketSize) == 0) {
usb_bulk_write(data->pudh, data->uiEndPointOut, "\0", 0, timeout);
}
} else {
log_put(NFC_LOG_GROUP_COM, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to write to USB (%s)", _usb_strerror(res));
}
return res;
}
struct pn53x_usb_supported_device {
uint16_t vendor_id;
uint16_t product_id;
pn53x_usb_model model;
const char *name;
};
const struct pn53x_usb_supported_device pn53x_usb_supported_devices[] = {
{ 0x04CC, 0x0531, NXP_PN531, "Philips / PN531" },
{ 0x04CC, 0x2533, NXP_PN533, "NXP / PN533" },
{ 0x04E6, 0x5591, SCM_SCL3711, "SCM Micro / SCL3711-NFC&RW" },
{ 0x054c, 0x0193, SONY_PN531, "Sony / PN531" },
{ 0x1FD3, 0x0608, ASK_LOGO, "ASK / LoGO" },
{ 0x054C, 0x02E1, SONY_RCS360, "Sony / FeliCa S360 [PaSoRi]" }
};
static pn53x_usb_model
pn53x_usb_get_device_model(uint16_t vendor_id, uint16_t product_id)
{
for (size_t n = 0; n < sizeof(pn53x_usb_supported_devices) / sizeof(struct pn53x_usb_supported_device); n++) {
if ((vendor_id == pn53x_usb_supported_devices[n].vendor_id) &&
(product_id == pn53x_usb_supported_devices[n].product_id))
return pn53x_usb_supported_devices[n].model;
}
return UNKNOWN;
}
int pn53x_usb_ack(nfc_device *pnd);
// Find transfer endpoints for bulk transfers
static void
pn53x_usb_get_end_points(struct usb_device *dev, struct pn53x_usb_data *data)
{
uint32_t uiIndex;
uint32_t uiEndPoint;
struct usb_interface_descriptor *puid = dev->config->interface->altsetting;
// 3 Endpoints maximum: Interrupt In, Bulk In, Bulk Out
for (uiIndex = 0; uiIndex < puid->bNumEndpoints; uiIndex++) {
// Only accept bulk transfer endpoints (ignore interrupt endpoints)
if (puid->endpoint[uiIndex].bmAttributes != USB_ENDPOINT_TYPE_BULK)
continue;
// Copy the endpoint to a local var, makes it more readable code
uiEndPoint = puid->endpoint[uiIndex].bEndpointAddress;
// Test if we dealing with a bulk IN endpoint
if ((uiEndPoint & USB_ENDPOINT_DIR_MASK) == USB_ENDPOINT_IN) {
data->uiEndPointIn = uiEndPoint;
data->uiMaxPacketSize = puid->endpoint[uiIndex].wMaxPacketSize;
}
// Test if we dealing with a bulk OUT endpoint
if ((uiEndPoint & USB_ENDPOINT_DIR_MASK) == USB_ENDPOINT_OUT) {
data->uiEndPointOut = uiEndPoint;
data->uiMaxPacketSize = puid->endpoint[uiIndex].wMaxPacketSize;
}
}
}
static size_t
pn53x_usb_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
(void)context;
usb_prepare();
size_t device_found = 0;
uint32_t uiBusIndex = 0;
struct usb_bus *bus;
for (bus = usb_get_busses(); bus; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev; dev = dev->next, uiBusIndex++) {
for (size_t n = 0; n < sizeof(pn53x_usb_supported_devices) / sizeof(struct pn53x_usb_supported_device); n++) {
if ((pn53x_usb_supported_devices[n].vendor_id == dev->descriptor.idVendor) &&
(pn53x_usb_supported_devices[n].product_id == dev->descriptor.idProduct)) {
// Make sure there are 2 endpoints available
// with libusb-win32 we got some null pointers so be robust before looking at endpoints:
if (dev->config == NULL || dev->config->interface == NULL || dev->config->interface->altsetting == NULL) {
// Nope, we maybe want the next one, let's try to find another
continue;
}
if (dev->config->interface->altsetting->bNumEndpoints < 2) {
// Nope, we maybe want the next one, let's try to find another
continue;
}
usb_dev_handle *udev = usb_open(dev);
if (udev == NULL)
continue;
// Set configuration
int res = usb_set_configuration(udev, 1);
if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to set USB configuration (%s)", _usb_strerror(res));
usb_close(udev);
// we failed to use the device
continue;
}
// pn53x_usb_get_usb_device_name (dev, udev, pnddDevices[device_found].acDevice, sizeof (pnddDevices[device_found].acDevice));
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "device found: Bus %s Device %s", bus->dirname, dev->filename);
usb_close(udev);
snprintf(connstrings[device_found], sizeof(nfc_connstring), "%s:%s:%s", PN53X_USB_DRIVER_NAME, bus->dirname, dev->filename);
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found == connstrings_len) {
return device_found;
}
}
}
}
}
return device_found;
}
struct pn53x_usb_descriptor {
char *dirname;
char *filename;
};
bool
pn53x_usb_get_usb_device_name(struct usb_device *dev, usb_dev_handle *udev, char *buffer, size_t len)
{
*buffer = '\0';
if (dev->descriptor.iManufacturer || dev->descriptor.iProduct) {
if (udev) {
usb_get_string_simple(udev, dev->descriptor.iManufacturer, buffer, len);
if (strlen(buffer) > 0)
strcpy(buffer + strlen(buffer), " / ");
usb_get_string_simple(udev, dev->descriptor.iProduct, buffer + strlen(buffer), len - strlen(buffer));
}
}
if (!*buffer) {
for (size_t n = 0; n < sizeof(pn53x_usb_supported_devices) / sizeof(struct pn53x_usb_supported_device); n++) {
if ((pn53x_usb_supported_devices[n].vendor_id == dev->descriptor.idVendor) &&
(pn53x_usb_supported_devices[n].product_id == dev->descriptor.idProduct)) {
strncpy(buffer, pn53x_usb_supported_devices[n].name, len);
buffer[len - 1] = '\0';
return true;
}
}
}
return false;
}
static nfc_device *
pn53x_usb_open(const nfc_context *context, const nfc_connstring connstring)
{
nfc_device *pnd = NULL;
struct pn53x_usb_descriptor desc = { NULL, NULL };
int connstring_decode_level = connstring_decode(connstring, PN53X_USB_DRIVER_NAME, "usb", &desc.dirname, &desc.filename);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%d element(s) have been decoded from \"%s\"", connstring_decode_level, connstring);
if (connstring_decode_level < 1) {
goto free_mem;
}
struct pn53x_usb_data data = {
.pudh = NULL,
.uiEndPointIn = 0,
.uiEndPointOut = 0,
};
struct usb_bus *bus;
struct usb_device *dev;
usb_prepare();
for (bus = usb_get_busses(); bus; bus = bus->next) {
if (connstring_decode_level > 1) {
// A specific bus have been specified
if (0 != strcmp(bus->dirname, desc.dirname))
continue;
}
for (dev = bus->devices; dev; dev = dev->next) {
if (connstring_decode_level > 2) {
// A specific dev have been specified
if (0 != strcmp(dev->filename, desc.filename))
continue;
}
// Open the USB device
if ((data.pudh = usb_open(dev)) == NULL)
continue;
// Retrieve end points
pn53x_usb_get_end_points(dev, &data);
// Set configuration
int res = usb_set_configuration(data.pudh, 1);
if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to set USB configuration (%s)", _usb_strerror(res));
if (EPERM == -res) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Warning: Please double check USB permissions for device %04x:%04x", dev->descriptor.idVendor, dev->descriptor.idProduct);
}
usb_close(data.pudh);
// we failed to use the specified device
goto free_mem;
}
res = usb_claim_interface(data.pudh, 0);
if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to claim USB interface (%s)", _usb_strerror(res));
usb_close(data.pudh);
// we failed to use the specified device
goto free_mem;
}
data.model = pn53x_usb_get_device_model(dev->descriptor.idVendor, dev->descriptor.idProduct);
// Allocate memory for the device info and specification, fill it and return the info
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
goto error;
}
pn53x_usb_get_usb_device_name(dev, data.pudh, pnd->name, sizeof(pnd->name));
pnd->driver_data = malloc(sizeof(struct pn53x_usb_data));
if (!pnd->driver_data) {
perror("malloc");
goto error;
}
*DRIVER_DATA(pnd) = data;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn53x_usb_io) == NULL) {
perror("malloc");
goto error;
}
switch (DRIVER_DATA(pnd)->model) {
// empirical tuning
case ASK_LOGO:
CHIP_DATA(pnd)->timer_correction = 50;
break;
case SCM_SCL3711:
case NXP_PN533:
CHIP_DATA(pnd)->timer_correction = 46;
break;
case NXP_PN531:
CHIP_DATA(pnd)->timer_correction = 50;
break;
case SONY_PN531:
CHIP_DATA(pnd)->timer_correction = 54;
break;
case SONY_RCS360:
case UNKNOWN:
CHIP_DATA(pnd)->timer_correction = 0; // TODO: allow user to know if timed functions are available
break;
}
pnd->driver = &pn53x_usb_driver;
// HACK1: Send first an ACK as Abort command, to reset chip before talking to it:
pn53x_usb_ack(pnd);
// HACK2: Then send a GetFirmware command to resync USB toggle bit between host & device
// in case host used set_configuration and expects the device to have reset its toggle bit, which PN53x doesn't do
if (pn53x_usb_init(pnd) < 0) {
usb_close(data.pudh);
goto error;
}
DRIVER_DATA(pnd)->abort_flag = false;
goto free_mem;
}
}
// We ran out of devices before the index required
goto free_mem;
error:
// Free allocated structure on error.
nfc_device_free(pnd);
pnd = NULL;
free_mem:
free(desc.dirname);
free(desc.filename);
return pnd;
}
static void
pn53x_usb_close(nfc_device *pnd)
{
pn53x_usb_ack(pnd);
if (DRIVER_DATA(pnd)->model == ASK_LOGO) {
/* Set P30, P31, P32, P33, P35 to logic 1 and P34 to 0 logic */
/* ie. Switch all LEDs off and turn off progressive field */
pn53x_write_register(pnd, PN53X_SFR_P3, 0xFF, _BV(P30) | _BV(P31) | _BV(P32) | _BV(P33) | _BV(P35));
}
pn53x_idle(pnd);
int res;
if ((res = usb_release_interface(DRIVER_DATA(pnd)->pudh, 0)) < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to release USB interface (%s)", _usb_strerror(res));
}
if ((res = usb_close(DRIVER_DATA(pnd)->pudh)) < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to close USB connection (%s)", _usb_strerror(res));
}
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
#define PN53X_USB_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
static int
pn53x_usb_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, const int timeout)
{
uint8_t abtFrame[PN53X_USB_BUFFER_LEN] = { 0x00, 0x00, 0xff }; // Every packet must start with "00 00 ff"
size_t szFrame = 0;
int res = 0;
if ((res = pn53x_build_frame(abtFrame, &szFrame, pbtData, szData)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
if ((res = pn53x_usb_bulk_write(DRIVER_DATA(pnd), abtFrame, szFrame, timeout)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
uint8_t abtRxBuf[PN53X_USB_BUFFER_LEN];
if ((res = pn53x_usb_bulk_read(DRIVER_DATA(pnd), abtRxBuf, sizeof(abtRxBuf), timeout)) < 0) {
// try to interrupt current device state
pn53x_usb_ack(pnd);
pnd->last_error = res;
return pnd->last_error;
}
if (pn53x_check_ack_frame(pnd, abtRxBuf, res) == 0) {
// The PN53x is running the sent command
} else {
// For some reasons (eg. send another command while a previous one is
// running), the PN533 sometimes directly replies the response packet
// instead of ACK frame, so we send a NACK frame to force PN533 to resend
// response packet. With this hack, the nextly executed function (ie.
// pn53x_usb_receive()) will be able to retreive the correct response
// packet.
// FIXME Sony reader is also affected by this bug but NACK is not supported
if ((res = pn53x_usb_bulk_write(DRIVER_DATA(pnd), (uint8_t *)pn53x_nack_frame, sizeof(pn53x_nack_frame), timeout)) < 0) {
pnd->last_error = res;
// try to interrupt current device state
pn53x_usb_ack(pnd);
return pnd->last_error;
}
}
return NFC_SUCCESS;
}
#define USB_TIMEOUT_PER_PASS 200
static int
pn53x_usb_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, const int timeout)
{
size_t len;
off_t offset = 0;
uint8_t abtRxBuf[PN53X_USB_BUFFER_LEN];
int res;
/*
* If no timeout is specified but the command is blocking, force a 200ms (USB_TIMEOUT_PER_PASS)
* timeout to allow breaking the loop if the user wants to stop it.
*/
int usb_timeout;
int remaining_time = timeout;
read:
if (timeout == USB_INFINITE_TIMEOUT) {
usb_timeout = USB_TIMEOUT_PER_PASS;
} else {
// A user-provided timeout is set, we have to cut it in multiple chunk to be able to keep an nfc_abort_command() mecanism
remaining_time -= USB_TIMEOUT_PER_PASS;
if (remaining_time <= 0) {
pnd->last_error = NFC_ETIMEOUT;
return pnd->last_error;
} else {
usb_timeout = MIN(remaining_time, USB_TIMEOUT_PER_PASS);
}
}
res = pn53x_usb_bulk_read(DRIVER_DATA(pnd), abtRxBuf, sizeof(abtRxBuf), usb_timeout);
if (res == -USB_TIMEDOUT) {
if (DRIVER_DATA(pnd)->abort_flag) {
DRIVER_DATA(pnd)->abort_flag = false;
pn53x_usb_ack(pnd);
pnd->last_error = NFC_EOPABORTED;
return pnd->last_error;
} else {
goto read;
}
}
if (res < 0) {
// try to interrupt current device state
pn53x_usb_ack(pnd);
pnd->last_error = res;
return pnd->last_error;
}
const uint8_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
if (0 != (memcmp(abtRxBuf, pn53x_preamble, 3))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame preamble+start code mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 3;
if ((0x01 == abtRxBuf[offset]) && (0xff == abtRxBuf[offset + 1])) {
// Error frame
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Application level error detected");
pnd->last_error = NFC_EIO;
return pnd->last_error;
} else if ((0xff == abtRxBuf[offset]) && (0xff == abtRxBuf[offset + 1])) {
// Extended frame
offset += 2;
// (abtRxBuf[offset] << 8) + abtRxBuf[offset + 1] (LEN) include TFI + (CC+1)
len = (abtRxBuf[offset] << 8) + abtRxBuf[offset + 1] - 2;
if (((abtRxBuf[offset] + abtRxBuf[offset + 1] + abtRxBuf[offset + 2]) % 256) != 0) {
// TODO: Retry
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 3;
} else {
// Normal frame
if (256 != (abtRxBuf[offset] + abtRxBuf[offset + 1])) {
// TODO: Retry
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// abtRxBuf[3] (LEN) include TFI + (CC+1)
len = abtRxBuf[offset] - 2;
offset += 2;
}
if (len > szDataLen) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to receive data: buffer too small. (szDataLen: %" PRIuPTR ", len: %" PRIuPTR ")", szDataLen, len);
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// TFI + PD0 (CC+1)
if (abtRxBuf[offset] != 0xD5) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "TFI Mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 1;
if (abtRxBuf[offset] != CHIP_DATA(pnd)->last_command + 1) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 1;
memcpy(pbtData, abtRxBuf + offset, len);
offset += len;
uint8_t btDCS = (256 - 0xD5);
btDCS -= CHIP_DATA(pnd)->last_command + 1;
for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos];
}
if (btDCS != abtRxBuf[offset]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Data checksum mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
offset += 1;
if (0x00 != abtRxBuf[offset]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame postamble mismatch");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
// The PN53x command is done and we successfully received the reply
pnd->last_error = 0;
return len;
}
int
pn53x_usb_ack(nfc_device *pnd)
{
return pn53x_usb_bulk_write(DRIVER_DATA(pnd), (uint8_t *) pn53x_ack_frame, sizeof(pn53x_ack_frame), 1000);
}
int
pn53x_usb_init(nfc_device *pnd)
{
int res = 0;
// Sometimes PN53x USB doesn't reply ACK one the first frame, so we need to send a dummy one...
//pn53x_check_communication (pnd); // Sony RC-S360 doesn't support this command for now so let's use a get_firmware_version instead:
const uint8_t abtCmd[] = { GetFirmwareVersion };
pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
// ...and we don't care about error
pnd->last_error = 0;
if (SONY_RCS360 == DRIVER_DATA(pnd)->model) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "SONY RC-S360 initialization.");
const uint8_t abtCmd2[] = { 0x18, 0x01 };
pn53x_transceive(pnd, abtCmd2, sizeof(abtCmd2), NULL, 0, -1);
pn53x_usb_ack(pnd);
}
if ((res = pn53x_init(pnd)) < 0)
return res;
if (ASK_LOGO == DRIVER_DATA(pnd)->model) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "ASK LoGO initialization.");
/* Internal registers */
/* Disable 100mA current limit, Power on Secure IC (SVDD) */
pn53x_write_register(pnd, PN53X_REG_Control_switch_rng, 0xFF, SYMBOL_CURLIMOFF | SYMBOL_SIC_SWITCH_EN | SYMBOL_RANDOM_DATAREADY);
/* Select the signal to be output on SIGOUT: Modulation signal (envelope) from the internal coder */
pn53x_write_register(pnd, PN53X_REG_CIU_TxSel, 0xFF, 0x14);
/* SFR Registers */
/* Setup push-pulls for pins from P30 to P35 */
pn53x_write_register(pnd, PN53X_SFR_P3CFGB, 0xFF, 0x37);
/*
On ASK LoGO hardware:
LEDs port bits definition:
* LED 1: bit 2 (P32)
* LED 2: bit 1 (P31)
* LED 3: bit 0 or 3 (depending of hardware revision) (P30 or P33)
* LED 4: bit 5 (P35)
Notes:
* Set logical 0 to switch LED on; logical 1 to switch LED off.
* Bit 4 should be maintained at 1 to keep RF field on.
Progressive field activation:
The ASK LoGO hardware can progressively power-up the antenna.
To use this feature we have to switch on the field by switching on
the field on PN533 (RFConfiguration) then set P34 to '1', and cut-off the
field by switching off the field on PN533 then set P34 to '0'.
*/
/* Set P30, P31, P33, P35 to logic 1 and P32, P34 to 0 logic */
/* ie. Switch LED1 on and turn off progressive field */
pn53x_write_register(pnd, PN53X_SFR_P3, 0xFF, _BV(P30) | _BV(P31) | _BV(P33) | _BV(P35));
}
return NFC_SUCCESS;
}
static int
pn53x_usb_set_property_bool(nfc_device *pnd, const nfc_property property, const bool bEnable)
{
int res = 0;
if ((res = pn53x_set_property_bool(pnd, property, bEnable)) < 0)
return res;
switch (DRIVER_DATA(pnd)->model) {
case ASK_LOGO:
if (NP_ACTIVATE_FIELD == property) {
/* Switch on/off LED2 and Progressive Field GPIO according to ACTIVATE_FIELD option */
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Switch progressive field %s", bEnable ? "On" : "Off");
if ((res = pn53x_write_register(pnd, PN53X_SFR_P3, _BV(P31) | _BV(P34), bEnable ? _BV(P34) : _BV(P31))) < 0)
return NFC_ECHIP;
}
break;
case SCM_SCL3711:
if (NP_ACTIVATE_FIELD == property) {
// Switch on/off LED according to ACTIVATE_FIELD option
if ((res = pn53x_write_register(pnd, PN53X_SFR_P3, _BV(P32), bEnable ? 0 : _BV(P32))) < 0)
return res;
}
break;
case NXP_PN531:
case NXP_PN533:
case SONY_PN531:
case SONY_RCS360:
case UNKNOWN:
// Nothing to do.
break;
}
return NFC_SUCCESS;
}
static int
pn53x_usb_abort_command(nfc_device *pnd)
{
DRIVER_DATA(pnd)->abort_flag = true;
return NFC_SUCCESS;
}
static int
pn53x_usb_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt)
{
if ((DRIVER_DATA(pnd)->model != ASK_LOGO) || (mode != N_TARGET))
return pn53x_get_supported_modulation(pnd, mode, supported_mt);
else // ASK_LOGO has no N_TARGET support
*supported_mt = no_target_support;
return NFC_SUCCESS;
}
const struct pn53x_io pn53x_usb_io = {
.send = pn53x_usb_send,
.receive = pn53x_usb_receive,
};
const struct nfc_driver pn53x_usb_driver = {
.name = PN53X_USB_DRIVER_NAME,
.scan_type = NOT_INTRUSIVE,
.scan = pn53x_usb_scan,
.open = pn53x_usb_open,
.close = pn53x_usb_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = NULL, // No secure-element support
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_usb_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_usb_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = pn53x_usb_abort_command,
.idle = pn53x_idle,
.powerdown = pn53x_PowerDown,
};
|
1060840728-lvgang
|
libnfc/drivers/pn53x_usb.c
|
C
|
lgpl
| 26,448
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tarti?re
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
* Copyright (C) 2013 Laurent Latil
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn532_i2c.c
* @brief PN532 driver using I2C bus.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "pn532_i2c.h"
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <nfc/nfc.h>
#include "drivers.h"
#include "nfc-internal.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "buses/i2c.h"
#define PN532_I2C_DRIVER_NAME "pn532_i2c"
#define LOG_CATEGORY "libnfc.driver.pn532_i2c"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
// I2C address of the PN532 chip.
#define PN532_I2C_ADDR 0x24
// Internal data structs
const struct pn53x_io pn532_i2c_io;
struct pn532_i2c_data {
i2c_device dev;
volatile bool abort_flag;
};
/* Delay for the loop waiting for READY frame (in ms) */
#define PN532_RDY_LOOP_DELAY 90
const struct timespec rdyDelay = {
.tv_sec = 0,
.tv_nsec = PN532_RDY_LOOP_DELAY * 1000 * 1000
};
/* Private Functions Prototypes */
static nfc_device *pn532_i2c_open(const nfc_context *context, const nfc_connstring connstring);
static void pn532_i2c_close(nfc_device *pnd);
static int pn532_i2c_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout);
static int pn532_i2c_ack(nfc_device *pnd);
static int pn532_i2c_abort_command(nfc_device *pnd);
static int pn532_i2c_wakeup(nfc_device *pnd);
static int pn532_i2c_wait_rdyframe(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout);
static size_t pn532_i2c_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len);
#define DRIVER_DATA(pnd) ((struct pn532_i2c_data*)(pnd->driver_data))
/**
* @brief Scan all available I2C buses to find PN532 devices.
*
* @param context NFC context.
* @param connstrings array of 'nfc_connstring' buffer (allocated by caller). It is used to store the
* connection info strings of all I2C PN532 devices found.
* @param connstrings_len length of the connstrings array.
* @return number of PN532 devices found on all I2C buses.
*/
static size_t
pn532_i2c_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
size_t device_found = 0;
i2c_device id;
char **i2cPorts = i2c_list_ports();
const char *i2cPort;
int iDevice = 0;
while ((i2cPort = i2cPorts[iDevice++])) {
id = i2c_open(i2cPort, PN532_I2C_ADDR);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Trying to find PN532 device on I2C bus %s.", i2cPort);
if ((id != INVALID_I2C_ADDRESS) && (id != INVALID_I2C_BUS)) {
nfc_connstring connstring;
snprintf(connstring, sizeof(nfc_connstring), "%s:%s", PN532_I2C_DRIVER_NAME, i2cPort);
nfc_device *pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
i2c_close(id);
iDevice = 0;
while ((i2cPort = i2cPorts[iDevice++])) {
free((void *)i2cPort);
}
free(i2cPorts);
return 0;
}
pnd->driver = &pn532_i2c_driver;
pnd->driver_data = malloc(sizeof(struct pn532_i2c_data));
if (!pnd->driver_data) {
perror("malloc");
i2c_close(id);
nfc_device_free(pnd);
iDevice = 0;
while ((i2cPort = i2cPorts[iDevice++])) {
free((void *)i2cPort);
}
free(i2cPorts);
return 0;
}
DRIVER_DATA(pnd)->dev = id;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn532_i2c_io) == NULL) {
perror("malloc");
i2c_close(DRIVER_DATA(pnd)->dev);
nfc_device_free(pnd);
iDevice = 0;
while ((i2cPort = i2cPorts[iDevice++])) {
free((void *)i2cPort);
}
free(i2cPorts);
return 0;
}
// SAMConfiguration command if needed to wakeup the chip and pn53x_SAMConfiguration check if the chip is a PN532
CHIP_DATA(pnd)->type = PN532;
// This device starts in LowVBat power mode
CHIP_DATA(pnd)->power_mode = LOWVBAT;
DRIVER_DATA(pnd)->abort_flag = false;
// Check communication using "Diagnose" command, with "Communication test" (0x00)
int res = pn53x_check_communication(pnd);
i2c_close(DRIVER_DATA(pnd)->dev);
pn53x_data_free(pnd);
nfc_device_free(pnd);
if (res < 0) {
continue;
}
memcpy(connstrings[device_found], connstring, sizeof(nfc_connstring));
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found >= connstrings_len)
break;
}
}
iDevice = 0;
while ((i2cPort = i2cPorts[iDevice++])) {
free((void *)i2cPort);
}
free(i2cPorts);
return device_found;
}
/**
* @brief Close I2C connection to the PN532 device.
*
* @param pnd pointer on the device to close.
*/
static void
pn532_i2c_close(nfc_device *pnd)
{
pn53x_idle(pnd);
i2c_close(DRIVER_DATA(pnd)->dev);
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
/**
* @brief Open an I2C connection to the PN532 device.
*
* @param context NFC context.
* @param connstring connection info to the device ( pn532_i2c:<i2c_devname> ).
* @return pointer to the device, or NULL in case of error.
*/
static nfc_device *
pn532_i2c_open(const nfc_context *context, const nfc_connstring connstring)
{
char *i2c_devname;
i2c_device i2c_dev;
nfc_device *pnd;
int connstring_decode_level = connstring_decode(connstring, PN532_I2C_DRIVER_NAME, NULL, &i2c_devname, NULL);
switch (connstring_decode_level) {
case 2:
break;
case 1:
break;
case 0:
return NULL;
}
i2c_dev = i2c_open(i2c_devname, PN532_I2C_ADDR);
if (i2c_dev == INVALID_I2C_BUS || i2c_dev == INVALID_I2C_ADDRESS) {
return NULL;
}
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
i2c_close(i2c_dev);
return NULL;
}
snprintf(pnd->name, sizeof(pnd->name), "%s:%s", PN532_I2C_DRIVER_NAME, i2c_devname);
pnd->driver_data = malloc(sizeof(struct pn532_i2c_data));
if (!pnd->driver_data) {
perror("malloc");
i2c_close(i2c_dev);
nfc_device_free(pnd);
return NULL;
}
DRIVER_DATA(pnd)->dev = i2c_dev;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn532_i2c_io) == NULL) {
perror("malloc");
i2c_close(i2c_dev);
nfc_device_free(pnd);
return NULL;
}
// SAMConfiguration command if needed to wakeup the chip and pn53x_SAMConfiguration check if the chip is a PN532
CHIP_DATA(pnd)->type = PN532;
// This device starts in LowVBat mode
CHIP_DATA(pnd)->power_mode = LOWVBAT;
// empirical tuning
CHIP_DATA(pnd)->timer_correction = 48;
pnd->driver = &pn532_i2c_driver;
DRIVER_DATA(pnd)->abort_flag = false;
// Check communication using "Diagnose" command, with "Communication test" (0x00)
if (pn53x_check_communication(pnd) < 0) {
nfc_perror(pnd, "pn53x_check_communication");
pn532_i2c_close(pnd);
return NULL;
}
pn53x_init(pnd);
return pnd;
}
static int
pn532_i2c_wakeup(nfc_device *pnd)
{
/* No specific. PN532 holds SCL during wakeup time */
CHIP_DATA(pnd)->power_mode = NORMAL; // PN532 should now be awake
return NFC_SUCCESS;
}
#define PN532_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
/**
* @brief Send data to the PN532 device.
*
* @param pnd pointer on the NFC device.
* @param pbtData buffer containing frame data.
* @param szData size of the buffer.
* @param timeout timeout before aborting the operation (in ms).
* @return NFC_SUCCESS if operation is successful, or error code.
*/
static int
pn532_i2c_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
int res = 0;
// Discard any existing data ?
switch (CHIP_DATA(pnd)->power_mode) {
case LOWVBAT: {
/** PN532C106 wakeup. */
if ((res = pn532_i2c_wakeup(pnd)) < 0) {
return res;
}
// According to PN532 application note, C106 appendix: to go out Low Vbat mode and enter in normal mode we need to send a SAMConfiguration command
if ((res = pn532_SAMConfiguration(pnd, PSM_NORMAL, 1000)) < 0) {
return res;
}
}
break;
case POWERDOWN: {
if ((res = pn532_i2c_wakeup(pnd)) < 0) {
return res;
}
}
break;
case NORMAL:
// Nothing to do :)
break;
};
uint8_t abtFrame[PN532_BUFFER_LEN] = { 0x00, 0x00, 0xff }; // Every packet must start with "00 00 ff"
size_t szFrame = 0;
if ((res = pn53x_build_frame(abtFrame, &szFrame, pbtData, szData)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
res = i2c_write(DRIVER_DATA(pnd)->dev, abtFrame, szFrame);
if (res < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
pnd->last_error = res;
return pnd->last_error;
}
uint8_t abtRxBuf[PN53x_ACK_FRAME__LEN];
// Wait for the ACK frame
res = pn532_i2c_wait_rdyframe(pnd, abtRxBuf, sizeof(abtRxBuf), timeout);
if (res < 0) {
if (res == NFC_EOPABORTED) {
// Send an ACK frame from host to abort the command.
pn532_i2c_ack(pnd);
}
pnd->last_error = res;
return pnd->last_error;
}
if (pn53x_check_ack_frame(pnd, abtRxBuf, res) == 0) {
// The PN53x is running the sent command
} else {
return pnd->last_error;
}
return NFC_SUCCESS;
}
/**
* @brief Read data from the PN532 device until getting a frame with RDY bit set
*
* @param pnd pointer on the NFC device.
* @param pbtData buffer used to store the received frame data.
* @param szDataLen allocated size of buffer.
* @param timeout timeout delay before aborting the operation (in ms). Use 0 for no timeout.
* @return length (in bytes) of the received frame, or NFC_ETIMEOUT if timeout delay has expired,
* NFC_EOPABORTED if operation has been aborted, NFC_EIO in case of IO failure
*/
static int
pn532_i2c_wait_rdyframe(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
bool done = false;
int res;
struct timeval start_tv, cur_tv;
long long duration;
// Actual I2C response frame includes an additional status byte,
// so we use a temporary buffer to read the I2C frame
uint8_t i2cRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN + 1];
if (timeout > 0) {
// If a timeout is specified, get current timestamp
gettimeofday(&start_tv, NULL);
}
do {
// Wait a little bit before reading
nanosleep(&rdyDelay, (struct timespec *) NULL);
int recCount = i2c_read(DRIVER_DATA(pnd)->dev, i2cRx, szDataLen + 1);
if (DRIVER_DATA(pnd)->abort_flag) {
// Reset abort flag
DRIVER_DATA(pnd)->abort_flag = false;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG,
"Wait for a READY frame has been aborted.");
return NFC_EOPABORTED;
}
if (recCount <= 0) {
done = true;
res = NFC_EIO;
} else {
const uint8_t rdy = i2cRx[0];
if (rdy & 1) {
int copyLength;
done = true;
res = recCount - 1;
copyLength = MIN(res, (int)szDataLen);
memcpy(pbtData, &(i2cRx[1]), copyLength);
} else {
/* Not ready yet. Check for elapsed timeout. */
if (timeout > 0) {
gettimeofday(&cur_tv, NULL);
duration = (cur_tv.tv_sec - start_tv.tv_sec) * 1000000L
+ (cur_tv.tv_usec - start_tv.tv_usec);
if (duration / 1000 > timeout) {
res = NFC_ETIMEOUT;
done = true;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG,
"timeout reached with no READY frame.");
}
}
}
}
} while (!done);
return res;
}
/**
* @brief Read a response frame from the PN532 device.
*
* @param pnd pointer on the NFC device.
* @param pbtData buffer used to store the response frame data.
* @param szDataLen allocated size of buffer.
* @param timeout timeout delay before aborting the operation (in ms). Use 0 for no timeout.
* @return length (in bytes) of the response, or NFC_ETIMEOUT if timeout delay has expired,
* NFC_EOPABORTED if operation has been aborted, NFC_EIO in case of IO failure
*/
static int
pn532_i2c_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
uint8_t frameBuf[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
int frameLength;
int TFI_idx;
size_t len;
frameLength = pn532_i2c_wait_rdyframe(pnd, frameBuf, sizeof(frameBuf), timeout);
if (NFC_EOPABORTED == pnd->last_error) {
return pn532_i2c_ack(pnd);
}
if (frameLength < 0) {
goto error;
}
const uint8_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
if (0 != (memcmp(frameBuf, pn53x_preamble, 3))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame preamble+start code mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if ((0x01 == frameBuf[3]) && (0xff == frameBuf[4])) {
uint8_t errorCode = frameBuf[5];
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Application level error detected (%d)", errorCode);
pnd->last_error = NFC_EIO;
goto error;
} else if ((0xff == frameBuf[3]) && (0xff == frameBuf[4])) {
// Extended frame
len = (frameBuf[5] << 8) + frameBuf[6];
// Verify length checksum
if (((frameBuf[5] + frameBuf[6] + frameBuf[7]) % 256) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Length checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
TFI_idx = 8;
} else {
// Normal frame
len = frameBuf[3];
// Verify length checksum
if ((uint8_t)(frameBuf[3] + frameBuf[4])) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
TFI_idx = 5;
}
if ((len - 2) > szDataLen) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to receive data: buffer too small. (szDataLen: %" PRIuPTR ", len: %" PRIuPTR ")", szDataLen, len);
pnd->last_error = NFC_EIO;
goto error;
}
uint8_t TFI = frameBuf[TFI_idx];
if (TFI != 0xD5) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "TFI Mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if (frameBuf[TFI_idx + 1] != CHIP_DATA(pnd)->last_command + 1) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Command Code verification failed. (got %d, expected %d)",
frameBuf[TFI_idx + 1], CHIP_DATA(pnd)->last_command + 1);
pnd->last_error = NFC_EIO;
goto error;
}
uint8_t DCS = frameBuf[TFI_idx + len];
uint8_t btDCS = DCS;
// Compute data checksum
for (size_t i = 0; i < len; i++) {
btDCS += frameBuf[TFI_idx + i];
}
if (btDCS != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Data checksum mismatch (DCS = %02x, btDCS = %d)", DCS, btDCS);
pnd->last_error = NFC_EIO;
goto error;
}
if (0x00 != frameBuf[TFI_idx + len + 1]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Frame postamble mismatch (got %d)", frameBuf[frameLength - 1]);
pnd->last_error = NFC_EIO;
goto error;
}
memcpy(pbtData, &frameBuf[TFI_idx + 2], len - 2);
/* The PN53x command is done and we successfully received the reply */
return len - 2;
error:
return pnd->last_error;
}
/**
* @brief Send an ACK frame to the PN532 device.
*
* @param pnd pointer on the NFC device.
* @return NFC_SUCCESS on success, otherwise an error code
*/
int
pn532_i2c_ack(nfc_device *pnd)
{
return i2c_write(DRIVER_DATA(pnd)->dev, pn53x_ack_frame, sizeof(pn53x_ack_frame));
}
/**
* @brief Abort any pending operation
*
* @param pnd pointer on the NFC device.
* @return NFC_SUCCESS
*/
static int
pn532_i2c_abort_command(nfc_device *pnd)
{
if (pnd) {
DRIVER_DATA(pnd)->abort_flag = true;
}
return NFC_SUCCESS;
}
const struct pn53x_io pn532_i2c_io = {
.send = pn532_i2c_send,
.receive = pn532_i2c_receive,
};
const struct nfc_driver pn532_i2c_driver = {
.name = PN532_I2C_DRIVER_NAME,
.scan_type = INTRUSIVE,
.scan = pn532_i2c_scan,
.open = pn532_i2c_open,
.close = pn532_i2c_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = pn532_initiator_init_secure_element,
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = pn532_i2c_abort_command,
.idle = pn53x_idle,
.powerdown = pn53x_PowerDown,
};
|
1060840728-lvgang
|
libnfc/drivers/pn532_i2c.c
|
C
|
lgpl
| 18,998
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
* Copyright (C) 2011 Anugrah Redja Kusuma
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file acr122s.c
* @brief Driver for ACS ACR122S devices
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "acr122s.h"
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <nfc/nfc.h>
#include "drivers.h"
#include "nfc-internal.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "uart.h"
#define ACR122S_DEFAULT_SPEED 9600
#define ACR122S_DRIVER_NAME "ACR122S"
#define LOG_CATEGORY "libnfc.driver.acr122s"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
// Internal data structs
struct acr122s_data {
serial_port port;
uint8_t seq;
#ifndef WIN32
int abort_fds[2];
#else
volatile bool abort_flag;
#endif
};
const struct pn53x_io acr122s_io;
#define STX 2
#define ETX 3
#define APDU_SIZE(p) ((uint32_t) (p[2] | p[3] << 8 | p[4] << 16 | p[5] << 24))
#define FRAME_OVERHEAD 13
#define FRAME_SIZE(p) (APDU_SIZE(p) + FRAME_OVERHEAD)
#define MAX_FRAME_SIZE (FRAME_OVERHEAD + 5 + 255)
enum {
ICC_POWER_ON_REQ_MSG = 0x62,
ICC_POWER_OFF_REQ_MSG = 0x63,
XFR_BLOCK_REQ_MSG = 0x6F,
ICC_POWER_ON_RES_MSG = 0x80,
ICC_POWER_OFF_RES_MSG = 0x81,
XFR_BLOCK_RES_MSG = 0x80,
};
enum {
POWER_AUTO = 0,
POWER_5_0_V = 1,
POWER_3_0_V = 2,
POWER_1_8_V = 3,
};
#pragma pack(push, 1)
struct icc_power_on_req {
uint8_t message_type;
uint32_t length;
uint8_t slot;
uint8_t seq;
uint8_t power_select;
uint8_t rfu[2];
};
struct icc_power_on_res {
uint8_t message_type;
uint32_t length;
uint8_t slot;
uint8_t seq;
uint8_t status;
uint8_t error;
uint8_t chain_parameter;
};
struct icc_power_off_req {
uint8_t message_type;
uint32_t length;
uint8_t slot;
uint8_t seq;
uint8_t rfu[3];
};
struct icc_power_off_res {
uint8_t message_type;
uint32_t length;
uint8_t slot;
uint8_t seq;
uint8_t status;
uint8_t error;
uint8_t clock_status;
};
struct xfr_block_req {
uint8_t message_type;
uint32_t length;
uint8_t slot;
uint8_t seq;
uint8_t bwi;
uint8_t rfu[2];
};
struct xfr_block_res {
uint8_t message_type;
uint32_t length;
uint8_t slot;
uint8_t seq;
uint8_t status;
uint8_t error;
uint8_t chain_parameter;
};
struct apdu_header {
uint8_t class;
uint8_t ins;
uint8_t p1;
uint8_t p2;
uint8_t length;
};
#pragma pack(pop)
#define DRIVER_DATA(pnd) ((struct acr122s_data *) (pnd->driver_data))
/**
* Fix a command frame with a valid prefix, checksum, and suffix.
*
* @param frame is command frame to fix
* @note command frame length (uint32_t at offset 2) should be valid
*/
static void
acr122s_fix_frame(uint8_t *frame)
{
size_t frame_size = FRAME_SIZE(frame);
frame[0] = STX;
frame[frame_size - 1] = ETX;
uint8_t *csum = frame + frame_size - 2;
*csum = 0;
for (uint8_t *p = frame + 1; p < csum; p++)
*csum ^= *p;
}
/**
* Send a command frame to ACR122S and check its ACK status.
*
* @param: pnd is target nfc device
* @param: cmd is command frame to send
* @param: timeout
* @return 0 if success
*/
static int
acr122s_send_frame(nfc_device *pnd, uint8_t *frame, int timeout)
{
size_t frame_size = FRAME_SIZE(frame);
uint8_t ack[4];
uint8_t positive_ack[4] = { STX, 0, 0, ETX };
serial_port port = DRIVER_DATA(pnd)->port;
int ret;
void *abort_p;
#ifndef WIN32
abort_p = &(DRIVER_DATA(pnd)->abort_fds[1]);
#else
abort_p = &(DRIVER_DATA(pnd)->abort_flag);
#endif
if ((ret = uart_send(port, frame, frame_size, timeout)) < 0)
return ret;
if ((ret = uart_receive(port, ack, 4, abort_p, timeout)) < 0)
return ret;
if (memcmp(ack, positive_ack, 4) != 0) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
struct xfr_block_req *req = (struct xfr_block_req *) &frame[1];
DRIVER_DATA(pnd)->seq = req->seq + 1;
return 0;
}
/**
* Receive response frame after a successfull acr122s_send_command().
*
* @param: pnd is target nfc device
* @param: frame is buffer where received response frame will be stored
* @param: frame_size is frame size
* @param: abort_p
* @param: timeout
* @note returned frame size can be fetched using FRAME_SIZE macro
*
* @return 0 if success
*/
static int
acr122s_recv_frame(nfc_device *pnd, uint8_t *frame, size_t frame_size, void *abort_p, int timeout)
{
if (frame_size < 13) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
int ret;
serial_port port = DRIVER_DATA(pnd)->port;
if ((ret = uart_receive(port, frame, 11, abort_p, timeout)) != 0)
return ret;
// Is buffer sufficient to store response?
if (frame_size < FRAME_SIZE(frame)) {
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
size_t remaining = FRAME_SIZE(frame) - 11;
if ((ret = uart_receive(port, frame + 11, remaining, abort_p, timeout)) != 0)
return ret;
struct xfr_block_res *res = (struct xfr_block_res *) &frame[1];
if ((uint8_t)(res->seq + 1) != DRIVER_DATA(pnd)->seq) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Invalid response sequence number.");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
return 0;
}
#define APDU_OVERHEAD (FRAME_OVERHEAD + 5)
/**
* Convert host uint32 to litle endian uint32
*/
static uint32_t
le32(uint32_t val)
{
uint32_t res;
uint8_t *p = (uint8_t *) &res;
p[0] = val;
p[1] = val >> 8;
p[2] = val >> 16;
p[3] = val >> 24;
return res;
}
/**
* Build an ACR122S command frame from a PN532 command.
*
* @param pnd is device for which the command frame will be generated
* @param frame is where the resulting command frame will be generated
* @param frame_size is the passed command frame size
* @param p1
* @param p2
* @param data is PN532 APDU data without the direction prefix (0xD4)
* @param data_size is APDU data size
* @param should_prefix 1 if prefix 0xD4 should be inserted before APDU data, 0 if not
*
* @return true if frame built successfully
*/
static bool
acr122s_build_frame(nfc_device *pnd,
uint8_t *frame, size_t frame_size, uint8_t p1, uint8_t p2,
const uint8_t *data, size_t data_size, int should_prefix)
{
if (frame_size < data_size + APDU_OVERHEAD + should_prefix)
return false;
if (data_size + should_prefix > 255)
return false;
if (data == NULL)
return false;
struct xfr_block_req *req = (struct xfr_block_req *) &frame[1];
req->message_type = XFR_BLOCK_REQ_MSG;
req->length = le32(5 + data_size + should_prefix);
req->slot = 0;
req->seq = DRIVER_DATA(pnd)->seq;
req->bwi = 0;
req->rfu[0] = 0;
req->rfu[1] = 0;
struct apdu_header *header = (struct apdu_header *) &frame[11];
header->class = 0xff;
header->ins = 0;
header->p1 = p1;
header->p2 = p2;
header->length = data_size + should_prefix;
uint8_t *buf = (uint8_t *) &frame[16];
if (should_prefix)
*buf++ = 0xD4;
memcpy(buf, data, data_size);
acr122s_fix_frame(frame);
return true;
}
static int
acr122s_activate_sam(nfc_device *pnd)
{
uint8_t cmd[13];
memset(cmd, 0, sizeof(cmd));
cmd[1] = ICC_POWER_ON_REQ_MSG;
acr122s_fix_frame(cmd);
uint8_t resp[MAX_FRAME_SIZE];
int ret;
if ((ret = acr122s_send_frame(pnd, cmd, 0)) != 0)
return ret;
if ((ret = acr122s_recv_frame(pnd, resp, MAX_FRAME_SIZE, 0, 0)) != 0)
return ret;
CHIP_DATA(pnd)->power_mode = NORMAL;
return 0;
}
static int
acr122s_deactivate_sam(nfc_device *pnd)
{
uint8_t cmd[13];
memset(cmd, 0, sizeof(cmd));
cmd[1] = ICC_POWER_OFF_REQ_MSG;
acr122s_fix_frame(cmd);
uint8_t resp[MAX_FRAME_SIZE];
int ret;
if ((ret = acr122s_send_frame(pnd, cmd, 0)) != 0)
return ret;
if ((ret = acr122s_recv_frame(pnd, resp, MAX_FRAME_SIZE, 0, 0)) != 0)
return ret;
CHIP_DATA(pnd)->power_mode = LOWVBAT;
return 0;
}
static int
acr122s_get_firmware_version(nfc_device *pnd, char *version, size_t length)
{
int ret;
uint8_t cmd[MAX_FRAME_SIZE];
if (! acr122s_build_frame(pnd, cmd, sizeof(cmd), 0x48, 0, NULL, 0, 0)) {
return NFC_EINVARG;
}
if ((ret = acr122s_send_frame(pnd, cmd, 1000)) != 0)
return ret;
if ((ret = acr122s_recv_frame(pnd, cmd, sizeof(cmd), 0, 0)) != 0)
return ret;
size_t len = APDU_SIZE(cmd);
if (len + 1 > length)
len = length - 1;
memcpy(version, cmd + 11, len);
version[len] = 0;
return 0;
}
struct acr122s_descriptor {
char *port;
uint32_t speed;
};
static size_t
acr122s_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
size_t device_found = 0;
serial_port sp;
char **acPorts = uart_list_ports();
const char *acPort;
int iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
sp = uart_open(acPort);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Trying to find ACR122S device on serial port: %s at %d baud.", acPort, ACR122S_DEFAULT_SPEED);
if ((sp != INVALID_SERIAL_PORT) && (sp != CLAIMED_SERIAL_PORT)) {
// We need to flush input to be sure first reply does not comes from older byte transceive
uart_flush_input(sp, true);
uart_set_speed(sp, ACR122S_DEFAULT_SPEED);
nfc_connstring connstring;
snprintf(connstring, sizeof(nfc_connstring), "%s:%s:%"PRIu32, ACR122S_DRIVER_NAME, acPort, ACR122S_DEFAULT_SPEED);
nfc_device *pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
uart_close(sp);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
pnd->driver = &acr122s_driver;
pnd->driver_data = malloc(sizeof(struct acr122s_data));
if (!pnd->driver_data) {
perror("malloc");
uart_close(sp);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
DRIVER_DATA(pnd)->port = sp;
DRIVER_DATA(pnd)->seq = 0;
#ifndef WIN32
if (pipe(DRIVER_DATA(pnd)->abort_fds) < 0) {
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
if (pn53x_data_new(pnd, &acr122s_io) == NULL) {
perror("malloc");
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
CHIP_DATA(pnd)->type = PN532;
CHIP_DATA(pnd)->power_mode = NORMAL;
char version[32];
int ret = acr122s_get_firmware_version(pnd, version, sizeof(version));
if (ret == 0 && strncmp("ACR122S", version, 7) != 0) {
ret = -1;
}
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
if (ret != 0)
continue;
// ACR122S reader is found
memcpy(connstrings[device_found], connstring, sizeof(nfc_connstring));
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found >= connstrings_len)
break;
}
}
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return device_found;
}
static void
acr122s_close(nfc_device *pnd)
{
acr122s_deactivate_sam(pnd);
pn53x_idle(pnd);
uart_close(DRIVER_DATA(pnd)->port);
#ifndef WIN32
// Release file descriptors used for abort mecanism
close(DRIVER_DATA(pnd)->abort_fds[0]);
close(DRIVER_DATA(pnd)->abort_fds[1]);
#endif
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
static nfc_device *
acr122s_open(const nfc_context *context, const nfc_connstring connstring)
{
serial_port sp;
nfc_device *pnd;
struct acr122s_descriptor ndd;
char *speed_s;
int connstring_decode_level = connstring_decode(connstring, ACR122S_DRIVER_NAME, NULL, &ndd.port, &speed_s);
if (connstring_decode_level == 3) {
ndd.speed = 0;
if (sscanf(speed_s, "%10"PRIu32, &ndd.speed) != 1) {
// speed_s is not a number
free(ndd.port);
free(speed_s);
return NULL;
}
free(speed_s);
}
if (connstring_decode_level < 2) {
return NULL;
}
if (connstring_decode_level < 3) {
ndd.speed = ACR122S_DEFAULT_SPEED;
}
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG,
"Attempt to connect to: %s at %d baud.", ndd.port, ndd.speed);
sp = uart_open(ndd.port);
if (sp == INVALID_SERIAL_PORT) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR,
"Invalid serial port: %s", ndd.port);
free(ndd.port);
return NULL;
}
if (sp == CLAIMED_SERIAL_PORT) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR,
"Serial port already claimed: %s", ndd.port);
free(ndd.port);
return NULL;
}
uart_flush_input(sp, true);
uart_set_speed(sp, ndd.speed);
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
free(ndd.port);
uart_close(sp);
return NULL;
}
pnd->driver = &acr122s_driver;
strcpy(pnd->name, ACR122S_DRIVER_NAME);
free(ndd.port);
pnd->driver_data = malloc(sizeof(struct acr122s_data));
if (!pnd->driver_data) {
perror("malloc");
uart_close(sp);
nfc_device_free(pnd);
return NULL;
}
DRIVER_DATA(pnd)->port = sp;
DRIVER_DATA(pnd)->seq = 0;
#ifndef WIN32
if (pipe(DRIVER_DATA(pnd)->abort_fds) < 0) {
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
return NULL;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
if (pn53x_data_new(pnd, &acr122s_io) == NULL) {
perror("malloc");
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
return NULL;
}
CHIP_DATA(pnd)->type = PN532;
#if 1
// Retrieve firmware version
char version[DEVICE_NAME_LENGTH];
if (acr122s_get_firmware_version(pnd, version, sizeof(version)) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Cannot get reader firmware.");
acr122s_close(pnd);
return NULL;
}
if (strncmp(version, "ACR122S", 7) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Invalid firmware version: %s",
version);
acr122s_close(pnd);
return NULL;
}
snprintf(pnd->name, sizeof(pnd->name), "%s", version);
// Activate SAM before operating
if (acr122s_activate_sam(pnd) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Cannot activate SAM.");
acr122s_close(pnd);
return NULL;
}
#endif
if (pn53x_init(pnd) < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Failed initializing PN532 chip.");
acr122s_close(pnd);
return NULL;
}
return pnd;
}
static int
acr122s_send(nfc_device *pnd, const uint8_t *buf, const size_t buf_len, int timeout)
{
uart_flush_input(DRIVER_DATA(pnd)->port, false);
uint8_t cmd[MAX_FRAME_SIZE];
if (! acr122s_build_frame(pnd, cmd, sizeof(cmd), 0, 0, buf, buf_len, 1)) {
return NFC_EINVARG;
}
int ret;
if ((ret = acr122s_send_frame(pnd, cmd, timeout)) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
pnd->last_error = ret;
return pnd->last_error;
}
return NFC_SUCCESS;
}
static int
acr122s_receive(nfc_device *pnd, uint8_t *buf, size_t buf_len, int timeout)
{
void *abort_p;
#ifndef WIN32
abort_p = &(DRIVER_DATA(pnd)->abort_fds[1]);
#else
abort_p = &(DRIVER_DATA(pnd)->abort_flag);
#endif
uint8_t tmp[MAX_FRAME_SIZE];
pnd->last_error = acr122s_recv_frame(pnd, tmp, sizeof(tmp), abort_p, timeout);
if (abort_p && (NFC_EOPABORTED == pnd->last_error)) {
pnd->last_error = NFC_EOPABORTED;
return pnd->last_error;
}
if (pnd->last_error < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
return -1;
}
size_t data_len = FRAME_SIZE(tmp) - 17;
if (data_len > buf_len) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Receive buffer too small. (buf_len: %" PRIuPTR ", data_len: %" PRIuPTR ")", buf_len, data_len);
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
memcpy(buf, tmp + 13, data_len);
return data_len;
}
static int
acr122s_abort_command(nfc_device *pnd)
{
if (pnd) {
#ifndef WIN32
close(DRIVER_DATA(pnd)->abort_fds[0]);
close(DRIVER_DATA(pnd)->abort_fds[1]);
if (pipe(DRIVER_DATA(pnd)->abort_fds) < 0) {
return NFC_ESOFT;
}
#else
DRIVER_DATA(pnd)->abort_flag = true;
#endif
}
return NFC_SUCCESS;
}
const struct pn53x_io acr122s_io = {
.send = acr122s_send,
.receive = acr122s_receive,
};
const struct nfc_driver acr122s_driver = {
.name = ACR122S_DRIVER_NAME,
.scan_type = INTRUSIVE,
.scan = acr122s_scan,
.open = acr122s_open,
.close = acr122s_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = NULL, // No secure-element support
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = acr122s_abort_command,
.idle = pn53x_idle,
/* Even if PN532, PowerDown is not recommended on those devices */
.powerdown = NULL,
};
|
1060840728-lvgang
|
libnfc/drivers/acr122s.c
|
C
|
lgpl
| 19,716
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file acr122s.h
* @brief Driver for ACS ACR122S devices
*/
#ifndef __NFC_DRIVER_ACR122S_H__
#define __NFC_DRIVER_ACR122S_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver acr122s_driver;
#endif
|
1060840728-lvgang
|
libnfc/drivers/acr122s.h
|
C
|
lgpl
| 1,301
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn532_uart.c
* @brief PN532 driver using UART bus (UART, RS232, etc.)
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include "pn532_uart.h"
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <unistd.h>
#include <nfc/nfc.h>
#include "drivers.h"
#include "nfc-internal.h"
#include "chips/pn53x.h"
#include "chips/pn53x-internal.h"
#include "uart.h"
#define PN532_UART_DEFAULT_SPEED 115200
#define PN532_UART_DRIVER_NAME "pn532_uart"
#define LOG_CATEGORY "libnfc.driver.pn532_uart"
#define LOG_GROUP NFC_LOG_GROUP_DRIVER
// Internal data structs
const struct pn53x_io pn532_uart_io;
struct pn532_uart_data {
serial_port port;
#ifndef WIN32
int iAbortFds[2];
#else
volatile bool abort_flag;
#endif
};
// Prototypes
int pn532_uart_ack(nfc_device *pnd);
int pn532_uart_wakeup(nfc_device *pnd);
#define DRIVER_DATA(pnd) ((struct pn532_uart_data*)(pnd->driver_data))
static size_t
pn532_uart_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
size_t device_found = 0;
serial_port sp;
char **acPorts = uart_list_ports();
const char *acPort;
int iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
sp = uart_open(acPort);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Trying to find PN532 device on serial port: %s at %d baud.", acPort, PN532_UART_DEFAULT_SPEED);
if ((sp != INVALID_SERIAL_PORT) && (sp != CLAIMED_SERIAL_PORT)) {
// We need to flush input to be sure first reply does not comes from older byte transceive
uart_flush_input(sp, true);
// Serial port claimed but we need to check if a PN532_UART is opened.
uart_set_speed(sp, PN532_UART_DEFAULT_SPEED);
nfc_connstring connstring;
snprintf(connstring, sizeof(nfc_connstring), "%s:%s:%"PRIu32, PN532_UART_DRIVER_NAME, acPort, PN532_UART_DEFAULT_SPEED);
nfc_device *pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
uart_close(sp);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
pnd->driver = &pn532_uart_driver;
pnd->driver_data = malloc(sizeof(struct pn532_uart_data));
if (!pnd->driver_data) {
perror("malloc");
uart_close(sp);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
DRIVER_DATA(pnd)->port = sp;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn532_uart_io) == NULL) {
perror("malloc");
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
// SAMConfiguration command if needed to wakeup the chip and pn53x_SAMConfiguration check if the chip is a PN532
CHIP_DATA(pnd)->type = PN532;
// This device starts in LowVBat power mode
CHIP_DATA(pnd)->power_mode = LOWVBAT;
#ifndef WIN32
// pipe-based abort mecanism
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return 0;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
// Check communication using "Diagnose" command, with "Communication test" (0x00)
int res = pn53x_check_communication(pnd);
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
if (res < 0) {
continue;
}
memcpy(connstrings[device_found], connstring, sizeof(nfc_connstring));
device_found++;
// Test if we reach the maximum "wanted" devices
if (device_found >= connstrings_len)
break;
}
}
iDevice = 0;
while ((acPort = acPorts[iDevice++])) {
free((void *)acPort);
}
free(acPorts);
return device_found;
}
struct pn532_uart_descriptor {
char *port;
uint32_t speed;
};
static void
pn532_uart_close(nfc_device *pnd)
{
pn53x_idle(pnd);
// Release UART port
uart_close(DRIVER_DATA(pnd)->port);
#ifndef WIN32
// Release file descriptors used for abort mecanism
close(DRIVER_DATA(pnd)->iAbortFds[0]);
close(DRIVER_DATA(pnd)->iAbortFds[1]);
#endif
pn53x_data_free(pnd);
nfc_device_free(pnd);
}
static nfc_device *
pn532_uart_open(const nfc_context *context, const nfc_connstring connstring)
{
struct pn532_uart_descriptor ndd;
char *speed_s;
int connstring_decode_level = connstring_decode(connstring, PN532_UART_DRIVER_NAME, NULL, &ndd.port, &speed_s);
if (connstring_decode_level == 3) {
ndd.speed = 0;
if (sscanf(speed_s, "%10"PRIu32, &ndd.speed) != 1) {
// speed_s is not a number
free(ndd.port);
free(speed_s);
return NULL;
}
free(speed_s);
}
if (connstring_decode_level < 2) {
return NULL;
}
if (connstring_decode_level < 3) {
ndd.speed = PN532_UART_DEFAULT_SPEED;
}
serial_port sp;
nfc_device *pnd = NULL;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Attempt to open: %s at %d baud.", ndd.port, ndd.speed);
sp = uart_open(ndd.port);
if (sp == INVALID_SERIAL_PORT)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Invalid serial port: %s", ndd.port);
if (sp == CLAIMED_SERIAL_PORT)
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Serial port already claimed: %s", ndd.port);
if ((sp == CLAIMED_SERIAL_PORT) || (sp == INVALID_SERIAL_PORT)) {
free(ndd.port);
return NULL;
}
// We need to flush input to be sure first reply does not comes from older byte transceive
uart_flush_input(sp, true);
uart_set_speed(sp, ndd.speed);
// We have a connection
pnd = nfc_device_new(context, connstring);
if (!pnd) {
perror("malloc");
free(ndd.port);
uart_close(sp);
return NULL;
}
snprintf(pnd->name, sizeof(pnd->name), "%s:%s", PN532_UART_DRIVER_NAME, ndd.port);
free(ndd.port);
pnd->driver_data = malloc(sizeof(struct pn532_uart_data));
if (!pnd->driver_data) {
perror("malloc");
uart_close(sp);
nfc_device_free(pnd);
return NULL;
}
DRIVER_DATA(pnd)->port = sp;
// Alloc and init chip's data
if (pn53x_data_new(pnd, &pn532_uart_io) == NULL) {
perror("malloc");
uart_close(DRIVER_DATA(pnd)->port);
nfc_device_free(pnd);
return NULL;
}
// SAMConfiguration command if needed to wakeup the chip and pn53x_SAMConfiguration check if the chip is a PN532
CHIP_DATA(pnd)->type = PN532;
// This device starts in LowVBat mode
CHIP_DATA(pnd)->power_mode = LOWVBAT;
// empirical tuning
CHIP_DATA(pnd)->timer_correction = 48;
pnd->driver = &pn532_uart_driver;
#ifndef WIN32
// pipe-based abort mecanism
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
uart_close(DRIVER_DATA(pnd)->port);
pn53x_data_free(pnd);
nfc_device_free(pnd);
return NULL;
}
#else
DRIVER_DATA(pnd)->abort_flag = false;
#endif
// Check communication using "Diagnose" command, with "Communication test" (0x00)
if (pn53x_check_communication(pnd) < 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "pn53x_check_communication error");
pn532_uart_close(pnd);
return NULL;
}
pn53x_init(pnd);
return pnd;
}
int
pn532_uart_wakeup(nfc_device *pnd)
{
/* High Speed Unit (HSU) wake up consist to send 0x55 and wait a "long" delay for PN532 being wakeup. */
const uint8_t pn532_wakeup_preamble[] = { 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
int res = uart_send(DRIVER_DATA(pnd)->port, pn532_wakeup_preamble, sizeof(pn532_wakeup_preamble), 0);
CHIP_DATA(pnd)->power_mode = NORMAL; // PN532 should now be awake
return res;
}
#define PN532_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
static int
pn532_uart_send(nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
int res = 0;
// Before sending anything, we need to discard from any junk bytes
uart_flush_input(DRIVER_DATA(pnd)->port, false);
switch (CHIP_DATA(pnd)->power_mode) {
case LOWVBAT: {
/** PN532C106 wakeup. */
if ((res = pn532_uart_wakeup(pnd)) < 0) {
return res;
}
// According to PN532 application note, C106 appendix: to go out Low Vbat mode and enter in normal mode we need to send a SAMConfiguration command
if ((res = pn532_SAMConfiguration(pnd, PSM_NORMAL, 1000)) < 0) {
return res;
}
}
break;
case POWERDOWN: {
if ((res = pn532_uart_wakeup(pnd)) < 0) {
return res;
}
}
break;
case NORMAL:
// Nothing to do :)
break;
};
uint8_t abtFrame[PN532_BUFFER_LEN] = { 0x00, 0x00, 0xff }; // Every packet must start with "00 00 ff"
size_t szFrame = 0;
if ((res = pn53x_build_frame(abtFrame, &szFrame, pbtData, szData)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
res = uart_send(DRIVER_DATA(pnd)->port, abtFrame, szFrame, timeout);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to transmit data. (TX)");
pnd->last_error = res;
return pnd->last_error;
}
uint8_t abtRxBuf[PN53x_ACK_FRAME__LEN];
res = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, sizeof(abtRxBuf), 0, timeout);
if (res != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "Unable to read ACK");
pnd->last_error = res;
return pnd->last_error;
}
if (pn53x_check_ack_frame(pnd, abtRxBuf, sizeof(abtRxBuf)) == 0) {
// The PN53x is running the sent command
} else {
return pnd->last_error;
}
return NFC_SUCCESS;
}
static int
pn532_uart_receive(nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
uint8_t abtRxBuf[5];
size_t len;
void *abort_p = NULL;
#ifndef WIN32
abort_p = &(DRIVER_DATA(pnd)->iAbortFds[1]);
#else
abort_p = (void *) & (DRIVER_DATA(pnd)->abort_flag);
#endif
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 5, abort_p, timeout);
if (abort_p && (NFC_EOPABORTED == pnd->last_error)) {
pn532_uart_ack(pnd);
return NFC_EOPABORTED;
}
if (pnd->last_error < 0) {
goto error;
}
const uint8_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
if (0 != (memcmp(abtRxBuf, pn53x_preamble, 3))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame preamble+start code mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if ((0x01 == abtRxBuf[3]) && (0xff == abtRxBuf[4])) {
// Error frame
uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 3, 0, timeout);
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Application level error detected");
pnd->last_error = NFC_EIO;
goto error;
} else if ((0xff == abtRxBuf[3]) && (0xff == abtRxBuf[4])) {
// Extended frame
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 3, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
// (abtRxBuf[0] << 8) + abtRxBuf[1] (LEN) include TFI + (CC+1)
len = (abtRxBuf[0] << 8) + abtRxBuf[1] - 2;
if (((abtRxBuf[0] + abtRxBuf[1] + abtRxBuf[2]) % 256) != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
} else {
// Normal frame
if (256 != (abtRxBuf[3] + abtRxBuf[4])) {
// TODO: Retry
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Length checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
// abtRxBuf[3] (LEN) include TFI + (CC+1)
len = abtRxBuf[3] - 2;
}
if (len > szDataLen) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to receive data: buffer too small. (szDataLen: %" PRIuPTR ", len: %" PRIuPTR ")", szDataLen, len);
pnd->last_error = NFC_EIO;
goto error;
}
// TFI + PD0 (CC+1)
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 2, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
if (abtRxBuf[0] != 0xD5) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "TFI Mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if (abtRxBuf[1] != CHIP_DATA(pnd)->last_command + 1) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Command Code verification failed");
pnd->last_error = NFC_EIO;
goto error;
}
if (len) {
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, pbtData, len, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
}
pnd->last_error = uart_receive(DRIVER_DATA(pnd)->port, abtRxBuf, 2, 0, timeout);
if (pnd->last_error != 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unable to receive data. (RX)");
goto error;
}
uint8_t btDCS = (256 - 0xD5);
btDCS -= CHIP_DATA(pnd)->last_command + 1;
for (size_t szPos = 0; szPos < len; szPos++) {
btDCS -= pbtData[szPos];
}
if (btDCS != abtRxBuf[0]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Data checksum mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
if (0x00 != abtRxBuf[1]) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Frame postamble mismatch");
pnd->last_error = NFC_EIO;
goto error;
}
// The PN53x command is done and we successfully received the reply
return len;
error:
uart_flush_input(DRIVER_DATA(pnd)->port, true);
return pnd->last_error;
}
int
pn532_uart_ack(nfc_device *pnd)
{
if (POWERDOWN == CHIP_DATA(pnd)->power_mode) {
int res = 0;
if ((res = pn532_uart_wakeup(pnd)) < 0) {
return res;
}
}
return (uart_send(DRIVER_DATA(pnd)->port, pn53x_ack_frame, sizeof(pn53x_ack_frame), 0));
}
static int
pn532_uart_abort_command(nfc_device *pnd)
{
if (pnd) {
#ifndef WIN32
close(DRIVER_DATA(pnd)->iAbortFds[0]);
if (pipe(DRIVER_DATA(pnd)->iAbortFds) < 0) {
return NFC_ESOFT;
}
#else
DRIVER_DATA(pnd)->abort_flag = true;
#endif
}
return NFC_SUCCESS;
}
const struct pn53x_io pn532_uart_io = {
.send = pn532_uart_send,
.receive = pn532_uart_receive,
};
const struct nfc_driver pn532_uart_driver = {
.name = PN532_UART_DRIVER_NAME,
.scan_type = INTRUSIVE,
.scan = pn532_uart_scan,
.open = pn532_uart_open,
.close = pn532_uart_close,
.strerror = pn53x_strerror,
.initiator_init = pn53x_initiator_init,
.initiator_init_secure_element = pn532_initiator_init_secure_element,
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
.initiator_poll_target = pn53x_initiator_poll_target,
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
.initiator_deselect_target = pn53x_initiator_deselect_target,
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
.initiator_target_is_present = pn53x_initiator_target_is_present,
.target_init = pn53x_target_init,
.target_send_bytes = pn53x_target_send_bytes,
.target_receive_bytes = pn53x_target_receive_bytes,
.target_send_bits = pn53x_target_send_bits,
.target_receive_bits = pn53x_target_receive_bits,
.device_set_property_bool = pn53x_set_property_bool,
.device_set_property_int = pn53x_set_property_int,
.get_supported_modulation = pn53x_get_supported_modulation,
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
.device_get_information_about = pn53x_get_information_about,
.abort_command = pn532_uart_abort_command,
.idle = pn53x_idle,
.powerdown = pn53x_PowerDown,
};
|
1060840728-lvgang
|
libnfc/drivers/pn532_uart.c
|
C
|
lgpl
| 17,837
|
# set the include path found by configure
AM_CPPFLAGS = $(all_includes) $(LIBNFC_CFLAGS)
noinst_LTLIBRARIES = libnfcdrivers.la
libnfcdrivers_la_SOURCES =
libnfcdrivers_la_CFLAGS = @DRIVERS_CFLAGS@ -I$(top_srcdir)/libnfc -I$(top_srcdir)/libnfc/buses
libnfcdrivers_la_LIBADD =
if DRIVER_ACR122_PCSC_ENABLED
libnfcdrivers_la_SOURCES += acr122_pcsc.c acr122_pcsc.h
endif
if DRIVER_ACR122_USB_ENABLED
libnfcdrivers_la_SOURCES += acr122_usb.c acr122_usb.h
endif
if DRIVER_ACR122S_ENABLED
libnfcdrivers_la_SOURCES += acr122s.c acr122s.h
endif
if DRIVER_ARYGON_ENABLED
libnfcdrivers_la_SOURCES += arygon.c arygon.h
endif
if DRIVER_PN53X_USB_ENABLED
libnfcdrivers_la_SOURCES += pn53x_usb.c pn53x_usb.h
endif
if DRIVER_PN532_UART_ENABLED
libnfcdrivers_la_SOURCES += pn532_uart.c pn532_uart.h
endif
if DRIVER_PN532_SPI_ENABLED
libnfcdrivers_la_SOURCES += pn532_spi.c pn532_spi.h
endif
if DRIVER_PN532_I2C_ENABLED
libnfcdrivers_la_SOURCES += pn532_i2c.c pn532_i2c.h
endif
if PCSC_ENABLED
libnfcdrivers_la_CFLAGS += @libpcsclite_CFLAGS@
libnfcdrivers_la_LIBADD += @libpcsclite_LIBS@
endif
if LIBUSB_ENABLED
libnfcdrivers_la_CFLAGS += @libusb_CFLAGS@
libnfcdrivers_la_LIBADD += @libusb_LIBS@
endif
|
1060840728-lvgang
|
libnfc/drivers/Makefile.am
|
Makefile
|
lgpl
| 1,206
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn53x_usb.h
* @brief Drive for PN53x USB devices
*/
#ifndef __NFC_DRIVER_PN53X_USB_H__
#define __NFC_DRIVER_PN53X_USB_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver pn53x_usb_driver;
#endif // ! __NFC_DRIVER_PN53X_USB_H__
|
1060840728-lvgang
|
libnfc/drivers/pn53x_usb.h
|
C
|
lgpl
| 1,338
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file acr122_usb.h
* @brief Driver for ACR122 devices using direct USB connection (without PCSC)
*/
#ifndef __NFC_DRIVER_ACR122_USB_H__
#define __NFC_DRIVER_ACR122_USB_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver acr122_usb_driver;
#endif // ! __NFC_DRIVER_ACR122_USB_H__
|
1060840728-lvgang
|
libnfc/drivers/acr122_usb.h
|
C
|
lgpl
| 1,384
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file acr122_pcsc.h
* @brief Driver for ACR122 devices (behind PC/SC daemon)
*/
#ifndef __NFC_DRIVER_ACR122_PCSC_H__
#define __NFC_DRIVER_ACR122_PCSC_H__
#include <nfc/nfc-types.h>
extern const struct nfc_driver acr122_pcsc_driver;
#endif // ! __NFC_DRIVER_ACR122_PCSC_H__
|
1060840728-lvgang
|
libnfc/drivers/acr122_pcsc.h
|
C
|
lgpl
| 1,368
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file iso14443-subr.c
* @brief Defines some function extracted for ISO/IEC 14443
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include <stdio.h>
#include <string.h>
#include <nfc/nfc.h>
#include "nfc-internal.h"
/**
* @brief CRC_A
*
*/
void
iso14443a_crc(uint8_t *pbtData, size_t szLen, uint8_t *pbtCrc)
{
uint8_t bt;
uint32_t wCrc = 0x6363;
do {
bt = *pbtData++;
bt = (bt ^ (uint8_t)(wCrc & 0x00FF));
bt = (bt ^ (bt << 4));
wCrc = (wCrc >> 8) ^ ((uint32_t) bt << 8) ^ ((uint32_t) bt << 3) ^ ((uint32_t) bt >> 4);
} while (--szLen);
*pbtCrc++ = (uint8_t)(wCrc & 0xFF);
*pbtCrc = (uint8_t)((wCrc >> 8) & 0xFF);
}
/**
* @brief Append CRC_A
*
*/
void
iso14443a_crc_append(uint8_t *pbtData, size_t szLen)
{
iso14443a_crc(pbtData, szLen, pbtData + szLen);
}
/**
* @brief CRC_B
*
*/
void
iso14443b_crc(uint8_t *pbtData, size_t szLen, uint8_t *pbtCrc)
{
uint8_t bt;
uint32_t wCrc = 0xFFFF;
do {
bt = *pbtData++;
bt = (bt ^ (uint8_t)(wCrc & 0x00FF));
bt = (bt ^ (bt << 4));
wCrc = (wCrc >> 8) ^ ((uint32_t) bt << 8) ^ ((uint32_t) bt << 3) ^ ((uint32_t) bt >> 4);
} while (--szLen);
wCrc = ~wCrc;
*pbtCrc++ = (uint8_t)(wCrc & 0xFF);
*pbtCrc = (uint8_t)((wCrc >> 8) & 0xFF);
}
/**
* @brief Append CRC_B
*
*/
void
iso14443b_crc_append(uint8_t *pbtData, size_t szLen)
{
iso14443b_crc(pbtData, szLen, pbtData + szLen);
}
/**
* @brief Locate historical bytes
* @see ISO/IEC 14443-4 (5.2.7 Historical bytes)
*/
uint8_t *
iso14443a_locate_historical_bytes(uint8_t *pbtAts, size_t szAts, size_t *pszTk)
{
if (szAts) {
size_t offset = 1;
if (pbtAts[0] & 0x10) { // TA
offset++;
}
if (pbtAts[0] & 0x20) { // TB
offset++;
}
if (pbtAts[0] & 0x40) { // TC
offset++;
}
if (szAts > offset) {
*pszTk = (szAts - offset);
return (pbtAts + offset);
}
}
*pszTk = 0;
return NULL;
}
/**
* @brief Add cascade tags (0x88) in UID
* @see ISO/IEC 14443-3 (6.4.4 UID contents and cascade levels)
*/
void
iso14443_cascade_uid(const uint8_t abtUID[], const size_t szUID, uint8_t *pbtCascadedUID, size_t *pszCascadedUID)
{
switch (szUID) {
case 7:
pbtCascadedUID[0] = 0x88;
memcpy(pbtCascadedUID + 1, abtUID, 7);
*pszCascadedUID = 8;
break;
case 10:
pbtCascadedUID[0] = 0x88;
memcpy(pbtCascadedUID + 1, abtUID, 3);
pbtCascadedUID[4] = 0x88;
memcpy(pbtCascadedUID + 5, abtUID + 3, 7);
*pszCascadedUID = 12;
break;
case 4:
default:
memcpy(pbtCascadedUID, abtUID, szUID);
*pszCascadedUID = szUID;
break;
}
}
|
1060840728-lvgang
|
libnfc/iso14443-subr.c
|
C
|
lgpl
| 3,747
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn53x.c
* @brief PN531, PN532 and PN533 common functions
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include "nfc/nfc.h"
#include "nfc-internal.h"
#include "pn53x.h"
#include "pn53x-internal.h"
#include "mirror-subr.h"
#define LOG_CATEGORY "libnfc.chip.pn53x"
#define LOG_GROUP NFC_LOG_GROUP_CHIP
const uint8_t pn53x_ack_frame[] = { 0x00, 0x00, 0xff, 0x00, 0xff, 0x00 };
const uint8_t pn53x_nack_frame[] = { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 };
static const uint8_t pn53x_error_frame[] = { 0x00, 0x00, 0xff, 0x01, 0xff, 0x7f, 0x81, 0x00 };
const nfc_baud_rate pn532_iso14443a_supported_baud_rates[] = { NBR_424, NBR_212, NBR_106, 0 };
const nfc_baud_rate pn533_iso14443a_supported_baud_rates[] = { NBR_847, NBR_424, NBR_212, NBR_106, 0 };
const nfc_baud_rate pn53x_felica_supported_baud_rates[] = { NBR_424, NBR_212, 0 };
const nfc_baud_rate pn53x_dep_supported_baud_rates[] = { NBR_424, NBR_212, NBR_106, 0 };
const nfc_baud_rate pn53x_jewel_supported_baud_rates[] = { NBR_106, 0 };
const nfc_baud_rate pn532_iso14443b_supported_baud_rates[] = { NBR_106, 0 };
const nfc_baud_rate pn533_iso14443b_supported_baud_rates[] = { NBR_847, NBR_424, NBR_212, NBR_106, 0 };
const nfc_modulation_type pn53x_supported_modulation_as_target[] = {NMT_ISO14443A, NMT_FELICA, NMT_DEP, 0};
/* prototypes */
int pn53x_reset_settings(struct nfc_device *pnd);
int pn53x_writeback_register(struct nfc_device *pnd);
nfc_modulation pn53x_ptt_to_nm(const pn53x_target_type ptt);
pn53x_modulation pn53x_nm_to_pm(const nfc_modulation nm);
pn53x_target_type pn53x_nm_to_ptt(const nfc_modulation nm);
void *pn53x_current_target_new(const struct nfc_device *pnd, const nfc_target *pnt);
void pn53x_current_target_free(const struct nfc_device *pnd);
bool pn53x_current_target_is(const struct nfc_device *pnd, const nfc_target *pnt);
/* implementations */
int
pn53x_init(struct nfc_device *pnd)
{
int res = 0;
// GetFirmwareVersion command is used to set PN53x chips type (PN531, PN532 or PN533)
if ((res = pn53x_decode_firmware_version(pnd)) < 0) {
return res;
}
if (!CHIP_DATA(pnd)->supported_modulation_as_initiator) {
CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation_type) * 9);
if (! CHIP_DATA(pnd)->supported_modulation_as_initiator)
return NFC_ESOFT;
int nbSupportedModulation = 0;
if ((pnd->btSupportByte & SUPPORT_ISO14443A)) {
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_ISO14443A;
nbSupportedModulation++;
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_FELICA;
nbSupportedModulation++;
}
if (pnd->btSupportByte & SUPPORT_ISO14443B) {
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_ISO14443B;
nbSupportedModulation++;
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_ISO14443BI;
nbSupportedModulation++;
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_ISO14443B2SR;
nbSupportedModulation++;
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_ISO14443B2CT;
nbSupportedModulation++;
}
if (CHIP_DATA(pnd)->type != PN531) {
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_JEWEL;
nbSupportedModulation++;
}
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = NMT_DEP;
nbSupportedModulation++;
CHIP_DATA(pnd)->supported_modulation_as_initiator[nbSupportedModulation] = 0;
}
if (!CHIP_DATA(pnd)->supported_modulation_as_target) {
CHIP_DATA(pnd)->supported_modulation_as_target = (nfc_modulation_type *) pn53x_supported_modulation_as_target;
}
// CRC handling should be enabled by default as declared in nfc_device_new
// which is the case by default for pn53x, so nothing to do here
// Parity handling should be enabled by default as declared in nfc_device_new
// which is the case by default for pn53x, so nothing to do here
// We can't read these parameters, so we set a default config by using the SetParameters wrapper
// Note: pn53x_SetParameters() will save the sent value in pnd->ui8Parameters cache
if ((res = pn53x_SetParameters(pnd, PARAM_AUTO_ATR_RES | PARAM_AUTO_RATS)) < 0) {
return res;
}
if ((res = pn53x_reset_settings(pnd)) < 0) {
return res;
}
return NFC_SUCCESS;
}
int
pn53x_reset_settings(struct nfc_device *pnd)
{
int res = 0;
// Reset the ending transmission bits register, it is unknown what the last tranmission used there
CHIP_DATA(pnd)->ui8TxBits = 0;
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_BitFraming, SYMBOL_TX_LAST_BITS, 0x00)) < 0) {
return res;
}
// Make sure we reset the CRC and parity to chip handling.
if ((res = pn53x_set_property_bool(pnd, NP_HANDLE_CRC, true)) < 0)
return res;
if ((res = pn53x_set_property_bool(pnd, NP_HANDLE_PARITY, true)) < 0)
return res;
// Activate "easy framing" feature by default
if ((res = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, true)) < 0)
return res;
// Deactivate the CRYPTO1 cipher, it may could cause problems when still active
if ((res = pn53x_set_property_bool(pnd, NP_ACTIVATE_CRYPTO1, false)) < 0)
return res;
return NFC_SUCCESS;
}
int
pn53x_transceive(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRxLen, int timeout)
{
bool mi = false;
int res = 0;
if (CHIP_DATA(pnd)->wb_trigged) {
if ((res = pn53x_writeback_register(pnd)) < 0) {
return res;
}
}
PNCMD_TRACE(pbtTx[0]);
if (timeout > 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Timeout value: %d", timeout);
} else if (timeout == 0) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "No timeout");
} else if (timeout == -1) {
timeout = CHIP_DATA(pnd)->timeout_command;
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Invalid timeout value: %d", timeout);
}
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
// Check if receiving buffers are available, if not, replace them
if (szRxLen == 0 || !pbtRx) {
pbtRx = abtRx;
} else {
szRx = szRxLen;
}
// Call the send/receice callback functions of the current driver
if ((res = CHIP_DATA(pnd)->io->send(pnd, pbtTx, szTx, timeout)) < 0) {
return res;
}
// Command is sent, we store the command
CHIP_DATA(pnd)->last_command = pbtTx[0];
// Handle power mode for PN532
if ((CHIP_DATA(pnd)->type == PN532) && (TgInitAsTarget == pbtTx[0])) { // PN532 automatically goes into PowerDown mode when TgInitAsTarget command will be sent
CHIP_DATA(pnd)->power_mode = POWERDOWN;
}
if ((res = CHIP_DATA(pnd)->io->receive(pnd, pbtRx, szRx, timeout)) < 0) {
return res;
}
if ((CHIP_DATA(pnd)->type == PN532) && (TgInitAsTarget == pbtTx[0])) { // PN532 automatically wakeup on external RF field
CHIP_DATA(pnd)->power_mode = NORMAL; // When TgInitAsTarget reply that means an external RF have waken up the chip
}
switch (pbtTx[0]) {
case PowerDown:
case InDataExchange:
case InCommunicateThru:
case InJumpForPSL:
case InPSL:
case InATR:
case InSelect:
case InJumpForDEP:
case TgGetData:
case TgGetInitiatorCommand:
case TgSetData:
case TgResponseToInitiator:
case TgSetGeneralBytes:
case TgSetMetaData:
if (pbtRx[0] & 0x80) { abort(); } // NAD detected
// if (pbtRx[0] & 0x40) { abort(); } // MI detected
mi = pbtRx[0] & 0x40;
CHIP_DATA(pnd)->last_status_byte = pbtRx[0] & 0x3f;
break;
case Diagnose:
if (pbtTx[1] == 0x06) { // Diagnose: Card presence detection
CHIP_DATA(pnd)->last_status_byte = pbtRx[0] & 0x3f;
} else {
CHIP_DATA(pnd)->last_status_byte = 0;
};
break;
case InDeselect:
case InRelease:
if (CHIP_DATA(pnd)->type == RCS360) {
// Error code is in pbtRx[1] but we ignore error code anyway
// because other PN53x chips always return 0 on those commands
CHIP_DATA(pnd)->last_status_byte = 0;
break;
}
CHIP_DATA(pnd)->last_status_byte = pbtRx[0] & 0x3f;
break;
case ReadRegister:
case WriteRegister:
if (CHIP_DATA(pnd)->type == PN533) {
// PN533 prepends its answer by the status byte
CHIP_DATA(pnd)->last_status_byte = pbtRx[0] & 0x3f;
} else {
CHIP_DATA(pnd)->last_status_byte = 0;
}
break;
default:
CHIP_DATA(pnd)->last_status_byte = 0;
}
while (mi) {
int res2;
uint8_t abtRx2[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
// Send empty command to card
if ((res2 = CHIP_DATA(pnd)->io->send(pnd, pbtTx, 2, timeout)) < 0) {
return res2;
}
if ((res2 = CHIP_DATA(pnd)->io->receive(pnd, abtRx2, sizeof(abtRx2), timeout)) < 0) {
return res2;
}
mi = abtRx2[0] & 0x40;
if ((size_t)(res + res2 - 1) > szRx) {
CHIP_DATA(pnd)->last_status_byte = ESMALLBUF;
break;
}
memcpy(pbtRx + res, abtRx2 + 1, res2 - 1);
// Copy last status byte
pbtRx[0] = abtRx2[0];
res += res2 - 1;
}
szRx = (size_t) res;
switch (CHIP_DATA(pnd)->last_status_byte) {
case 0:
res = (int)szRx;
break;
case ETIMEOUT:
case ECRC:
case EPARITY:
case EBITCOUNT:
case EFRAMING:
case EBITCOLL:
case ERFPROTO:
case ERFTIMEOUT:
case EDEPUNKCMD:
case EDEPINVSTATE:
case ENAD:
case ENFCID3:
case EINVRXFRAM:
case EBCC:
case ECID:
res = NFC_ERFTRANS;
break;
case ESMALLBUF:
case EOVCURRENT:
case EBUFOVF:
case EOVHEAT:
case EINBUFOVF:
res = NFC_ECHIP;
break;
case EINVPARAM:
case EOPNOTALL:
case ECMD:
case ENSECNOTSUPP:
res = NFC_EINVARG;
break;
case ETGREL:
case ECDISCARDED:
res = NFC_ETGRELEASED;
pn53x_current_target_free(pnd);
break;
case EMFAUTH:
// When a MIFARE Classic AUTH fails, the tag is automatically in HALT state
res = NFC_EMFCAUTHFAIL;
break;
default:
res = NFC_ECHIP;
break;
};
if (res < 0) {
pnd->last_error = res;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "Chip error: \"%s\" (%02x), returned error: \"%s\" (%d))", pn53x_strerror(pnd), CHIP_DATA(pnd)->last_status_byte, nfc_strerror(pnd), res);
} else {
pnd->last_error = 0;
}
return res;
}
int
pn53x_set_parameters(struct nfc_device *pnd, const uint8_t ui8Parameter, const bool bEnable)
{
uint8_t ui8Value = (bEnable) ? (CHIP_DATA(pnd)->ui8Parameters | ui8Parameter) : (CHIP_DATA(pnd)->ui8Parameters & ~(ui8Parameter));
if (ui8Value != CHIP_DATA(pnd)->ui8Parameters) {
return pn53x_SetParameters(pnd, ui8Value);
}
return NFC_SUCCESS;
}
int
pn53x_set_tx_bits(struct nfc_device *pnd, const uint8_t ui8Bits)
{
// Test if we need to update the transmission bits register setting
if (CHIP_DATA(pnd)->ui8TxBits != ui8Bits) {
int res = 0;
// Set the amount of transmission bits in the PN53X chip register
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_BitFraming, SYMBOL_TX_LAST_BITS, ui8Bits)) < 0)
return res;
// Store the new setting
CHIP_DATA(pnd)->ui8TxBits = ui8Bits;
}
return NFC_SUCCESS;
}
int
pn53x_wrap_frame(const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar,
uint8_t *pbtFrame)
{
uint8_t btFrame;
uint8_t btData;
uint32_t uiBitPos;
uint32_t uiDataPos = 0;
size_t szBitsLeft = szTxBits;
size_t szFrameBits = 0;
// Make sure we should frame at least something
if (szBitsLeft == 0)
return NFC_ECHIP;
// Handle a short response (1byte) as a special case
if (szBitsLeft < 9) {
*pbtFrame = *pbtTx;
szFrameBits = szTxBits;
return szFrameBits;
}
// We start by calculating the frame length in bits
szFrameBits = szTxBits + (szTxBits / 8);
// Parse the data bytes and add the parity bits
// This is really a sensitive process, mirror the frame bytes and append parity bits
// buffer = mirror(frame-byte) + parity + mirror(frame-byte) + parity + ...
// split "buffer" up in segments of 8 bits again and mirror them
// air-bytes = mirror(buffer-byte) + mirror(buffer-byte) + mirror(buffer-byte) + ..
while (true) {
// Reset the temporary frame byte;
btFrame = 0;
for (uiBitPos = 0; uiBitPos < 8; uiBitPos++) {
// Copy as much data that fits in the frame byte
btData = mirror(pbtTx[uiDataPos]);
btFrame |= (btData >> uiBitPos);
// Save this frame byte
*pbtFrame = mirror(btFrame);
// Set the remaining bits of the date in the new frame byte and append the parity bit
btFrame = (btData << (8 - uiBitPos));
btFrame |= ((pbtTxPar[uiDataPos] & 0x01) << (7 - uiBitPos));
// Backup the frame bits we have so far
pbtFrame++;
*pbtFrame = mirror(btFrame);
// Increase the data (without parity bit) position
uiDataPos++;
// Test if we are done
if (szBitsLeft < 9)
return szFrameBits;
szBitsLeft -= 8;
}
// Every 8 data bytes we lose one frame byte to the parities
pbtFrame++;
}
}
int
pn53x_unwrap_frame(const uint8_t *pbtFrame, const size_t szFrameBits, uint8_t *pbtRx, uint8_t *pbtRxPar)
{
uint8_t btFrame;
uint8_t btData;
uint8_t uiBitPos;
uint32_t uiDataPos = 0;
uint8_t *pbtFramePos = (uint8_t *) pbtFrame;
size_t szBitsLeft = szFrameBits;
size_t szRxBits = 0;
// Make sure we should frame at least something
if (szBitsLeft == 0)
return NFC_ECHIP;
// Handle a short response (1byte) as a special case
if (szBitsLeft < 9) {
*pbtRx = *pbtFrame;
szRxBits = szFrameBits;
return szRxBits;
}
// Calculate the data length in bits
szRxBits = szFrameBits - (szFrameBits / 9);
// Parse the frame bytes, remove the parity bits and store them in the parity array
// This process is the reverse of WrapFrame(), look there for more info
while (true) {
for (uiBitPos = 0; uiBitPos < 8; uiBitPos++) {
btFrame = mirror(pbtFramePos[uiDataPos]);
btData = (btFrame << uiBitPos);
btFrame = mirror(pbtFramePos[uiDataPos + 1]);
btData |= (btFrame >> (8 - uiBitPos));
pbtRx[uiDataPos] = mirror(btData);
if (pbtRxPar != NULL)
pbtRxPar[uiDataPos] = ((btFrame >> (7 - uiBitPos)) & 0x01);
// Increase the data (without parity bit) position
uiDataPos++;
// Test if we are done
if (szBitsLeft < 9)
return szRxBits;
szBitsLeft -= 9;
}
// Every 8 data bytes we lose one frame byte to the parities
pbtFramePos++;
}
}
int
pn53x_decode_target_data(const uint8_t *pbtRawData, size_t szRawData, pn53x_type type, nfc_modulation_type nmt,
nfc_target_info *pnti)
{
uint8_t szAttribRes;
const uint8_t *pbtUid;
switch (nmt) {
case NMT_ISO14443A:
// We skip the first byte: its the target number (Tg)
pbtRawData++;
// Somehow they switched the lower and upper ATQA bytes around for the PN531 chipset
if (type == PN531) {
pnti->nai.abtAtqa[1] = *(pbtRawData++);
pnti->nai.abtAtqa[0] = *(pbtRawData++);
} else {
pnti->nai.abtAtqa[0] = *(pbtRawData++);
pnti->nai.abtAtqa[1] = *(pbtRawData++);
}
pnti->nai.btSak = *(pbtRawData++);
// Copy the NFCID1
pnti->nai.szUidLen = *(pbtRawData++);
pbtUid = pbtRawData;
pbtRawData += pnti->nai.szUidLen;
// Did we received an optional ATS (Smardcard ATR)
if (szRawData > (pnti->nai.szUidLen + 5)) {
pnti->nai.szAtsLen = ((*(pbtRawData++)) - 1); // In pbtRawData, ATS Length byte is counted in ATS Frame.
memcpy(pnti->nai.abtAts, pbtRawData, pnti->nai.szAtsLen);
} else {
pnti->nai.szAtsLen = 0;
}
// For PN531, strip CT (Cascade Tag) to retrieve and store the _real_ UID
// (e.g. 0x8801020304050607 is in fact 0x01020304050607)
if ((pnti->nai.szUidLen == 8) && (pbtUid[0] == 0x88)) {
pnti->nai.szUidLen = 7;
memcpy(pnti->nai.abtUid, pbtUid + 1, 7);
// } else if ((pnti->nai.szUidLen == 12) && (pbtUid[0] == 0x88) && (pbtUid[4] == 0x88)) {
} else if (pnti->nai.szUidLen > 10) {
pnti->nai.szUidLen = 10;
memcpy(pnti->nai.abtUid, pbtUid + 1, 3);
memcpy(pnti->nai.abtUid + 3, pbtUid + 5, 3);
memcpy(pnti->nai.abtUid + 6, pbtUid + 8, 4);
} else {
// For PN532, PN533
memcpy(pnti->nai.abtUid, pbtUid, pnti->nai.szUidLen);
}
break;
case NMT_ISO14443B:
// We skip the first byte: its the target number (Tg)
pbtRawData++;
// Now we are in ATQB, we skip the first ATQB byte always equal to 0x50
pbtRawData++;
// Store the PUPI (Pseudo-Unique PICC Identifier)
memcpy(pnti->nbi.abtPupi, pbtRawData, 4);
pbtRawData += 4;
// Store the Application Data
memcpy(pnti->nbi.abtApplicationData, pbtRawData, 4);
pbtRawData += 4;
// Store the Protocol Info
memcpy(pnti->nbi.abtProtocolInfo, pbtRawData, 3);
pbtRawData += 3;
// We leave the ATQB field, we now enter in Card IDentifier
szAttribRes = *(pbtRawData++);
if (szAttribRes) {
pnti->nbi.ui8CardIdentifier = *(pbtRawData++);
}
break;
case NMT_ISO14443BI:
// Skip V & T Addresses
pbtRawData++;
if (*pbtRawData != 0x07) { // 0x07 = REPGEN
return NFC_ECHIP;
}
pbtRawData++;
// Store the UID
memcpy(pnti->nii.abtDIV, pbtRawData, 4);
pbtRawData += 4;
pnti->nii.btVerLog = *(pbtRawData++);
if (pnti->nii.btVerLog & 0x80) { // Type = long?
pnti->nii.btConfig = *(pbtRawData++);
if (pnti->nii.btConfig & 0x40) {
memcpy(pnti->nii.abtAtr, pbtRawData, szRawData - 8);
pnti->nii.szAtrLen = szRawData - 8;
}
}
break;
case NMT_ISO14443B2SR:
// Store the UID
memcpy(pnti->nsi.abtUID, pbtRawData, 8);
break;
case NMT_ISO14443B2CT:
// Store UID LSB
memcpy(pnti->nci.abtUID, pbtRawData, 2);
pbtRawData += 2;
// Store Prod Code & Fab Code
pnti->nci.btProdCode = *(pbtRawData++);
pnti->nci.btFabCode = *(pbtRawData++);
// Store UID MSB
memcpy(pnti->nci.abtUID + 2, pbtRawData, 2);
break;
case NMT_FELICA:
// We skip the first byte: its the target number (Tg)
pbtRawData++;
// Store the mandatory info
pnti->nfi.szLen = *(pbtRawData++);
pnti->nfi.btResCode = *(pbtRawData++);
// Copy the NFCID2t
memcpy(pnti->nfi.abtId, pbtRawData, 8);
pbtRawData += 8;
// Copy the felica padding
memcpy(pnti->nfi.abtPad, pbtRawData, 8);
pbtRawData += 8;
// Test if the System code (SYST_CODE) is available
if (pnti->nfi.szLen > 18) {
memcpy(pnti->nfi.abtSysCode, pbtRawData, 2);
}
break;
case NMT_JEWEL:
// We skip the first byte: its the target number (Tg)
pbtRawData++;
// Store the mandatory info
memcpy(pnti->nji.btSensRes, pbtRawData, 2);
pbtRawData += 2;
memcpy(pnti->nji.btId, pbtRawData, 4);
break;
// Should not happend...
case NMT_DEP:
return NFC_ECHIP;
}
return NFC_SUCCESS;
}
static int
pn53x_ReadRegister(struct nfc_device *pnd, uint16_t ui16RegisterAddress, uint8_t *ui8Value)
{
uint8_t abtCmd[] = { ReadRegister, ui16RegisterAddress >> 8, ui16RegisterAddress & 0xff };
uint8_t abtRegValue[2];
size_t szRegValue = sizeof(abtRegValue);
int res = 0;
PNREG_TRACE(ui16RegisterAddress);
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), abtRegValue, szRegValue, -1)) < 0) {
return res;
}
if (CHIP_DATA(pnd)->type == PN533) {
// PN533 prepends its answer by a status byte
*ui8Value = abtRegValue[1];
} else {
*ui8Value = abtRegValue[0];
}
return NFC_SUCCESS;
}
int pn53x_read_register(struct nfc_device *pnd, uint16_t ui16RegisterAddress, uint8_t *ui8Value)
{
return pn53x_ReadRegister(pnd, ui16RegisterAddress, ui8Value);
}
static int
pn53x_WriteRegister(struct nfc_device *pnd, const uint16_t ui16RegisterAddress, const uint8_t ui8Value)
{
uint8_t abtCmd[] = { WriteRegister, ui16RegisterAddress >> 8, ui16RegisterAddress & 0xff, ui8Value };
PNREG_TRACE(ui16RegisterAddress);
return pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
}
int
pn53x_write_register(struct nfc_device *pnd, const uint16_t ui16RegisterAddress, const uint8_t ui8SymbolMask, const uint8_t ui8Value)
{
if ((ui16RegisterAddress < PN53X_CACHE_REGISTER_MIN_ADDRESS) || (ui16RegisterAddress > PN53X_CACHE_REGISTER_MAX_ADDRESS)) {
// Direct write
if (ui8SymbolMask != 0xff) {
int res = 0;
uint8_t ui8CurrentValue;
if ((res = pn53x_read_register(pnd, ui16RegisterAddress, &ui8CurrentValue)) < 0)
return res;
uint8_t ui8NewValue = ((ui8Value & ui8SymbolMask) | (ui8CurrentValue & (~ui8SymbolMask)));
if (ui8NewValue != ui8CurrentValue) {
return pn53x_WriteRegister(pnd, ui16RegisterAddress, ui8NewValue);
}
} else {
return pn53x_WriteRegister(pnd, ui16RegisterAddress, ui8Value);
}
} else {
// Write-back cache area
const int internal_address = ui16RegisterAddress - PN53X_CACHE_REGISTER_MIN_ADDRESS;
CHIP_DATA(pnd)->wb_data[internal_address] = (CHIP_DATA(pnd)->wb_data[internal_address] & CHIP_DATA(pnd)->wb_mask[internal_address] & (~ui8SymbolMask)) | (ui8Value & ui8SymbolMask);
CHIP_DATA(pnd)->wb_mask[internal_address] = CHIP_DATA(pnd)->wb_mask[internal_address] | ui8SymbolMask;
CHIP_DATA(pnd)->wb_trigged = true;
}
return NFC_SUCCESS;
}
int
pn53x_writeback_register(struct nfc_device *pnd)
{
int res = 0;
// TODO Check at each step (ReadRegister, WriteRegister) if we didn't exceed max supported frame length
BUFFER_INIT(abtReadRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtReadRegisterCmd, ReadRegister);
// First step, it looks for registers to be read before applying the requested mask
CHIP_DATA(pnd)->wb_trigged = false;
for (size_t n = 0; n < PN53X_CACHE_REGISTER_SIZE; n++) {
if ((CHIP_DATA(pnd)->wb_mask[n]) && (CHIP_DATA(pnd)->wb_mask[n] != 0xff)) {
// This register needs to be read: mask is present but does not cover full data width (ie. mask != 0xff)
const uint16_t pn53x_register_address = PN53X_CACHE_REGISTER_MIN_ADDRESS + n;
BUFFER_APPEND(abtReadRegisterCmd, pn53x_register_address >> 8);
BUFFER_APPEND(abtReadRegisterCmd, pn53x_register_address & 0xff);
}
}
if (BUFFER_SIZE(abtReadRegisterCmd) > 1) {
// It needs to read some registers
uint8_t abtRes[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRes = sizeof(abtRes);
// It transceives the previously constructed ReadRegister command
if ((res = pn53x_transceive(pnd, abtReadRegisterCmd, BUFFER_SIZE(abtReadRegisterCmd), abtRes, szRes, -1)) < 0) {
return res;
}
size_t i = 0;
if (CHIP_DATA(pnd)->type == PN533) {
// PN533 prepends its answer by a status byte
i = 1;
}
for (size_t n = 0; n < PN53X_CACHE_REGISTER_SIZE; n++) {
if ((CHIP_DATA(pnd)->wb_mask[n]) && (CHIP_DATA(pnd)->wb_mask[n] != 0xff)) {
CHIP_DATA(pnd)->wb_data[n] = ((CHIP_DATA(pnd)->wb_data[n] & CHIP_DATA(pnd)->wb_mask[n]) | (abtRes[i] & (~CHIP_DATA(pnd)->wb_mask[n])));
if (CHIP_DATA(pnd)->wb_data[n] != abtRes[i]) {
// Requested value is different from read one
CHIP_DATA(pnd)->wb_mask[n] = 0xff; // We can now apply whole data bits
} else {
CHIP_DATA(pnd)->wb_mask[n] = 0x00; // We already have the right value
}
i++;
}
}
}
// Now, the writeback-cache only has masks with 0xff, we can start to WriteRegister
BUFFER_INIT(abtWriteRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtWriteRegisterCmd, WriteRegister);
for (size_t n = 0; n < PN53X_CACHE_REGISTER_SIZE; n++) {
if (CHIP_DATA(pnd)->wb_mask[n] == 0xff) {
const uint16_t pn53x_register_address = PN53X_CACHE_REGISTER_MIN_ADDRESS + n;
PNREG_TRACE(pn53x_register_address);
BUFFER_APPEND(abtWriteRegisterCmd, pn53x_register_address >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, pn53x_register_address & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, CHIP_DATA(pnd)->wb_data[n]);
// This register is handled, we reset the mask to prevent
CHIP_DATA(pnd)->wb_mask[n] = 0x00;
}
}
if (BUFFER_SIZE(abtWriteRegisterCmd) > 1) {
// We need to write some registers
if ((res = pn53x_transceive(pnd, abtWriteRegisterCmd, BUFFER_SIZE(abtWriteRegisterCmd), NULL, 0, -1)) < 0) {
return res;
}
}
return NFC_SUCCESS;
}
int
pn53x_decode_firmware_version(struct nfc_device *pnd)
{
const uint8_t abtCmd[] = { GetFirmwareVersion };
uint8_t abtFw[4];
size_t szFwLen = sizeof(abtFw);
int res = 0;
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), abtFw, szFwLen, -1)) < 0) {
return res;
}
szFwLen = (size_t) res;
// Determine which version of chip it is: PN531 will return only 2 bytes, while others return 4 bytes and have the first to tell the version IC
if (szFwLen == 2) {
CHIP_DATA(pnd)->type = PN531;
} else if (szFwLen == 4) {
if (abtFw[0] == 0x32) { // PN532 version IC
CHIP_DATA(pnd)->type = PN532;
} else if (abtFw[0] == 0x33) { // PN533 version IC
if (abtFw[1] == 0x01) { // Sony ROM code
CHIP_DATA(pnd)->type = RCS360;
} else {
CHIP_DATA(pnd)->type = PN533;
}
} else {
// Unknown version IC
return NFC_ENOTIMPL;
}
} else {
// Unknown chip
return NFC_ENOTIMPL;
}
// Convert firmware info in text, PN531 gives 2 bytes info, but PN532 and PN533 gives 4
switch (CHIP_DATA(pnd)->type) {
case PN531:
snprintf(CHIP_DATA(pnd)->firmware_text, sizeof(CHIP_DATA(pnd)->firmware_text), "PN531 v%d.%d", abtFw[0], abtFw[1]);
pnd->btSupportByte = SUPPORT_ISO14443A | SUPPORT_ISO18092;
break;
case PN532:
snprintf(CHIP_DATA(pnd)->firmware_text, sizeof(CHIP_DATA(pnd)->firmware_text), "PN532 v%d.%d", abtFw[1], abtFw[2]);
pnd->btSupportByte = abtFw[3];
break;
case PN533:
case RCS360:
snprintf(CHIP_DATA(pnd)->firmware_text, sizeof(CHIP_DATA(pnd)->firmware_text), "PN533 v%d.%d", abtFw[1], abtFw[2]);
pnd->btSupportByte = abtFw[3];
break;
case PN53X:
// Could not happend
break;
}
return NFC_SUCCESS;
}
static uint8_t
pn53x_int_to_timeout(const int ms)
{
uint8_t res = 0;
if (ms) {
res = 0x10;
for (int i = 3280; i > 1; i /= 2) {
if (ms > i)
break;
res--;
}
}
return res;
}
int
pn53x_set_property_int(struct nfc_device *pnd, const nfc_property property, const int value)
{
switch (property) {
case NP_TIMEOUT_COMMAND:
CHIP_DATA(pnd)->timeout_command = value;
break;
case NP_TIMEOUT_ATR:
CHIP_DATA(pnd)->timeout_atr = value;
return pn53x_RFConfiguration__Various_timings(pnd, pn53x_int_to_timeout(CHIP_DATA(pnd)->timeout_atr), pn53x_int_to_timeout(CHIP_DATA(pnd)->timeout_communication));
case NP_TIMEOUT_COM:
CHIP_DATA(pnd)->timeout_communication = value;
return pn53x_RFConfiguration__Various_timings(pnd, pn53x_int_to_timeout(CHIP_DATA(pnd)->timeout_atr), pn53x_int_to_timeout(CHIP_DATA(pnd)->timeout_communication));
// Following properties are invalid (not integer)
case NP_HANDLE_CRC:
case NP_HANDLE_PARITY:
case NP_ACTIVATE_FIELD:
case NP_ACTIVATE_CRYPTO1:
case NP_INFINITE_SELECT:
case NP_ACCEPT_INVALID_FRAMES:
case NP_ACCEPT_MULTIPLE_FRAMES:
case NP_AUTO_ISO14443_4:
case NP_EASY_FRAMING:
case NP_FORCE_ISO14443_A:
case NP_FORCE_ISO14443_B:
case NP_FORCE_SPEED_106:
return NFC_EINVARG;
}
return NFC_SUCCESS;
}
int
pn53x_set_property_bool(struct nfc_device *pnd, const nfc_property property, const bool bEnable)
{
uint8_t btValue;
int res = 0;
switch (property) {
case NP_HANDLE_CRC:
// Enable or disable automatic receiving/sending of CRC bytes
if (bEnable == pnd->bCrc) {
// Nothing to do
return NFC_SUCCESS;
}
// TX and RX are both represented by the symbol 0x80
btValue = (bEnable) ? 0x80 : 0x00;
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_TxMode, SYMBOL_TX_CRC_ENABLE, btValue)) < 0)
return res;
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_RxMode, SYMBOL_RX_CRC_ENABLE, btValue)) < 0)
return res;
pnd->bCrc = bEnable;
return NFC_SUCCESS;
case NP_HANDLE_PARITY:
// Handle parity bit by PN53X chip or parse it as data bit
if (bEnable == pnd->bPar)
// Nothing to do
return NFC_SUCCESS;
btValue = (bEnable) ? 0x00 : SYMBOL_PARITY_DISABLE;
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_ManualRCV, SYMBOL_PARITY_DISABLE, btValue)) < 0)
return res;
pnd->bPar = bEnable;
return NFC_SUCCESS;
case NP_EASY_FRAMING:
pnd->bEasyFraming = bEnable;
return NFC_SUCCESS;
case NP_ACTIVATE_FIELD:
return pn53x_RFConfiguration__RF_field(pnd, bEnable);
case NP_ACTIVATE_CRYPTO1:
btValue = (bEnable) ? SYMBOL_MF_CRYPTO1_ON : 0x00;
return pn53x_write_register(pnd, PN53X_REG_CIU_Status2, SYMBOL_MF_CRYPTO1_ON, btValue);
case NP_INFINITE_SELECT:
// TODO Made some research around this point:
// timings could be tweak better than this, and maybe we can tweak timings
// to "gain" a sort-of hardware polling (ie. like PN532 does)
pnd->bInfiniteSelect = bEnable;
return pn53x_RFConfiguration__MaxRetries(pnd,
(bEnable) ? 0xff : 0x00, // MxRtyATR, default: active = 0xff, passive = 0x02
(bEnable) ? 0xff : 0x01, // MxRtyPSL, default: 0x01
(bEnable) ? 0xff : 0x02 // MxRtyPassiveActivation, default: 0xff (0x00 leads to problems with PN531)
);
case NP_ACCEPT_INVALID_FRAMES:
btValue = (bEnable) ? SYMBOL_RX_NO_ERROR : 0x00;
return pn53x_write_register(pnd, PN53X_REG_CIU_RxMode, SYMBOL_RX_NO_ERROR, btValue);
case NP_ACCEPT_MULTIPLE_FRAMES:
btValue = (bEnable) ? SYMBOL_RX_MULTIPLE : 0x00;
return pn53x_write_register(pnd, PN53X_REG_CIU_RxMode, SYMBOL_RX_MULTIPLE, btValue);
case NP_AUTO_ISO14443_4:
if (bEnable == pnd->bAutoIso14443_4)
// Nothing to do
return NFC_SUCCESS;
pnd->bAutoIso14443_4 = bEnable;
return pn53x_set_parameters(pnd, PARAM_AUTO_RATS, bEnable);
case NP_FORCE_ISO14443_A:
if (!bEnable) {
// Nothing to do
return NFC_SUCCESS;
}
// Force pn53x to be in ISO14443-A mode
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_TxMode, SYMBOL_TX_FRAMING, 0x00)) < 0) {
return res;
}
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_RxMode, SYMBOL_RX_FRAMING, 0x00)) < 0) {
return res;
}
// Set the PN53X to force 100% ASK Modified miller decoding (default for 14443A cards)
return pn53x_write_register(pnd, PN53X_REG_CIU_TxAuto, SYMBOL_FORCE_100_ASK, 0x40);
case NP_FORCE_ISO14443_B:
if (!bEnable) {
// Nothing to do
return NFC_SUCCESS;
}
// Force pn53x to be in ISO14443-B mode
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_TxMode, SYMBOL_TX_FRAMING, 0x03)) < 0) {
return res;
}
return pn53x_write_register(pnd, PN53X_REG_CIU_RxMode, SYMBOL_RX_FRAMING, 0x03);
case NP_FORCE_SPEED_106:
if (!bEnable) {
// Nothing to do
return NFC_SUCCESS;
}
// Force pn53x to be at 106 kbps
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_TxMode, SYMBOL_TX_SPEED, 0x00)) < 0) {
return res;
}
return pn53x_write_register(pnd, PN53X_REG_CIU_RxMode, SYMBOL_RX_SPEED, 0x00);
// Following properties are invalid (not boolean)
case NP_TIMEOUT_COMMAND:
case NP_TIMEOUT_ATR:
case NP_TIMEOUT_COM:
return NFC_EINVARG;
}
return NFC_EINVARG;
}
int
pn53x_idle(struct nfc_device *pnd)
{
int res = 0;
switch (CHIP_DATA(pnd)->operating_mode) {
case TARGET:
// InRelease used in target mode stops the target emulation and no more
// tag are seen from external initiator
if ((res = pn53x_InRelease(pnd, 0)) < 0) {
return res;
}
if ((CHIP_DATA(pnd)->type == PN532) && (pnd->driver->powerdown)) {
// Use PowerDown to go in "Low VBat" power mode
if ((res = pnd->driver->powerdown(pnd)) < 0) {
return res;
}
}
break;
case INITIATOR:
// Use InRelease to go in "Standby mode"
if ((res = pn53x_InRelease(pnd, 0)) < 0) {
return res;
}
// Disable RF field to avoid heating
if ((res = nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, false)) < 0) {
return res;
}
if ((CHIP_DATA(pnd)->type == PN532) && (pnd->driver->powerdown)) {
// Use PowerDown to go in "Low VBat" power mode
if ((res = pnd->driver->powerdown(pnd)) < 0) {
return res;
}
}
break;
case IDLE: // Nothing to do.
break;
};
// Clear the current nfc_target
pn53x_current_target_free(pnd);
CHIP_DATA(pnd)->operating_mode = IDLE;
return NFC_SUCCESS;
}
int
pn53x_check_communication(struct nfc_device *pnd)
{
const uint8_t abtCmd[] = { Diagnose, 0x00, 'l', 'i', 'b', 'n', 'f', 'c' };
const uint8_t abtExpectedRx[] = { 0x00, 'l', 'i', 'b', 'n', 'f', 'c' };
uint8_t abtRx[sizeof(abtExpectedRx)];
size_t szRx = sizeof(abtRx);
int res = 0;
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), abtRx, szRx, 500)) < 0)
return res;
szRx = (size_t) res;
if ((sizeof(abtExpectedRx) == szRx) && (0 == memcmp(abtRx, abtExpectedRx, sizeof(abtExpectedRx))))
return NFC_SUCCESS;
return NFC_EIO;
}
int
pn53x_initiator_init(struct nfc_device *pnd)
{
pn53x_reset_settings(pnd);
int res;
if (CHIP_DATA(pnd)->sam_mode != PSM_NORMAL) {
if ((res = pn532_SAMConfiguration(pnd, PSM_NORMAL, -1)) < 0) {
return res;
}
}
// Configure the PN53X to be an Initiator or Reader/Writer
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_Control, SYMBOL_INITIATOR, 0x10)) < 0)
return res;
CHIP_DATA(pnd)->operating_mode = INITIATOR;
return NFC_SUCCESS;
}
int
pn532_initiator_init_secure_element(struct nfc_device *pnd)
{
return pn532_SAMConfiguration(pnd, PSM_WIRED_CARD, -1);
}
static int
pn53x_initiator_select_passive_target_ext(struct nfc_device *pnd,
const nfc_modulation nm,
const uint8_t *pbtInitData, const size_t szInitData,
nfc_target *pnt,
int timeout)
{
uint8_t abtTargetsData[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szTargetsData = sizeof(abtTargetsData);
int res = 0;
nfc_target nttmp;
if (nm.nmt == NMT_ISO14443BI || nm.nmt == NMT_ISO14443B2SR || nm.nmt == NMT_ISO14443B2CT) {
if (CHIP_DATA(pnd)->type == RCS360) {
// TODO add support for RC-S360, at the moment it refuses to send raw frames without a first select
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
// No native support in InListPassiveTarget so we do discovery by hand
if ((res = nfc_device_set_property_bool(pnd, NP_FORCE_ISO14443_B, true)) < 0) {
return res;
}
if ((res = nfc_device_set_property_bool(pnd, NP_FORCE_SPEED_106, true)) < 0) {
return res;
}
if ((res = nfc_device_set_property_bool(pnd, NP_HANDLE_CRC, true)) < 0) {
return res;
}
if ((res = nfc_device_set_property_bool(pnd, NP_EASY_FRAMING, false)) < 0) {
return res;
}
bool found = false;
do {
if (nm.nmt == NMT_ISO14443B2SR) {
// Some work to do before getting the UID...
uint8_t abtInitiate[] = "\x06\x00";
size_t szInitiateLen = 2;
uint8_t abtSelect[] = { 0x0e, 0x00 };
uint8_t abtRx[1];
// Getting random Chip_ID
if ((res = pn53x_initiator_transceive_bytes(pnd, abtInitiate, szInitiateLen, abtRx, sizeof(abtRx), timeout)) < 0) {
if ((res == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Chip timeout
continue;
} else
return res;
}
abtSelect[1] = abtRx[0];
if ((res = pn53x_initiator_transceive_bytes(pnd, abtSelect, sizeof(abtSelect), abtRx, sizeof(abtRx), timeout)) < 0) {
return res;
}
szTargetsData = (size_t)res;
} else if (nm.nmt == NMT_ISO14443B2CT) {
// Some work to do before getting the UID...
const uint8_t abtReqt[] = { 0x10 };
// Getting product code / fab code & store it in output buffer after the serial nr we'll obtain later
if ((res = pn53x_initiator_transceive_bytes(pnd, abtReqt, sizeof(abtReqt), abtTargetsData + 2, sizeof(abtTargetsData) - 2, timeout)) < 0) {
if ((res == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Chip timeout
continue;
} else
return res;
}
szTargetsData = (size_t)res;
}
if ((res = pn53x_initiator_transceive_bytes(pnd, pbtInitData, szInitData, abtTargetsData, sizeof(abtTargetsData), timeout)) < 0) {
if ((res == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Chip timeout
continue;
} else
return res;
}
szTargetsData = (size_t)res;
if (nm.nmt == NMT_ISO14443B2CT) {
if (szTargetsData != 2)
return 0; // Target is not ISO14443B2CT
uint8_t abtRead[] = { 0xC4 }; // Reading UID_MSB (Read address 4)
if ((res = pn53x_initiator_transceive_bytes(pnd, abtRead, sizeof(abtRead), abtTargetsData + 4, sizeof(abtTargetsData) - 4, timeout)) < 0) {
return res;
}
szTargetsData = 6; // u16 UID_LSB, u8 prod code, u8 fab code, u16 UID_MSB
}
nttmp.nm = nm;
if ((res = pn53x_decode_target_data(abtTargetsData, szTargetsData, CHIP_DATA(pnd)->type, nm.nmt, &(nttmp.nti))) < 0) {
return res;
}
if (nm.nmt == NMT_ISO14443BI) {
// Select tag
uint8_t abtAttrib[6];
memcpy(abtAttrib, abtTargetsData, sizeof(abtAttrib));
abtAttrib[1] = 0x0f; // ATTRIB
if ((res = pn53x_initiator_transceive_bytes(pnd, abtAttrib, sizeof(abtAttrib), NULL, 0, timeout)) < 0) {
return res;
}
szTargetsData = (size_t)res;
}
found = true;
break;
} while (pnd->bInfiniteSelect);
if (! found)
return 0;
} else {
const pn53x_modulation pm = pn53x_nm_to_pm(nm);
if ((PM_UNDEFINED == pm) || (NBR_UNDEFINED == nm.nbr)) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
if ((res = pn53x_InListPassiveTarget(pnd, pm, 1, pbtInitData, szInitData, abtTargetsData, &szTargetsData, timeout)) <= 0)
return res;
if (szTargetsData <= 1) // For Coverity to know szTargetsData is always > 1 if res > 0
return 0;
nttmp.nm = nm;
if ((res = pn53x_decode_target_data(abtTargetsData + 1, szTargetsData - 1, CHIP_DATA(pnd)->type, nm.nmt, &(nttmp.nti))) < 0) {
return res;
}
if ((nm.nmt == NMT_ISO14443A) && (nm.nbr != NBR_106)) {
uint8_t pncmd_inpsl[4] = { InPSL, 0x01 };
pncmd_inpsl[2] = nm.nbr - 1;
pncmd_inpsl[3] = nm.nbr - 1;
if ((res = pn53x_transceive(pnd, pncmd_inpsl, sizeof(pncmd_inpsl), NULL, 0, 0)) < 0) {
return res;
}
}
}
if (pn53x_current_target_new(pnd, &nttmp) == NULL) {
pnd->last_error = NFC_ESOFT;
return pnd->last_error;
}
// Is a tag info struct available
if (pnt) {
memcpy(pnt, &nttmp, sizeof(nfc_target));
}
return abtTargetsData[0];
}
int
pn53x_initiator_select_passive_target(struct nfc_device *pnd,
const nfc_modulation nm,
const uint8_t *pbtInitData, const size_t szInitData,
nfc_target *pnt)
{
return pn53x_initiator_select_passive_target_ext(pnd, nm, pbtInitData, szInitData, pnt, 0);
}
int
pn53x_initiator_poll_target(struct nfc_device *pnd,
const nfc_modulation *pnmModulations, const size_t szModulations,
const uint8_t uiPollNr, const uint8_t uiPeriod,
nfc_target *pnt)
{
int res = 0;
if (CHIP_DATA(pnd)->type == PN532) {
size_t szTargetTypes = 0;
pn53x_target_type apttTargetTypes[32];
memset(apttTargetTypes, PTT_UNDEFINED, 32 * sizeof(pn53x_target_type));
for (size_t n = 0; n < szModulations; n++) {
const pn53x_target_type ptt = pn53x_nm_to_ptt(pnmModulations[n]);
if (PTT_UNDEFINED == ptt) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
apttTargetTypes[szTargetTypes] = ptt;
if ((pnd->bAutoIso14443_4) && (ptt == PTT_MIFARE)) { // Hack to have ATS
apttTargetTypes[szTargetTypes] = PTT_ISO14443_4A_106;
szTargetTypes++;
apttTargetTypes[szTargetTypes] = PTT_MIFARE;
}
szTargetTypes++;
}
nfc_target ntTargets[2];
if ((res = pn53x_InAutoPoll(pnd, apttTargetTypes, szTargetTypes, uiPollNr, uiPeriod, ntTargets, 0)) < 0)
return res;
switch (res) {
case 1:
*pnt = ntTargets[0];
if (pn53x_current_target_new(pnd, pnt) == NULL) {
return pnd->last_error = NFC_ESOFT;
}
return res;
case 2:
*pnt = ntTargets[1]; // We keep the selected one
if (pn53x_current_target_new(pnd, pnt) == NULL) {
return pnd->last_error = NFC_ESOFT;
}
return res;
default:
return NFC_ECHIP;
}
} else {
bool bInfiniteSelect = pnd->bInfiniteSelect;
int result = 0;
if ((res = pn53x_set_property_bool(pnd, NP_INFINITE_SELECT, true)) < 0)
return res;
// FIXME It does not support DEP targets
do {
for (size_t p = 0; p < uiPollNr; p++) {
for (size_t n = 0; n < szModulations; n++) {
uint8_t *pbtInitiatorData;
size_t szInitiatorData;
prepare_initiator_data(pnmModulations[n], &pbtInitiatorData, &szInitiatorData);
const int timeout_ms = uiPeriod * 150;
if ((res = pn53x_initiator_select_passive_target_ext(pnd, pnmModulations[n], pbtInitiatorData, szInitiatorData, pnt, timeout_ms)) < 0) {
if (pnd->last_error != NFC_ETIMEOUT) {
result = pnd->last_error;
goto end;
}
} else {
result = res;
goto end;
}
}
}
} while (uiPollNr == 0xff); // uiPollNr==0xff means infinite polling
// We reach this point when each listing give no result, we simply have to return 0
end:
if (! bInfiniteSelect) {
if ((res = pn53x_set_property_bool(pnd, NP_INFINITE_SELECT, false)) < 0)
return res;
}
return result;
}
return NFC_ECHIP;
}
int
pn53x_initiator_select_dep_target(struct nfc_device *pnd,
const nfc_dep_mode ndm, const nfc_baud_rate nbr,
const nfc_dep_info *pndiInitiator,
nfc_target *pnt,
const int timeout)
{
const uint8_t abtPassiveInitiatorData[] = { 0x00, 0xff, 0xff, 0x00, 0x0f }; // Only for 212/424 kpbs: First 4 bytes shall be set like this according to NFCIP-1, last byte is TSN (Time Slot Number)
const uint8_t *pbtPassiveInitiatorData = NULL;
switch (nbr) {
case NBR_212:
case NBR_424:
// Only use this predefined bytes array when we are at 212/424kbps
pbtPassiveInitiatorData = abtPassiveInitiatorData;
break;
case NBR_106:
// Nothing to do
break;
case NBR_847:
case NBR_UNDEFINED:
return NFC_EINVARG;
}
pn53x_current_target_free(pnd);
int res;
if (pndiInitiator) {
res = pn53x_InJumpForDEP(pnd, ndm, nbr, pbtPassiveInitiatorData, pndiInitiator->abtNFCID3, pndiInitiator->abtGB, pndiInitiator->szGB, pnt, timeout);
} else {
res = pn53x_InJumpForDEP(pnd, ndm, nbr, pbtPassiveInitiatorData, NULL, NULL, 0, pnt, timeout);
}
if (res > 0) {
if (pn53x_current_target_new(pnd, pnt) == NULL) {
return NFC_ESOFT;
}
}
return res;
}
int
pn53x_initiator_transceive_bits(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits,
const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar)
{
int res = 0;
size_t szFrameBits = 0;
size_t szFrameBytes = 0;
size_t szRxBits = 0;
uint8_t ui8rcc;
uint8_t ui8Bits = 0;
uint8_t abtCmd[PN53x_EXTENDED_FRAME__DATA_MAX_LEN] = { InCommunicateThru };
// Check if we should prepare the parity bits ourself
if (!pnd->bPar) {
// Convert data with parity to a frame
if ((res = pn53x_wrap_frame(pbtTx, szTxBits, pbtTxPar, abtCmd + 1)) < 0)
return res;
szFrameBits = res;
} else {
szFrameBits = szTxBits;
}
// Retrieve the leading bits
ui8Bits = szFrameBits % 8;
// Get the amount of frame bytes + optional (1 byte if there are leading bits)
szFrameBytes = (szFrameBits / 8) + ((ui8Bits == 0) ? 0 : 1);
// When the parity is handled before us, we just copy the data
if (pnd->bPar)
memcpy(abtCmd + 1, pbtTx, szFrameBytes);
// Set the amount of transmission bits in the PN53X chip register
if ((res = pn53x_set_tx_bits(pnd, ui8Bits)) < 0)
return res;
// Send the frame to the PN53X chip and get the answer
// We have to give the amount of bytes + (the command byte 0x42)
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
if ((res = pn53x_transceive(pnd, abtCmd, szFrameBytes + 1, abtRx, szRx, -1)) < 0)
return res;
szRx = (size_t) res;
// Get the last bit-count that is stored in the received byte
if ((res = pn53x_read_register(pnd, PN53X_REG_CIU_Control, &ui8rcc)) < 0)
return res;
ui8Bits = ui8rcc & SYMBOL_RX_LAST_BITS;
// Recover the real frame length in bits
szFrameBits = ((szRx - 1 - ((ui8Bits == 0) ? 0 : 1)) * 8) + ui8Bits;
if (pbtRx != NULL) {
// Ignore the status byte from the PN53X here, it was checked earlier in pn53x_transceive()
// Check if we should recover the parity bits ourself
if (!pnd->bPar) {
// Unwrap the response frame
if ((res = pn53x_unwrap_frame(abtRx + 1, szFrameBits, pbtRx, pbtRxPar)) < 0)
return res;
szRxBits = res;
} else {
// Save the received bits
szRxBits = szFrameBits;
// Copy the received bytes
memcpy(pbtRx, abtRx + 1, szRx - 1);
}
}
// Everything went successful
return szRxBits;
}
int
pn53x_initiator_transceive_bytes(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx,
const size_t szRx, int timeout)
{
size_t szExtraTxLen;
uint8_t abtCmd[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
int res = 0;
// We can not just send bytes without parity if while the PN53X expects we handled them
if (!pnd->bPar) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
// Copy the data into the command frame
if (pnd->bEasyFraming) {
abtCmd[0] = InDataExchange;
abtCmd[1] = 1; /* target number */
memcpy(abtCmd + 2, pbtTx, szTx);
szExtraTxLen = 2;
} else {
abtCmd[0] = InCommunicateThru;
memcpy(abtCmd + 1, pbtTx, szTx);
szExtraTxLen = 1;
}
// To transfer command frames bytes we can not have any leading bits, reset this to zero
if ((res = pn53x_set_tx_bits(pnd, 0)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
// Send the frame to the PN53X chip and get the answer
// We have to give the amount of bytes + (the two command bytes 0xD4, 0x42)
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
if ((res = pn53x_transceive(pnd, abtCmd, szTx + szExtraTxLen, abtRx, sizeof(abtRx), timeout)) < 0) {
pnd->last_error = res;
return pnd->last_error;
}
const size_t szRxLen = (size_t)res - 1;
if (pbtRx != NULL) {
if (szRxLen > szRx) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Buffer size is too short: %" PRIuPTR " available(s), %" PRIuPTR " needed", szRx, szRxLen);
return NFC_EOVFLOW;
}
// Copy the received bytes
memcpy(pbtRx, abtRx + 1, szRxLen);
}
// Everything went successful, we return received bytes count
return szRxLen;
}
static void __pn53x_init_timer(struct nfc_device *pnd, const uint32_t max_cycles)
{
// The prescaler will dictate what will be the precision and
// the largest delay to measure before saturation. Some examples:
// prescaler = 0 => precision: ~73ns timer saturates at ~5ms
// prescaler = 1 => precision: ~221ns timer saturates at ~15ms
// prescaler = 2 => precision: ~369ns timer saturates at ~25ms
// prescaler = 10 => precision: ~1.5us timer saturates at ~100ms
if (max_cycles > 0xFFFF) {
CHIP_DATA(pnd)->timer_prescaler = ((max_cycles / 0xFFFF) - 1) / 2;
} else {
CHIP_DATA(pnd)->timer_prescaler = 0;
}
uint16_t reloadval = 0xFFFF;
// Initialize timer
pn53x_write_register(pnd, PN53X_REG_CIU_TMode, 0xFF, SYMBOL_TAUTO | ((CHIP_DATA(pnd)->timer_prescaler >> 8) & SYMBOL_TPRESCALERHI));
pn53x_write_register(pnd, PN53X_REG_CIU_TPrescaler, 0xFF, (CHIP_DATA(pnd)->timer_prescaler & SYMBOL_TPRESCALERLO));
pn53x_write_register(pnd, PN53X_REG_CIU_TReloadVal_hi, 0xFF, (reloadval >> 8) & 0xFF);
pn53x_write_register(pnd, PN53X_REG_CIU_TReloadVal_lo, 0xFF, reloadval & 0xFF);
}
static uint32_t __pn53x_get_timer(struct nfc_device *pnd, const uint8_t last_cmd_byte)
{
uint8_t parity;
uint8_t counter_hi, counter_lo;
uint16_t counter, u16cycles;
uint32_t u32cycles;
size_t off = 0;
if (CHIP_DATA(pnd)->type == PN533) {
// PN533 prepends its answer by a status byte
off = 1;
}
// Read timer
BUFFER_INIT(abtReadRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtReadRegisterCmd, ReadRegister);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_TCounterVal_hi >> 8);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_TCounterVal_hi & 0xff);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_TCounterVal_lo >> 8);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_TCounterVal_lo & 0xff);
uint8_t abtRes[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRes = sizeof(abtRes);
// Let's send the previously constructed ReadRegister command
if (pn53x_transceive(pnd, abtReadRegisterCmd, BUFFER_SIZE(abtReadRegisterCmd), abtRes, szRes, -1) < 0) {
return false;
}
counter_hi = abtRes[off];
counter_lo = abtRes[off + 1];
counter = counter_hi;
counter = (counter << 8) + counter_lo;
if (counter == 0) {
// counter saturated
u32cycles = 0xFFFFFFFF;
} else {
u16cycles = 0xFFFF - counter;
u32cycles = u16cycles;
u32cycles *= (CHIP_DATA(pnd)->timer_prescaler * 2 + 1);
u32cycles++;
// Correction depending on PN53x Rx detection handling:
// timer stops after 5 (or 2 for PN531) bits are received
if (CHIP_DATA(pnd)->type == PN531) {
u32cycles -= (2 * 128);
} else {
u32cycles -= (5 * 128);
}
// Correction depending on last parity bit sent
parity = (last_cmd_byte >> 7) ^ ((last_cmd_byte >> 6) & 1) ^
((last_cmd_byte >> 5) & 1) ^ ((last_cmd_byte >> 4) & 1) ^
((last_cmd_byte >> 3) & 1) ^ ((last_cmd_byte >> 2) & 1) ^
((last_cmd_byte >> 1) & 1) ^ (last_cmd_byte & 1);
parity = parity ? 0 : 1;
// When sent ...YY (cmd ends with logical 1, so when last parity bit is 1):
if (parity) {
// it finishes 64us sooner than a ...ZY signal
u32cycles += 64;
}
// Correction depending on device design
u32cycles += CHIP_DATA(pnd)->timer_correction;
}
return u32cycles;
}
int
pn53x_initiator_transceive_bits_timed(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits,
const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar, uint32_t *cycles)
{
// TODO Do something with these bytes...
(void) pbtTxPar;
(void) pbtRxPar;
uint16_t i;
uint8_t sz = 0;
int res = 0;
size_t szRxBits = 0;
// Sorry, no arbitrary parity bits support for now
if (!pnd->bPar) {
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
// Sorry, no easy framing support
if (pnd->bEasyFraming) {
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
// TODO CRC support but it probably doesn't make sense for (szTxBits % 8 != 0) ...
if (pnd->bCrc) {
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
__pn53x_init_timer(pnd, *cycles);
// Once timer is started, we cannot use Tama commands anymore.
// E.g. on SCL3711 timer settings are reset by 0x42 InCommunicateThru command to:
// 631a=82 631b=a5 631c=02 631d=00
// Prepare FIFO
BUFFER_INIT(abtWriteRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtWriteRegisterCmd, WriteRegister);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_Command >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_Command & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, SYMBOL_COMMAND & SYMBOL_COMMAND_TRANSCEIVE);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOLevel >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOLevel & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, SYMBOL_FLUSH_BUFFER);
for (i = 0; i < ((szTxBits / 8) + 1); i++) {
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOData >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOData & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, pbtTx[i]);
}
// Send data
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_BitFraming >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_BitFraming & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, SYMBOL_START_SEND | ((szTxBits % 8) & SYMBOL_TX_LAST_BITS));
// Let's send the previously constructed WriteRegister command
if ((res = pn53x_transceive(pnd, abtWriteRegisterCmd, BUFFER_SIZE(abtWriteRegisterCmd), NULL, 0, -1)) < 0) {
return res;
}
// Recv data
// we've to watch for coming data until we decide to timeout.
// our PN53x timer saturates after 4.8ms so this function shouldn't be used for
// responses coming very late anyway.
// Ideally we should implement a real timer here too but looping a few times is good enough.
for (i = 0; i < (3 * (CHIP_DATA(pnd)->timer_prescaler * 2 + 1)); i++) {
pn53x_read_register(pnd, PN53X_REG_CIU_FIFOLevel, &sz);
if (sz > 0)
break;
}
size_t off = 0;
if (CHIP_DATA(pnd)->type == PN533) {
// PN533 prepends its answer by a status byte
off = 1;
}
while (1) {
BUFFER_INIT(abtReadRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtReadRegisterCmd, ReadRegister);
for (i = 0; i < sz; i++) {
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOData >> 8);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOData & 0xff);
}
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOLevel >> 8);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOLevel & 0xff);
uint8_t abtRes[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRes = sizeof(abtRes);
// Let's send the previously constructed ReadRegister command
if ((res = pn53x_transceive(pnd, abtReadRegisterCmd, BUFFER_SIZE(abtReadRegisterCmd), abtRes, szRes, -1)) < 0) {
return res;
}
for (i = 0; i < sz; i++) {
pbtRx[i + szRxBits] = abtRes[i + off];
}
szRxBits += (size_t)(sz & SYMBOL_FIFO_LEVEL);
sz = abtRes[sz + off];
if (sz == 0)
break;
}
szRxBits *= 8; // in bits, not bytes
// Recv corrected timer value
*cycles = __pn53x_get_timer(pnd, pbtTx[szTxBits / 8]);
return szRxBits;
}
int
pn53x_initiator_transceive_bytes_timed(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, uint32_t *cycles)
{
uint16_t i;
uint8_t sz = 0;
int res = 0;
// We can not just send bytes without parity while the PN53X expects we handled them
if (!pnd->bPar) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
// Sorry, no easy framing support
// TODO to be changed once we'll provide easy framing support from libnfc itself...
if (pnd->bEasyFraming) {
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
uint8_t txmode = 0;
if (pnd->bCrc) { // check if we're in TypeA or TypeB mode to compute right CRC later
if ((res = pn53x_read_register(pnd, PN53X_REG_CIU_TxMode, &txmode)) < 0) {
return res;
}
}
__pn53x_init_timer(pnd, *cycles);
// Once timer is started, we cannot use Tama commands anymore.
// E.g. on SCL3711 timer settings are reset by 0x42 InCommunicateThru command to:
// 631a=82 631b=a5 631c=02 631d=00
// Prepare FIFO
BUFFER_INIT(abtWriteRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtWriteRegisterCmd, WriteRegister);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_Command >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_Command & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, SYMBOL_COMMAND & SYMBOL_COMMAND_TRANSCEIVE);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOLevel >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOLevel & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, SYMBOL_FLUSH_BUFFER);
for (i = 0; i < szTx; i++) {
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOData >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_FIFOData & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, pbtTx[i]);
}
// Send data
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_BitFraming >> 8);
BUFFER_APPEND(abtWriteRegisterCmd, PN53X_REG_CIU_BitFraming & 0xff);
BUFFER_APPEND(abtWriteRegisterCmd, SYMBOL_START_SEND);
// Let's send the previously constructed WriteRegister command
if ((res = pn53x_transceive(pnd, abtWriteRegisterCmd, BUFFER_SIZE(abtWriteRegisterCmd), NULL, 0, -1)) < 0) {
return res;
}
// Recv data
size_t szRxLen = 0;
// we've to watch for coming data until we decide to timeout.
// our PN53x timer saturates after 4.8ms so this function shouldn't be used for
// responses coming very late anyway.
// Ideally we should implement a real timer here too but looping a few times is good enough.
for (i = 0; i < (3 * (CHIP_DATA(pnd)->timer_prescaler * 2 + 1)); i++) {
pn53x_read_register(pnd, PN53X_REG_CIU_FIFOLevel, &sz);
if (sz > 0)
break;
}
size_t off = 0;
if (CHIP_DATA(pnd)->type == PN533) {
// PN533 prepends its answer by a status byte
off = 1;
}
while (1) {
BUFFER_INIT(abtReadRegisterCmd, PN53x_EXTENDED_FRAME__DATA_MAX_LEN);
BUFFER_APPEND(abtReadRegisterCmd, ReadRegister);
for (i = 0; i < sz; i++) {
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOData >> 8);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOData & 0xff);
}
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOLevel >> 8);
BUFFER_APPEND(abtReadRegisterCmd, PN53X_REG_CIU_FIFOLevel & 0xff);
uint8_t abtRes[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRes = sizeof(abtRes);
// Let's send the previously constructed ReadRegister command
if ((res = pn53x_transceive(pnd, abtReadRegisterCmd, BUFFER_SIZE(abtReadRegisterCmd), abtRes, szRes, -1)) < 0) {
return res;
}
if (pbtRx != NULL) {
if ((szRxLen + sz) > szRx) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Buffer size is too short: %" PRIuPTR " available(s), %" PRIuPTR " needed", szRx, szRxLen + sz);
return NFC_EOVFLOW;
}
// Copy the received bytes
for (i = 0; i < sz; i++) {
pbtRx[i + szRxLen] = abtRes[i + off];
}
}
szRxLen += (size_t)(sz & SYMBOL_FIFO_LEVEL);
sz = abtRes[sz + off];
if (sz == 0)
break;
}
// Recv corrected timer value
if (pnd->bCrc) {
// We've to compute CRC ourselves to know last byte actually sent
uint8_t *pbtTxRaw;
pbtTxRaw = (uint8_t *) malloc(szTx + 2);
if (!pbtTxRaw)
return NFC_ESOFT;
memcpy(pbtTxRaw, pbtTx, szTx);
if ((txmode & SYMBOL_TX_FRAMING) == 0x00)
iso14443a_crc_append(pbtTxRaw, szTx);
else if ((txmode & SYMBOL_TX_FRAMING) == 0x03)
iso14443b_crc_append(pbtTxRaw, szTx);
else
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unsupported framing type %02X, cannot adjust CRC cycles", txmode & SYMBOL_TX_FRAMING);
*cycles = __pn53x_get_timer(pnd, pbtTxRaw[szTx + 1]);
free(pbtTxRaw);
} else {
*cycles = __pn53x_get_timer(pnd, pbtTx[szTx - 1]);
}
return szRxLen;
}
int
pn53x_initiator_deselect_target(struct nfc_device *pnd)
{
pn53x_current_target_free(pnd);
return pn53x_InDeselect(pnd, 0); // 0 mean deselect all selected targets
}
static int pn53x_Diagnose06(struct nfc_device *pnd)
{
// Send Card Presence command
const uint8_t abtCmd[] = { Diagnose, 0x06 };
uint8_t abtRx[1];
int ret = 0;
int failures = 0;
// Card Presence command can take more time than default one: when a card is
// removed from the field, the PN53x took few hundred ms more to reply
// correctly. Longest delay observed was with a JCOP31 on a PN532.
// 1000 ms should be enough to detect all tested cases
while (failures < 2) {
if ((ret = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), abtRx, sizeof(abtRx), 1000)) != 1) {
// When it fails with a timeout (0x01) chip error, it means the target is not reacheable anymore
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) {
return NFC_ETGRELEASED;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
return NFC_SUCCESS;
}
}
return ret;
}
static int pn53x_ISO14443A_4_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping -4A");
if (CHIP_DATA(pnd)->type == PN533) {
ret = pn53x_Diagnose06(pnd);
if ((ret == NFC_ETIMEOUT) || (ret == NFC_ETGRELEASED)) {
// This happens e.g. when a JCOP31 is removed from PN533
// InRelease takes an abnormal time to reply so let's take care of it now with large timeout:
const uint8_t abtCmd[] = { InRelease, 0x00 };
pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 2000);
ret = NFC_ETGRELEASED;
}
} else if (CHIP_DATA(pnd)->type == PN532) {
// Diagnose06 failed completely with a JCOP31 on a PN532 so let's do it manually
if ((ret = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, false)) < 0)
return ret;
uint8_t abtCmd[1] = {0xb2}; // CID=0
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 300)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
ret = NFC_ETGRELEASED;
break;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
ret = NFC_SUCCESS;
break;
}
}
int ret2;
if ((ret2 = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, true)) < 0)
ret = ret2;
} else {
ret = NFC_EDEVNOTSUPP;
}
return ret;
}
static int pn53x_ISO14443A_Jewel_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping Jewel");
uint8_t abtCmd[1] = {0x78};
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
return NFC_ETGRELEASED;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
return NFC_SUCCESS;
}
}
return ret;
}
static int pn53x_ISO14443A_MFUL_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping MFUL");
// Limitation: test on MFULC non-authenticated with read of first sector forbidden will fail
if (CHIP_DATA(pnd)->type == PN533) {
ret = pn53x_Diagnose06(pnd);
} else {
uint8_t abtCmd[2] = {0x30, 0x00};
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
return NFC_ETGRELEASED;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
return NFC_SUCCESS;
}
}
}
return ret;
}
static int pn53x_ISO14443A_MFC_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping MFC");
if ((CHIP_DATA(pnd)->type == PN533) && (CHIP_DATA(pnd)->current_target->nti.nai.btSak != 0x09)) {
// MFC Mini (atqa0004/sak09) fails on PN533, so we exclude it
ret = pn53x_Diagnose06(pnd);
} else {
// Limitation: re-select will lose authentication of already authenticated sector
bool bInfiniteSelect = pnd->bInfiniteSelect;
uint8_t pbtInitiatorData[12];
size_t szInitiatorData = 0;
iso14443_cascade_uid(CHIP_DATA(pnd)->current_target->nti.nai.abtUid, CHIP_DATA(pnd)->current_target->nti.nai.szUidLen, pbtInitiatorData, &szInitiatorData);
if ((ret = pn53x_set_property_bool(pnd, NP_INFINITE_SELECT, false)) < 0)
return ret;
if ((ret = pn53x_initiator_select_passive_target_ext(pnd, CHIP_DATA(pnd)->current_target->nm, pbtInitiatorData, szInitiatorData, NULL, 300)) == 1) {
ret = NFC_SUCCESS;
} else if ((ret == 0) || (ret == NFC_ETIMEOUT)) {
ret = NFC_ETGRELEASED;
}
if (bInfiniteSelect) {
int ret2;
if ((ret2 = pn53x_set_property_bool(pnd, NP_INFINITE_SELECT, true)) < 0)
return ret2;
}
}
return ret;
}
static int pn53x_DEP_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping DEP");
if ((CHIP_DATA(pnd)->type == PN531) || (CHIP_DATA(pnd)->type == PN532) || (CHIP_DATA(pnd)->type == PN533))
ret = pn53x_Diagnose06(pnd);
else
ret = NFC_EDEVNOTSUPP;
return ret;
}
static int pn53x_Felica_is_present(struct nfc_device *pnd)
{
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping Felica");
// if (CHIP_DATA(pnd)->type == PN533) { ret = pn53x_Diagnose06(pnd); } else...
// Because ping fails now & then, better not to use Diagnose at all
// Limitation: does not work on Felica Lite cards (neither Diagnose nor our method)
uint8_t abtCmd[10] = {0x0A, 0x04};
memcpy(abtCmd + 2, CHIP_DATA(pnd)->current_target->nti.nfi.abtId, 8);
int failures = 0;
// Sometimes ping fails so we want to give the card some more chances...
while (failures < 3) {
if (nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 300) == 11) {
return NFC_SUCCESS;
} else {
failures++;
}
}
return NFC_ETGRELEASED;
}
static int pn53x_ISO14443B_4_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping -4B");
if (CHIP_DATA(pnd)->type == PN533) { // Not supported on PN532 even if the doc is same as for PN533
ret = pn53x_Diagnose06(pnd);
} else {
// Sending R(NACK) in raw:
if ((ret = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, false)) < 0)
return ret;
// uint8_t abtCmd[1] = {0xb2}; // if on PN533, CID=0
uint8_t abtCmd[2] = {0xba, 0x01}; // if on PN532, CID=1
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 300)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
ret = NFC_ETGRELEASED;
break;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
ret = NFC_SUCCESS;
break;
}
}
int ret2;
if ((ret2 = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, true)) < 0)
ret = ret2;
}
return ret;
}
static int pn53x_ISO14443B_I_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping B'");
// Sending ATTRIB in raw:
if ((ret = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, false)) < 0)
return ret;
uint8_t abtCmd[6] = {0x01, 0x0f};
memcpy(abtCmd + 2, CHIP_DATA(pnd)->current_target->nti.nii.abtDIV, 4);
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 300)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
ret = NFC_ETGRELEASED;
break;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
ret = NFC_SUCCESS;
break;
}
}
int ret2;
if ((ret2 = pn53x_set_property_bool(pnd, NP_EASY_FRAMING, true)) < 0)
ret = ret2;
return ret;
}
static int pn53x_ISO14443B_SR_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping B2 ST SRx");
// Sending Get_UID in raw: (EASY_FRAMING is already supposed to be false)
uint8_t abtCmd[1] = {0x0b};
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 300)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
ret = NFC_ETGRELEASED;
break;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
ret = NFC_SUCCESS;
break;
}
}
return ret;
}
static int pn53x_ISO14443B_CT_is_present(struct nfc_device *pnd)
{
int ret;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): Ping B2 ASK CTx");
// Sending SELECT in raw: (EASY_FRAMING is already supposed to be false)
uint8_t abtCmd[3] = {0x9f};
memcpy(abtCmd + 1, CHIP_DATA(pnd)->current_target->nti.nci.abtUID, 2);
int failures = 0;
while (failures < 2) {
if ((ret = nfc_initiator_transceive_bytes(pnd, abtCmd, sizeof(abtCmd), NULL, 0, 300)) < 1) {
if ((ret == NFC_ERFTRANS) && (CHIP_DATA(pnd)->last_status_byte == 0x01)) { // Timeout
ret = NFC_ETGRELEASED;
break;
} else { // Other errors can appear when card is tired-off, let's try again
failures++;
}
} else {
ret = NFC_SUCCESS;
break;
}
}
return ret;
}
int
pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target *pnt)
{
// Check if there is a saved target
if (CHIP_DATA(pnd)->current_target == NULL) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): no saved target");
return pnd->last_error = NFC_EINVARG;
}
// Check if the argument target nt is equals to current saved target
if ((pnt != NULL) && (!pn53x_current_target_is(pnd, pnt))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): another target");
return pnd->last_error = NFC_ETGRELEASED;
}
// Ping target
int ret = NFC_EDEVNOTSUPP;
switch (CHIP_DATA(pnd)->current_target->nm.nmt) {
case NMT_ISO14443A:
if (CHIP_DATA(pnd)->current_target->nti.nai.btSak & 0x20) {
ret = pn53x_ISO14443A_4_is_present(pnd);
} else if ((CHIP_DATA(pnd)->current_target->nti.nai.abtAtqa[0] == 0x00) &&
(CHIP_DATA(pnd)->current_target->nti.nai.abtAtqa[1] == 0x44) &&
(CHIP_DATA(pnd)->current_target->nti.nai.btSak == 0x00)) {
ret = pn53x_ISO14443A_MFUL_is_present(pnd);
} else if (CHIP_DATA(pnd)->current_target->nti.nai.btSak & 0x08) {
ret = pn53x_ISO14443A_MFC_is_present(pnd);
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "target_is_present(): card type A not supported");
ret = NFC_EDEVNOTSUPP;
}
break;
case NMT_DEP:
ret = pn53x_DEP_is_present(pnd);
break;
case NMT_FELICA:
ret = pn53x_Felica_is_present(pnd);
break;
case NMT_JEWEL:
ret = pn53x_ISO14443A_Jewel_is_present(pnd);
break;
case NMT_ISO14443B:
ret = pn53x_ISO14443B_4_is_present(pnd);
break;
case NMT_ISO14443BI:
ret = pn53x_ISO14443B_I_is_present(pnd);
break;
case NMT_ISO14443B2SR:
ret = pn53x_ISO14443B_SR_is_present(pnd);
break;
case NMT_ISO14443B2CT:
ret = pn53x_ISO14443B_CT_is_present(pnd);
break;
}
if (ret == NFC_ETGRELEASED)
pn53x_current_target_free(pnd);
return pnd->last_error = ret;
}
#define SAK_ISO14443_4_COMPLIANT 0x20
#define SAK_ISO18092_COMPLIANT 0x40
int
pn53x_target_init(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRxLen, int timeout)
{
pn53x_reset_settings(pnd);
CHIP_DATA(pnd)->operating_mode = TARGET;
pn53x_target_mode ptm = PTM_NORMAL;
int res = 0;
switch (pnt->nm.nmt) {
case NMT_ISO14443A:
ptm = PTM_PASSIVE_ONLY;
if ((pnt->nti.nai.abtUid[0] != 0x08) || (pnt->nti.nai.szUidLen != 4)) {
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
pn53x_set_parameters(pnd, PARAM_AUTO_ATR_RES, false);
if (CHIP_DATA(pnd)->type == PN532) { // We have a PN532
if ((pnt->nti.nai.btSak & SAK_ISO14443_4_COMPLIANT) && (pnd->bAutoIso14443_4)) {
// We have a ISO14443-4 tag to emulate and NP_AUTO_14443_4A option is enabled
ptm |= PTM_ISO14443_4_PICC_ONLY; // We add ISO14443-4 restriction
pn53x_set_parameters(pnd, PARAM_14443_4_PICC, true);
} else {
pn53x_set_parameters(pnd, PARAM_14443_4_PICC, false);
}
}
break;
case NMT_FELICA:
ptm = PTM_PASSIVE_ONLY;
break;
case NMT_DEP:
pn53x_set_parameters(pnd, PARAM_AUTO_ATR_RES, true);
ptm = PTM_DEP_ONLY;
if (pnt->nti.ndi.ndm == NDM_PASSIVE) {
ptm |= PTM_PASSIVE_ONLY; // We add passive mode restriction
}
break;
case NMT_ISO14443B:
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
case NMT_JEWEL:
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
// Let the PN53X be activated by the RF level detector from power down mode
if ((res = pn53x_write_register(pnd, PN53X_REG_CIU_TxAuto, SYMBOL_INITIAL_RF_ON, 0x04)) < 0)
return res;
uint8_t abtMifareParams[6];
uint8_t *pbtMifareParams = NULL;
uint8_t *pbtTkt = NULL;
size_t szTkt = 0;
uint8_t abtFeliCaParams[18];
uint8_t *pbtFeliCaParams = NULL;
const uint8_t *pbtNFCID3t = NULL;
const uint8_t *pbtGBt = NULL;
size_t szGBt = 0;
switch (pnt->nm.nmt) {
case NMT_ISO14443A: {
// Set ATQA (SENS_RES)
abtMifareParams[0] = pnt->nti.nai.abtAtqa[1];
abtMifareParams[1] = pnt->nti.nai.abtAtqa[0];
// Set UID
// Note: in this mode we can only emulate a single size (4 bytes) UID where the first is hard-wired by PN53x as 0x08
abtMifareParams[2] = pnt->nti.nai.abtUid[1];
abtMifareParams[3] = pnt->nti.nai.abtUid[2];
abtMifareParams[4] = pnt->nti.nai.abtUid[3];
// Set SAK (SEL_RES)
abtMifareParams[5] = pnt->nti.nai.btSak;
pbtMifareParams = abtMifareParams;
// Historical Bytes
pbtTkt = iso14443a_locate_historical_bytes(pnt->nti.nai.abtAts, pnt->nti.nai.szAtsLen, &szTkt);
}
break;
case NMT_FELICA:
// Set NFCID2t
memcpy(abtFeliCaParams, pnt->nti.nfi.abtId, 8);
// Set PAD
memcpy(abtFeliCaParams + 8, pnt->nti.nfi.abtPad, 8);
// Set SystemCode
memcpy(abtFeliCaParams + 16, pnt->nti.nfi.abtSysCode, 2);
pbtFeliCaParams = abtFeliCaParams;
break;
case NMT_DEP:
// Set NFCID3
pbtNFCID3t = pnt->nti.ndi.abtNFCID3;
// Set General Bytes, if relevant
szGBt = pnt->nti.ndi.szGB;
if (szGBt) pbtGBt = pnt->nti.ndi.abtGB;
// Set ISO/IEC 14443 part
// Set ATQA (SENS_RES)
abtMifareParams[0] = 0x08;
abtMifareParams[1] = 0x00;
// Set UID
// Note: in this mode we can only emulate a single size (4 bytes) UID where the first is hard-wired by PN53x as 0x08
abtMifareParams[2] = 0x12;
abtMifareParams[3] = 0x34;
abtMifareParams[4] = 0x56;
// Set SAK (SEL_RES)
abtMifareParams[5] = SAK_ISO18092_COMPLIANT; // Allow ISO/IEC 18092 in DEP mode
pbtMifareParams = abtMifareParams;
// Set FeliCa part
// Set NFCID2t
abtFeliCaParams[0] = 0x01;
abtFeliCaParams[1] = 0xfe;
abtFeliCaParams[2] = 0x12;
abtFeliCaParams[3] = 0x34;
abtFeliCaParams[4] = 0x56;
abtFeliCaParams[5] = 0x78;
abtFeliCaParams[6] = 0x90;
abtFeliCaParams[7] = 0x12;
// Set PAD
abtFeliCaParams[8] = 0xc0;
abtFeliCaParams[9] = 0xc1;
abtFeliCaParams[10] = 0xc2;
abtFeliCaParams[11] = 0xc3;
abtFeliCaParams[12] = 0xc4;
abtFeliCaParams[13] = 0xc5;
abtFeliCaParams[14] = 0xc6;
abtFeliCaParams[15] = 0xc7;
// Set System Code
abtFeliCaParams[16] = 0x0f;
abtFeliCaParams[17] = 0xab;
pbtFeliCaParams = abtFeliCaParams;
break;
case NMT_ISO14443B:
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
case NMT_JEWEL:
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
bool targetActivated = false;
size_t szRx;
while (!targetActivated) {
uint8_t btActivatedMode;
if ((res = pn53x_TgInitAsTarget(pnd, ptm, pbtMifareParams, pbtTkt, szTkt, pbtFeliCaParams, pbtNFCID3t, pbtGBt, szGBt, pbtRx, szRxLen, &btActivatedMode, timeout)) < 0) {
if (res == NFC_ETIMEOUT) {
pn53x_idle(pnd);
}
return res;
}
szRx = (size_t) res;
nfc_modulation nm = {
.nmt = NMT_DEP, // Silent compilation warnings
.nbr = NBR_UNDEFINED
};
nfc_dep_mode ndm = NDM_UNDEFINED;
// Decode activated "mode"
switch (btActivatedMode & 0x70) { // Baud rate
case 0x00: // 106kbps
nm.nbr = NBR_106;
break;
case 0x10: // 212kbps
nm.nbr = NBR_212;
break;
case 0x20: // 424kbps
nm.nbr = NBR_424;
break;
};
if (btActivatedMode & 0x04) { // D.E.P.
nm.nmt = NMT_DEP;
if ((btActivatedMode & 0x03) == 0x01) { // Active mode
ndm = NDM_ACTIVE;
} else { // Passive mode
ndm = NDM_PASSIVE;
}
} else { // Not D.E.P.
if ((btActivatedMode & 0x03) == 0x00) { // MIFARE
nm.nmt = NMT_ISO14443A;
} else if ((btActivatedMode & 0x03) == 0x02) { // FeliCa
nm.nmt = NMT_FELICA;
}
}
if (pnt->nm.nmt == nm.nmt) { // Actual activation have the right modulation type
if ((pnt->nm.nbr == NBR_UNDEFINED) || (pnt->nm.nbr == nm.nbr)) { // Have the right baud rate (or undefined)
if ((pnt->nm.nmt != NMT_DEP) || (pnt->nti.ndi.ndm == NDM_UNDEFINED) || (pnt->nti.ndi.ndm == ndm)) { // Have the right DEP mode (or is not a DEP)
targetActivated = true;
}
}
}
if (targetActivated) {
pnt->nm.nbr = nm.nbr; // Update baud rate
if (pnt->nm.nmt == NMT_DEP) {
pnt->nti.ndi.ndm = ndm; // Update DEP mode
}
if (pn53x_current_target_new(pnd, pnt) == NULL) {
pnd->last_error = NFC_ESOFT;
return pnd->last_error;
}
if (ptm & PTM_ISO14443_4_PICC_ONLY) {
// When PN532 is in PICC target mode, it automatically reply to RATS so
// we don't need to forward this command
szRx = 0;
}
}
}
return szRx;
}
int
pn53x_target_receive_bits(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtRxPar)
{
size_t szRxBits = 0;
uint8_t abtCmd[] = { TgGetInitiatorCommand };
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
int res = 0;
// Try to gather a received frame from the reader
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), abtRx, szRx, -1)) < 0)
return res;
szRx = (size_t) res;
// Get the last bit-count that is stored in the received byte
uint8_t ui8rcc;
if ((res = pn53x_read_register(pnd, PN53X_REG_CIU_Control, &ui8rcc)) < 0)
return res;
uint8_t ui8Bits = ui8rcc & SYMBOL_RX_LAST_BITS;
// Recover the real frame length in bits
size_t szFrameBits = ((szRx - 1 - ((ui8Bits == 0) ? 0 : 1)) * 8) + ui8Bits;
// Ignore the status byte from the PN53X here, it was checked earlier in pn53x_transceive()
// Check if we should recover the parity bits ourself
if (!pnd->bPar) {
// Unwrap the response frame
if ((res = pn53x_unwrap_frame(abtRx + 1, szFrameBits, pbtRx, pbtRxPar)) < 0)
return res;
szRxBits = res;
} else {
// Save the received bits
szRxBits = szFrameBits;
if ((szRx - 1) > szRxLen)
return NFC_EOVFLOW;
// Copy the received bytes
memcpy(pbtRx, abtRx + 1, szRx - 1);
}
// Everyting seems ok, return received bits count
return szRxBits;
}
int
pn53x_target_receive_bytes(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, int timeout)
{
uint8_t abtCmd[1];
// XXX I think this is not a clean way to provide some kind of "EasyFraming"
// but at the moment I have no more better than this
if (pnd->bEasyFraming) {
switch (CHIP_DATA(pnd)->current_target->nm.nmt) {
case NMT_DEP:
abtCmd[0] = TgGetData;
break;
case NMT_ISO14443A:
if (CHIP_DATA(pnd)->current_target->nti.nai.btSak & SAK_ISO14443_4_COMPLIANT) {
// We are dealing with a ISO/IEC 14443-4 compliant target
if ((CHIP_DATA(pnd)->type == PN532) && (pnd->bAutoIso14443_4)) {
// We are using ISO/IEC 14443-4 PICC emulation capability from the PN532
abtCmd[0] = TgGetData;
break;
} else {
// TODO Support EasyFraming for other cases by software
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
}
// NO BREAK
case NMT_JEWEL:
case NMT_ISO14443B:
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
case NMT_FELICA:
abtCmd[0] = TgGetInitiatorCommand;
break;
}
} else {
abtCmd[0] = TgGetInitiatorCommand;
}
// Try to gather a received frame from the reader
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
int res = 0;
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), abtRx, szRx, timeout)) < 0)
return pnd->last_error;
szRx = (size_t) res;
// Save the received bytes count
szRx -= 1;
if (szRx > szRxLen)
return NFC_EOVFLOW;
// Copy the received bytes
memcpy(pbtRx, abtRx + 1, szRx);
// Everyting seems ok, return received bytes count
return szRx;
}
int
pn53x_target_send_bits(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar)
{
size_t szFrameBits = 0;
size_t szFrameBytes = 0;
uint8_t ui8Bits = 0;
uint8_t abtCmd[PN53x_EXTENDED_FRAME__DATA_MAX_LEN] = { TgResponseToInitiator };
int res = 0;
// Check if we should prepare the parity bits ourself
if (!pnd->bPar) {
// Convert data with parity to a frame
if ((res = pn53x_wrap_frame(pbtTx, szTxBits, pbtTxPar, abtCmd + 1)) < 0)
return res;
szFrameBits = res;
} else {
szFrameBits = szTxBits;
}
// Retrieve the leading bits
ui8Bits = szFrameBits % 8;
// Get the amount of frame bytes + optional (1 byte if there are leading bits)
szFrameBytes = (szFrameBits / 8) + ((ui8Bits == 0) ? 0 : 1);
// When the parity is handled before us, we just copy the data
if (pnd->bPar)
memcpy(abtCmd + 1, pbtTx, szFrameBytes);
// Set the amount of transmission bits in the PN53X chip register
if ((res = pn53x_set_tx_bits(pnd, ui8Bits)) < 0)
return res;
// Try to send the bits to the reader
if ((res = pn53x_transceive(pnd, abtCmd, szFrameBytes + 1, NULL, 0, -1)) < 0)
return res;
// Everyting seems ok, return return sent bits count
return szTxBits;
}
int
pn53x_target_send_bytes(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout)
{
uint8_t abtCmd[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
int res = 0;
// We can not just send bytes without parity if while the PN53X expects we handled them
if (!pnd->bPar)
return NFC_ECHIP;
// XXX I think this is not a clean way to provide some kind of "EasyFraming"
// but at the moment I have no more better than this
if (pnd->bEasyFraming) {
switch (CHIP_DATA(pnd)->current_target->nm.nmt) {
case NMT_DEP:
abtCmd[0] = TgSetData;
break;
case NMT_ISO14443A:
if (CHIP_DATA(pnd)->current_target->nti.nai.btSak & SAK_ISO14443_4_COMPLIANT) {
// We are dealing with a ISO/IEC 14443-4 compliant target
if ((CHIP_DATA(pnd)->type == PN532) && (pnd->bAutoIso14443_4)) {
// We are using ISO/IEC 14443-4 PICC emulation capability from the PN532
abtCmd[0] = TgSetData;
break;
} else {
// TODO Support EasyFraming for other cases by software
pnd->last_error = NFC_ENOTIMPL;
return pnd->last_error;
}
}
// NO BREAK
case NMT_JEWEL:
case NMT_ISO14443B:
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
case NMT_FELICA:
abtCmd[0] = TgResponseToInitiator;
break;
}
} else {
abtCmd[0] = TgResponseToInitiator;
}
// Copy the data into the command frame
memcpy(abtCmd + 1, pbtTx, szTx);
// Try to send the bits to the reader
if ((res = pn53x_transceive(pnd, abtCmd, szTx + 1, NULL, 0, timeout)) < 0)
return res;
// Everyting seems ok, return sent byte count
return szTx;
}
static struct sErrorMessage {
int iErrorCode;
const char *pcErrorMsg;
} sErrorMessages[] = {
/* Chip-level errors (internal errors, RF errors, etc.) */
{ 0x00, "Success" },
{ ETIMEOUT, "Timeout" }, // Time Out, the target has not answered
{ ECRC, "CRC Error" }, // A CRC error has been detected by the CIU
{ EPARITY, "Parity Error" }, // A Parity error has been detected by the CIU
{ EBITCOUNT, "Erroneous Bit Count" }, // During an anti-collision/select operation (ISO/IEC14443-3 Type A and ISO/IEC18092 106 kbps passive mode), an erroneous Bit Count has been detected
{ EFRAMING, "Framing Error" }, // Framing error during MIFARE operation
{ EBITCOLL, "Bit-collision" }, // An abnormal bit-collision has been detected during bit wise anti-collision at 106 kbps
{ ESMALLBUF, "Communication Buffer Too Small" }, // Communication buffer size insufficient
{ EBUFOVF, "Buffer Overflow" }, // RF Buffer overflow has been detected by the CIU (bit BufferOvfl of the register CIU_Error)
{ ERFPROTO, "RF Protocol Error" }, // RF Protocol error (see PN53x manual)
{ EOVHEAT, "Chip Overheating" }, // Temperature error: the internal temperature sensor has detected overheating, and therefore has automatically switched off the antenna drivers
{ EINBUFOVF, "Internal Buffer overflow."}, // Internal buffer overflow
{ EINVPARAM, "Invalid Parameter"}, // Invalid parameter (range, format, …)
{ EOPNOTALL, "Operation Not Allowed" }, // Operation not allowed in this configuration (host controller interface)
{ ECMD, "Command Not Acceptable" }, // Command is not acceptable due to the current context
{ EOVCURRENT, "Over Current" },
/* DEP errors */
{ ERFTIMEOUT, "RF Timeout" }, // In active communication mode, the RF field has not been switched on in time by the counterpart (as defined in NFCIP-1 standard)
{ EDEPUNKCMD, "Unknown DEP Command" },
{ EDEPINVSTATE, "Invalid DEP State" }, // DEP Protocol: Invalid device state, the system is in a state which does not allow the operation
{ ENAD, "NAD Missing in DEP Frame" },
/* MIFARE */
{ EMFAUTH, "Mifare Authentication Error" },
/* Misc */
{ EINVRXFRAM, "Invalid Received Frame" }, // DEP Protocol, Mifare or ISO/IEC14443-4: The data format does not match to the specification.
{ ENSECNOTSUPP, "NFC Secure not supported" }, // Target or Initiator does not support NFC Secure
{ EBCC, "Wrong UID Check Byte (BCC)" }, // ISO/IEC14443-3: UID Check byte is wrong
{ ETGREL, "Target Released" }, // Target have been released by initiator
{ ECID, "Card ID Mismatch" }, // ISO14443 type B: Card ID mismatch, meaning that the expected card has been exchanged with another one.
{ ECDISCARDED, "Card Discarded" }, // ISO/IEC14443 type B: the card previously activated has disappeared.
{ ENFCID3, "NFCID3 Mismatch" },
};
const char *
pn53x_strerror(const struct nfc_device *pnd)
{
const char *pcRes = "Unknown error";
size_t i;
for (i = 0; i < (sizeof(sErrorMessages) / sizeof(struct sErrorMessage)); i++) {
if (sErrorMessages[i].iErrorCode == CHIP_DATA(pnd)->last_status_byte) {
pcRes = sErrorMessages[i].pcErrorMsg;
break;
}
}
return pcRes;
}
int
pn53x_RFConfiguration__RF_field(struct nfc_device *pnd, bool bEnable)
{
uint8_t abtCmd[] = { RFConfiguration, RFCI_FIELD, (bEnable) ? 0x01 : 0x00 };
return pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
}
int
pn53x_RFConfiguration__Various_timings(struct nfc_device *pnd, const uint8_t fATR_RES_Timeout, const uint8_t fRetryTimeout)
{
uint8_t abtCmd[] = {
RFConfiguration,
RFCI_TIMING,
0x00, // RFU
fATR_RES_Timeout, // ATR_RES timeout (default: 0x0B 102.4 ms)
fRetryTimeout // TimeOut during non-DEP communications (default: 0x0A 51.2 ms)
};
return pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
}
int
pn53x_RFConfiguration__MaxRtyCOM(struct nfc_device *pnd, const uint8_t MaxRtyCOM)
{
uint8_t abtCmd[] = {
RFConfiguration,
RFCI_RETRY_DATA,
MaxRtyCOM // MaxRtyCOM, default: 0x00 (no retry, only one try), inifite: 0xff
};
return pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
}
int
pn53x_RFConfiguration__MaxRetries(struct nfc_device *pnd, const uint8_t MxRtyATR, const uint8_t MxRtyPSL, const uint8_t MxRtyPassiveActivation)
{
// Retry format: 0x00 means only 1 try, 0xff means infinite
uint8_t abtCmd[] = {
RFConfiguration,
RFCI_RETRY_SELECT,
MxRtyATR, // MxRtyATR, default: active = 0xff, passive = 0x02
MxRtyPSL, // MxRtyPSL, default: 0x01
MxRtyPassiveActivation // MxRtyPassiveActivation, default: 0xff (0x00 leads to problems with PN531)
};
return pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
}
int
pn53x_SetParameters(struct nfc_device *pnd, const uint8_t ui8Value)
{
uint8_t abtCmd[] = { SetParameters, ui8Value };
int res = 0;
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1)) < 0) {
return res;
}
// We save last parameters in register cache
CHIP_DATA(pnd)->ui8Parameters = ui8Value;
return NFC_SUCCESS;
}
int
pn532_SAMConfiguration(struct nfc_device *pnd, const pn532_sam_mode sam_mode, int timeout)
{
uint8_t abtCmd[] = { SAMConfiguration, sam_mode, 0x00, 0x00 };
size_t szCmd = sizeof(abtCmd);
if (CHIP_DATA(pnd)->type != PN532) {
// This function is not supported by pn531 neither pn533
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
switch (sam_mode) {
case PSM_NORMAL: // Normal mode
case PSM_WIRED_CARD: // Wired card mode
szCmd = 2;
break;
case PSM_VIRTUAL_CARD: // Virtual card mode
case PSM_DUAL_CARD: // Dual card mode
// TODO Implement timeout handling
szCmd = 3;
break;
default:
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
CHIP_DATA(pnd)->sam_mode = sam_mode;
return (pn53x_transceive(pnd, abtCmd, szCmd, NULL, 0, timeout));
}
int
pn53x_PowerDown(struct nfc_device *pnd)
{
uint8_t abtCmd[] = { PowerDown, 0xf0 };
int res;
if ((res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1)) < 0)
return res;
CHIP_DATA(pnd)->power_mode = LOWVBAT;
return res;
}
/**
* @brief C wrapper to InListPassiveTarget command
* @return Returns selected targets count on success, otherwise returns libnfc's error code (negative value)
*
* @param pnd struct nfc_device struct pointer that represent currently used device
* @param pmInitModulation Desired modulation
* @param pbtInitiatorData Optional initiator data used for Felica, ISO14443B, Topaz Polling or for ISO14443A selecting a specific UID
* @param szInitiatorData Length of initiator data \a pbtInitiatorData
* @param pbtTargetsData pointer on a pre-allocated byte array to receive TargetData[n] as described in pn53x user manual
* @param pszTargetsData size_t pointer where size of \a pbtTargetsData will be written
*
* @note Selected targets count can be found in \a pbtTargetsData[0] if available (i.e. \a pszTargetsData content is more than 0)
* @note To decode theses TargetData[n], there is @fn pn53x_decode_target_data
*/
int
pn53x_InListPassiveTarget(struct nfc_device *pnd,
const pn53x_modulation pmInitModulation, const uint8_t szMaxTargets,
const uint8_t *pbtInitiatorData, const size_t szInitiatorData,
uint8_t *pbtTargetsData, size_t *pszTargetsData,
int timeout)
{
uint8_t abtCmd[15] = { InListPassiveTarget };
abtCmd[1] = szMaxTargets; // MaxTg
switch (pmInitModulation) {
case PM_ISO14443A_106:
case PM_FELICA_212:
case PM_FELICA_424:
// all gone fine.
break;
case PM_ISO14443B_106:
if (!(pnd->btSupportByte & SUPPORT_ISO14443B)) {
// Eg. Some PN532 doesn't support type B!
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
break;
case PM_JEWEL_106:
if (CHIP_DATA(pnd)->type == PN531) {
// These modulations are not supported by pn531
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
break;
case PM_ISO14443B_212:
case PM_ISO14443B_424:
case PM_ISO14443B_847:
if ((CHIP_DATA(pnd)->type != PN533) || (!(pnd->btSupportByte & SUPPORT_ISO14443B))) {
// These modulations are not supported by pn531 neither pn532
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
break;
case PM_UNDEFINED:
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
abtCmd[2] = pmInitModulation; // BrTy, the type of init modulation used for polling a passive tag
// Set the optional initiator data (used for Felica, ISO14443B, Topaz Polling or for ISO14443A selecting a specific UID).
if (pbtInitiatorData)
memcpy(abtCmd + 3, pbtInitiatorData, szInitiatorData);
int res = 0;
if ((res = pn53x_transceive(pnd, abtCmd, 3 + szInitiatorData, pbtTargetsData, *pszTargetsData, timeout)) < 0) {
return res;
}
*pszTargetsData = (size_t) res;
return pbtTargetsData[0];
}
int
pn53x_InDeselect(struct nfc_device *pnd, const uint8_t ui8Target)
{
if (CHIP_DATA(pnd)->type == RCS360) {
// We should do act here *only* if a target was previously selected
uint8_t abtStatus[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szStatus = sizeof(abtStatus);
uint8_t abtCmdGetStatus[] = { GetGeneralStatus };
int res = 0;
if ((res = pn53x_transceive(pnd, abtCmdGetStatus, sizeof(abtCmdGetStatus), abtStatus, szStatus, -1)) < 0) {
return res;
}
szStatus = (size_t) res;
if ((szStatus < 3) || (abtStatus[2] == 0)) {
return NFC_SUCCESS;
}
// No much choice what to deselect actually...
uint8_t abtCmdRcs360[] = { InDeselect, 0x01, 0x01 };
return (pn53x_transceive(pnd, abtCmdRcs360, sizeof(abtCmdRcs360), NULL, 0, -1));
}
uint8_t abtCmd[] = { InDeselect, ui8Target };
return (pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1));
}
int
pn53x_InRelease(struct nfc_device *pnd, const uint8_t ui8Target)
{
int res = 0;
if (CHIP_DATA(pnd)->type == RCS360) {
// We should do act here *only* if a target was previously selected
uint8_t abtStatus[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szStatus = sizeof(abtStatus);
uint8_t abtCmdGetStatus[] = { GetGeneralStatus };
if ((res = pn53x_transceive(pnd, abtCmdGetStatus, sizeof(abtCmdGetStatus), abtStatus, szStatus, -1)) < 0) {
return res;
}
szStatus = (size_t) res;
if ((szStatus < 3) || (abtStatus[2] == 0)) {
return NFC_SUCCESS;
}
// No much choice what to release actually...
uint8_t abtCmdRcs360[] = { InRelease, 0x01, 0x01 };
res = pn53x_transceive(pnd, abtCmdRcs360, sizeof(abtCmdRcs360), NULL, 0, -1);
return (res >= 0) ? NFC_SUCCESS : res;
}
uint8_t abtCmd[] = { InRelease, ui8Target };
res = pn53x_transceive(pnd, abtCmd, sizeof(abtCmd), NULL, 0, -1);
return (res >= 0) ? NFC_SUCCESS : res;
}
int
pn53x_InAutoPoll(struct nfc_device *pnd,
const pn53x_target_type *ppttTargetTypes, const size_t szTargetTypes,
const uint8_t btPollNr, const uint8_t btPeriod, nfc_target *pntTargets, const int timeout)
{
size_t szTargetFound = 0;
if (CHIP_DATA(pnd)->type != PN532) {
// This function is not supported by pn531 neither pn533
pnd->last_error = NFC_EDEVNOTSUPP;
return pnd->last_error;
}
// InAutoPoll frame looks like this { 0xd4, 0x60, 0x0f, 0x01, 0x00 } => { direction, command, pollnr, period, types... }
size_t szTxInAutoPoll = 3 + szTargetTypes;
uint8_t abtCmd[3 + 15] = { InAutoPoll, btPollNr, btPeriod };
for (size_t n = 0; n < szTargetTypes; n++) {
abtCmd[3 + n] = ppttTargetTypes[n];
}
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
int res = pn53x_transceive(pnd, abtCmd, szTxInAutoPoll, abtRx, szRx, timeout);
szRx = (size_t) res;
if (res < 0) {
return res;
} else if (szRx > 0) {
szTargetFound = abtRx[0];
if (szTargetFound > 0) {
uint8_t ln;
uint8_t *pbt = abtRx + 1;
/* 1st target */
// Target type
pn53x_target_type ptt = *(pbt++);
pntTargets[0].nm = pn53x_ptt_to_nm(ptt);
// AutoPollTargetData length
ln = *(pbt++);
if ((res = pn53x_decode_target_data(pbt, ln, CHIP_DATA(pnd)->type, pntTargets[0].nm.nmt, &(pntTargets[0].nti))) < 0) {
return res;
}
pbt += ln;
if (abtRx[0] > 1) {
/* 2nd target */
// Target type
ptt = *(pbt++);
pntTargets[1].nm = pn53x_ptt_to_nm(ptt);
// AutoPollTargetData length
ln = *(pbt++);
pn53x_decode_target_data(pbt, ln, CHIP_DATA(pnd)->type, pntTargets[1].nm.nmt, &(pntTargets[1].nti));
}
}
}
return szTargetFound;
}
/**
* @brief Wrapper for InJumpForDEP command
* @param pmInitModulation desired initial modulation
* @param pbtPassiveInitiatorData NFCID1 (4 bytes) at 106kbps (optionnal, see NFCIP-1: 11.2.1.26) or Polling Request Frame's payload (5 bytes) at 212/424kbps (mandatory, see NFCIP-1: 11.2.2.5)
* @param szPassiveInitiatorData size of pbtPassiveInitiatorData content
* @param pbtNFCID3i NFCID3 of the initiator
* @param pbtGBi General Bytes of the initiator
* @param szGBi count of General Bytes
* @param[out] pnt \a nfc_target which will be filled by this function
*/
int
pn53x_InJumpForDEP(struct nfc_device *pnd,
const nfc_dep_mode ndm,
const nfc_baud_rate nbr,
const uint8_t *pbtPassiveInitiatorData,
const uint8_t *pbtNFCID3i,
const uint8_t *pbtGBi, const size_t szGBi,
nfc_target *pnt,
const int timeout)
{
// Max frame size = 1 (Command) + 1 (ActPass) + 1 (Baud rate) + 1 (Next) + 5 (PassiveInitiatorData) + 10 (NFCID3) + 48 (General bytes) = 67 bytes
uint8_t abtCmd[67] = { InJumpForDEP, (ndm == NDM_ACTIVE) ? 0x01 : 0x00 };
size_t offset = 4; // 1 byte for command, 1 byte for DEP mode (Active/Passive), 1 byte for baud rate, 1 byte for following parameters flag
switch (nbr) {
case NBR_106:
abtCmd[2] = 0x00; // baud rate is 106 kbps
if (pbtPassiveInitiatorData && (ndm == NDM_PASSIVE)) { /* can't have passive initiator data when using active mode */
abtCmd[3] |= 0x01;
memcpy(abtCmd + offset, pbtPassiveInitiatorData, 4);
offset += 4;
}
break;
case NBR_212:
abtCmd[2] = 0x01; // baud rate is 212 kbps
if (pbtPassiveInitiatorData && (ndm == NDM_PASSIVE)) {
abtCmd[3] |= 0x01;
memcpy(abtCmd + offset, pbtPassiveInitiatorData, 5);
offset += 5;
}
break;
case NBR_424:
abtCmd[2] = 0x02; // baud rate is 424 kbps
if (pbtPassiveInitiatorData && (ndm == NDM_PASSIVE)) {
abtCmd[3] |= 0x01;
memcpy(abtCmd + offset, pbtPassiveInitiatorData, 5);
offset += 5;
}
break;
case NBR_847:
case NBR_UNDEFINED:
pnd->last_error = NFC_EINVARG;
return pnd->last_error;
}
if (pbtNFCID3i) {
abtCmd[3] |= 0x02;
memcpy(abtCmd + offset, pbtNFCID3i, 10);
offset += 10;
}
if (szGBi && pbtGBi) {
abtCmd[3] |= 0x04;
memcpy(abtCmd + offset, pbtGBi, szGBi);
offset += szGBi;
}
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
int res = 0;
// Try to find a target, call the transceive callback function of the current device
if ((res = pn53x_transceive(pnd, abtCmd, offset, abtRx, szRx, timeout)) < 0)
return res;
szRx = (size_t) res;
// Make sure one target has been found, the PN53X returns 0x00 if none was available
if (abtRx[1] >= 1) {
// Is a target struct available
if (pnt) {
pnt->nm.nmt = NMT_DEP;
pnt->nm.nbr = nbr;
pnt->nti.ndi.ndm = ndm;
memcpy(pnt->nti.ndi.abtNFCID3, abtRx + 2, 10);
pnt->nti.ndi.btDID = abtRx[12];
pnt->nti.ndi.btBS = abtRx[13];
pnt->nti.ndi.btBR = abtRx[14];
pnt->nti.ndi.btTO = abtRx[15];
pnt->nti.ndi.btPP = abtRx[16];
if (szRx > 17) {
pnt->nti.ndi.szGB = szRx - 17;
memcpy(pnt->nti.ndi.abtGB, abtRx + 17, pnt->nti.ndi.szGB);
} else {
pnt->nti.ndi.szGB = 0;
}
}
}
return abtRx[1];
}
int
pn53x_TgInitAsTarget(struct nfc_device *pnd, pn53x_target_mode ptm,
const uint8_t *pbtMifareParams,
const uint8_t *pbtTkt, size_t szTkt,
const uint8_t *pbtFeliCaParams,
const uint8_t *pbtNFCID3t, const uint8_t *pbtGBt, const size_t szGBt,
uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtModeByte, int timeout)
{
uint8_t abtCmd[39 + 47 + 48] = { TgInitAsTarget }; // Worst case: 39-byte base, 47 bytes max. for General Bytes, 48 bytes max. for Historical Bytes
size_t szOptionalBytes = 0;
int res = 0;
// Clear the target init struct, reset to all zeros
memset(abtCmd + 1, 0x00, sizeof(abtCmd) - 1);
// Store the target mode in the initialization params
abtCmd[1] = ptm;
// MIFARE part
if (pbtMifareParams) {
memcpy(abtCmd + 2, pbtMifareParams, 6);
}
// FeliCa part
if (pbtFeliCaParams) {
memcpy(abtCmd + 8, pbtFeliCaParams, 18);
}
// DEP part
if (pbtNFCID3t) {
memcpy(abtCmd + 26, pbtNFCID3t, 10);
}
// General Bytes (ISO/IEC 18092)
if ((CHIP_DATA(pnd)->type == PN531) || (CHIP_DATA(pnd)->type == RCS360)) {
if (szGBt) {
memcpy(abtCmd + 36, pbtGBt, szGBt);
szOptionalBytes = szGBt;
}
} else {
abtCmd[36] = (uint8_t)(szGBt);
if (szGBt) {
memcpy(abtCmd + 37, pbtGBt, szGBt);
}
szOptionalBytes = szGBt + 1;
}
// Historical bytes (ISO/IEC 14443-4)
if ((CHIP_DATA(pnd)->type != PN531) && (CHIP_DATA(pnd)->type != RCS360)) { // PN531 does not handle Historical Bytes
abtCmd[36 + szOptionalBytes] = (uint8_t)(szTkt);
if (szTkt) {
memcpy(abtCmd + 37 + szOptionalBytes, pbtTkt, szTkt);
}
szOptionalBytes += szTkt + 1;
}
// Request the initialization as a target
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
if ((res = pn53x_transceive(pnd, abtCmd, 36 + szOptionalBytes, abtRx, szRx, timeout)) < 0)
return res;
szRx = (size_t) res;
// Note: the first byte is skip:
// its the "mode" byte which contains baudrate, DEP and Framing type (Mifare, active or FeliCa) datas.
if (pbtModeByte) {
*pbtModeByte = abtRx[0];
}
// Save the received byte count
szRx -= 1;
if ((szRx - 1) > szRxLen)
return NFC_EOVFLOW;
// Copy the received bytes
memcpy(pbtRx, abtRx + 1, szRx);
return szRx;
}
int
pn53x_check_ack_frame(struct nfc_device *pnd, const uint8_t *pbtRxFrame, const size_t szRxFrameLen)
{
if (szRxFrameLen >= sizeof(pn53x_ack_frame)) {
if (0 == memcmp(pbtRxFrame, pn53x_ack_frame, sizeof(pn53x_ack_frame))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "PN53x ACKed");
return NFC_SUCCESS;
}
}
pnd->last_error = NFC_EIO;
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "%s", "Unexpected PN53x reply!");
return pnd->last_error;
}
int
pn53x_check_error_frame(struct nfc_device *pnd, const uint8_t *pbtRxFrame, const size_t szRxFrameLen)
{
if (szRxFrameLen >= sizeof(pn53x_error_frame)) {
if (0 == memcmp(pbtRxFrame, pn53x_error_frame, sizeof(pn53x_error_frame))) {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", "PN53x sent an error frame");
pnd->last_error = NFC_EIO;
return pnd->last_error;
}
}
return NFC_SUCCESS;
}
/**
* @brief Build a PN53x frame
*
* @param pbtData payload (bytes array) of the frame, will become PD0, ..., PDn in PN53x frame
* @note The first byte of pbtData is the Command Code (CC)
*/
int
pn53x_build_frame(uint8_t *pbtFrame, size_t *pszFrame, const uint8_t *pbtData, const size_t szData)
{
if (szData <= PN53x_NORMAL_FRAME__DATA_MAX_LEN) {
// LEN - Packet length = data length (len) + checksum (1) + end of stream marker (1)
pbtFrame[3] = szData + 1;
// LCS - Packet length checksum
pbtFrame[4] = 256 - (szData + 1);
// TFI
pbtFrame[5] = 0xD4;
// DATA - Copy the PN53X command into the packet buffer
memcpy(pbtFrame + 6, pbtData, szData);
// DCS - Calculate data payload checksum
uint8_t btDCS = (256 - 0xD4);
for (size_t szPos = 0; szPos < szData; szPos++) {
btDCS -= pbtData[szPos];
}
pbtFrame[6 + szData] = btDCS;
// 0x00 - End of stream marker
pbtFrame[szData + 7] = 0x00;
(*pszFrame) = szData + PN53x_NORMAL_FRAME__OVERHEAD;
} else if (szData <= PN53x_EXTENDED_FRAME__DATA_MAX_LEN) {
// Extended frame marker
pbtFrame[3] = 0xff;
pbtFrame[4] = 0xff;
// LENm
pbtFrame[5] = (szData + 1) >> 8;
// LENl
pbtFrame[6] = (szData + 1) & 0xff;
// LCS
pbtFrame[7] = 256 - ((pbtFrame[5] + pbtFrame[6]) & 0xff);
// TFI
pbtFrame[8] = 0xD4;
// DATA - Copy the PN53X command into the packet buffer
memcpy(pbtFrame + 9, pbtData, szData);
// DCS - Calculate data payload checksum
uint8_t btDCS = (256 - 0xD4);
for (size_t szPos = 0; szPos < szData; szPos++) {
btDCS -= pbtData[szPos];
}
pbtFrame[9 + szData] = btDCS;
// 0x00 - End of stream marker
pbtFrame[szData + 10] = 0x00;
(*pszFrame) = szData + PN53x_EXTENDED_FRAME__OVERHEAD;
} else {
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "We can't send more than %d bytes in a raw (requested: %" PRIdPTR ")", PN53x_EXTENDED_FRAME__DATA_MAX_LEN, szData);
return NFC_ECHIP;
}
return NFC_SUCCESS;
}
pn53x_modulation
pn53x_nm_to_pm(const nfc_modulation nm)
{
switch (nm.nmt) {
case NMT_ISO14443A:
return PM_ISO14443A_106;
case NMT_ISO14443B:
switch (nm.nbr) {
case NBR_106:
return PM_ISO14443B_106;
case NBR_212:
return PM_ISO14443B_212;
case NBR_424:
return PM_ISO14443B_424;
case NBR_847:
return PM_ISO14443B_847;
case NBR_UNDEFINED:
// Nothing to do...
break;
}
break;
case NMT_JEWEL:
return PM_JEWEL_106;
case NMT_FELICA:
switch (nm.nbr) {
case NBR_212:
return PM_FELICA_212;
case NBR_424:
return PM_FELICA_424;
case NBR_106:
case NBR_847:
case NBR_UNDEFINED:
// Nothing to do...
break;
}
break;
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
case NMT_DEP:
// Nothing to do...
break;
}
return PM_UNDEFINED;
}
nfc_modulation
pn53x_ptt_to_nm(const pn53x_target_type ptt)
{
switch (ptt) {
case PTT_GENERIC_PASSIVE_106:
case PTT_GENERIC_PASSIVE_212:
case PTT_GENERIC_PASSIVE_424:
case PTT_UNDEFINED:
// XXX This should not happend, how handle it cleanly ?
break;
case PTT_MIFARE:
case PTT_ISO14443_4A_106:
return (const nfc_modulation) { .nmt = NMT_ISO14443A, .nbr = NBR_106 };
case PTT_ISO14443_4B_106:
case PTT_ISO14443_4B_TCL_106:
return (const nfc_modulation) { .nmt = NMT_ISO14443B, .nbr = NBR_106 };
case PTT_JEWEL_106:
return (const nfc_modulation) { .nmt = NMT_JEWEL, .nbr = NBR_106 };
case PTT_FELICA_212:
return (const nfc_modulation) { .nmt = NMT_FELICA, .nbr = NBR_212 };
case PTT_FELICA_424:
return (const nfc_modulation) { .nmt = NMT_FELICA, .nbr = NBR_424 };
case PTT_DEP_PASSIVE_106:
case PTT_DEP_ACTIVE_106:
return (const nfc_modulation) { .nmt = NMT_DEP, .nbr = NBR_106 };
case PTT_DEP_PASSIVE_212:
case PTT_DEP_ACTIVE_212:
return (const nfc_modulation) { .nmt = NMT_DEP, .nbr = NBR_212 };
case PTT_DEP_PASSIVE_424:
case PTT_DEP_ACTIVE_424:
return (const nfc_modulation) { .nmt = NMT_DEP, .nbr = NBR_424 };
}
// We should never be here, this line silent compilation warning
return (const nfc_modulation) { .nmt = NMT_ISO14443A, .nbr = NBR_106 };
}
pn53x_target_type
pn53x_nm_to_ptt(const nfc_modulation nm)
{
switch (nm.nmt) {
case NMT_ISO14443A:
return PTT_MIFARE;
// return PTT_ISO14443_4A_106;
case NMT_ISO14443B:
switch (nm.nbr) {
case NBR_106:
return PTT_ISO14443_4B_106;
case NBR_UNDEFINED:
case NBR_212:
case NBR_424:
case NBR_847:
// Nothing to do...
break;
}
break;
case NMT_JEWEL:
return PTT_JEWEL_106;
case NMT_FELICA:
switch (nm.nbr) {
case NBR_212:
return PTT_FELICA_212;
case NBR_424:
return PTT_FELICA_424;
case NBR_UNDEFINED:
case NBR_106:
case NBR_847:
// Nothing to do...
break;
}
break;
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
case NMT_DEP:
// Nothing to do...
break;
}
return PTT_UNDEFINED;
}
int
pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt)
{
switch (mode) {
case N_TARGET:
*supported_mt = CHIP_DATA(pnd)->supported_modulation_as_target;
break;
case N_INITIATOR:
*supported_mt = CHIP_DATA(pnd)->supported_modulation_as_initiator;
break;
default:
return NFC_EINVARG;
}
return NFC_SUCCESS;
}
int
pn53x_get_supported_baud_rate(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br)
{
switch (nmt) {
case NMT_FELICA:
*supported_br = (nfc_baud_rate *)pn53x_felica_supported_baud_rates;
break;
case NMT_ISO14443A: {
if ((CHIP_DATA(pnd)->type != PN533) || (mode == N_TARGET)) {
*supported_br = (nfc_baud_rate *)pn532_iso14443a_supported_baud_rates;
} else {
*supported_br = (nfc_baud_rate *)pn533_iso14443a_supported_baud_rates;
}
}
break;
case NMT_ISO14443B: {
if ((CHIP_DATA(pnd)->type != PN533)) {
*supported_br = (nfc_baud_rate *)pn532_iso14443b_supported_baud_rates;
} else {
*supported_br = (nfc_baud_rate *)pn533_iso14443b_supported_baud_rates;
}
}
break;
case NMT_ISO14443BI:
case NMT_ISO14443B2SR:
case NMT_ISO14443B2CT:
*supported_br = (nfc_baud_rate *)pn532_iso14443b_supported_baud_rates;
break;
case NMT_JEWEL:
*supported_br = (nfc_baud_rate *)pn53x_jewel_supported_baud_rates;
break;
case NMT_DEP:
*supported_br = (nfc_baud_rate *)pn53x_dep_supported_baud_rates;
break;
default:
return NFC_EINVARG;
}
return NFC_SUCCESS;
}
int
pn53x_get_information_about(nfc_device *pnd, char **pbuf)
{
size_t buflen = 2048;
*pbuf = malloc(buflen);
if (! *pbuf) {
return NFC_ESOFT;
}
char *buf = *pbuf;
int res;
if ((res = snprintf(buf, buflen, "chip: %s\n", CHIP_DATA(pnd)->firmware_text)) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
if ((res = snprintf(buf, buflen, "initator mode modulations: ")) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
const nfc_modulation_type *nmt;
if ((res = nfc_device_get_supported_modulation(pnd, N_INITIATOR, &nmt)) < 0) {
free(*pbuf);
return res;
}
for (int i = 0; nmt[i]; i++) {
if ((res = snprintf(buf, buflen, "%s%s (", (i == 0) ? "" : ", ", str_nfc_modulation_type(nmt[i]))) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
const nfc_baud_rate *nbr;
if ((res = nfc_device_get_supported_baud_rate(pnd, N_INITIATOR, nmt[i], &nbr)) < 0) {
free(*pbuf);
return res;
}
for (int j = 0; nbr[j]; j++) {
if ((res = snprintf(buf, buflen, "%s%s", (j == 0) ? "" : ", ", str_nfc_baud_rate(nbr[j]))) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
}
if ((res = snprintf(buf, buflen, ")")) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
}
if ((res = snprintf(buf, buflen, "\n")) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
if ((res = snprintf(buf, buflen, "target mode modulations: ")) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
if ((res = nfc_device_get_supported_modulation(pnd, N_TARGET, &nmt)) < 0) {
free(*pbuf);
return res;
}
for (int i = 0; nmt[i]; i++) {
if ((res = snprintf(buf, buflen, "%s%s (", (i == 0) ? "" : ", ", str_nfc_modulation_type(nmt[i]))) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
const nfc_baud_rate *nbr;
if ((res = nfc_device_get_supported_baud_rate(pnd, N_TARGET, nmt[i], &nbr)) < 0) {
free(*pbuf);
return res;
}
for (int j = 0; nbr[j]; j++) {
if ((res = snprintf(buf, buflen, "%s%s", (j == 0) ? "" : ", ", str_nfc_baud_rate(nbr[j]))) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
}
if ((res = snprintf(buf, buflen, ")")) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
buflen -= res;
}
if ((res = snprintf(buf, buflen, "\n")) < 0) {
free(*pbuf);
return NFC_ESOFT;
}
//buf += res;
if (buflen <= (size_t)res) {
free(*pbuf);
return NFC_EOVFLOW;
}
//buflen -= res;
return NFC_SUCCESS;
}
void *
pn53x_current_target_new(const struct nfc_device *pnd, const nfc_target *pnt)
{
if (pnt == NULL) {
return NULL;
}
// Keep the current nfc_target for further commands
if (CHIP_DATA(pnd)->current_target) {
free(CHIP_DATA(pnd)->current_target);
}
CHIP_DATA(pnd)->current_target = malloc(sizeof(nfc_target));
if (!CHIP_DATA(pnd)->current_target) {
return NULL;
}
memcpy(CHIP_DATA(pnd)->current_target, pnt, sizeof(nfc_target));
return CHIP_DATA(pnd)->current_target;
}
void
pn53x_current_target_free(const struct nfc_device *pnd)
{
if (CHIP_DATA(pnd)->current_target) {
free(CHIP_DATA(pnd)->current_target);
CHIP_DATA(pnd)->current_target = NULL;
}
}
bool
pn53x_current_target_is(const struct nfc_device *pnd, const nfc_target *pnt)
{
if ((CHIP_DATA(pnd)->current_target == NULL) || (pnt == NULL)) {
return false;
}
// XXX It will not work if it is not binary-equal to current target
if (0 != memcmp(pnt, CHIP_DATA(pnd)->current_target, sizeof(nfc_target))) {
return false;
}
return true;
}
void *
pn53x_data_new(struct nfc_device *pnd, const struct pn53x_io *io)
{
pnd->chip_data = malloc(sizeof(struct pn53x_data));
if (!pnd->chip_data) {
return NULL;
}
// Keep I/O functions
CHIP_DATA(pnd)->io = io;
// Set type to generic (means unknown)
CHIP_DATA(pnd)->type = PN53X;
// Set power mode to normal, if your device starts in LowVBat (ie. PN532
// UART) the driver layer have to correctly set it.
CHIP_DATA(pnd)->power_mode = NORMAL;
// PN53x starts in initiator mode
CHIP_DATA(pnd)->operating_mode = INITIATOR;
// Clear last status byte
CHIP_DATA(pnd)->last_status_byte = 0x00;
// Set current target to NULL
CHIP_DATA(pnd)->current_target = NULL;
// Set current sam_mode to normal mode
CHIP_DATA(pnd)->sam_mode = PSM_NORMAL;
// WriteBack cache is clean
CHIP_DATA(pnd)->wb_trigged = false;
memset(CHIP_DATA(pnd)->wb_mask, 0x00, PN53X_CACHE_REGISTER_SIZE);
// Set default command timeout (350 ms)
CHIP_DATA(pnd)->timeout_command = 350;
// Set default ATR timeout (103 ms)
CHIP_DATA(pnd)->timeout_atr = 103;
// Set default communication timeout (52 ms)
CHIP_DATA(pnd)->timeout_communication = 52;
CHIP_DATA(pnd)->supported_modulation_as_initiator = NULL;
CHIP_DATA(pnd)->supported_modulation_as_target = NULL;
return pnd->chip_data;
}
void
pn53x_data_free(struct nfc_device *pnd)
{
// Free current target
pn53x_current_target_free(pnd);
// Free supported modulation(s)
if (CHIP_DATA(pnd)->supported_modulation_as_initiator) {
free(CHIP_DATA(pnd)->supported_modulation_as_initiator);
}
free(pnd->chip_data);
}
|
1060840728-lvgang
|
libnfc/chips/pn53x.c
|
C
|
lgpl
| 121,603
|
# set the include path found by configure
AM_CPPFLAGS = $(all_includes) $(LIBNFC_CFLAGS)
noinst_LTLIBRARIES = libnfcchips.la
libnfcchips_la_SOURCES = pn53x.c pn53x.h pn53x-internal.h
libnfcchips_la_CFLAGS = -I$(top_srcdir)/libnfc
|
1060840728-lvgang
|
libnfc/chips/Makefile.am
|
Makefile
|
lgpl
| 233
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn53x.h
* @brief PN531, PN532 and PN533 common functions
*/
#ifndef __NFC_CHIPS_PN53X_H__
# define __NFC_CHIPS_PN53X_H__
# include <nfc/nfc-types.h>
# include "pn53x-internal.h"
// Registers and symbols masks used to covers parts within a register
// PN53X_REG_CIU_TxMode
# define SYMBOL_TX_CRC_ENABLE 0x80
# define SYMBOL_TX_SPEED 0x70
// TX_FRAMING bits explanation:
// 00 : ISO/IEC 14443A/MIFARE and Passive Communication mode 106 kbit/s
// 01 : Active Communication mode
// 10 : FeliCa and Passive Communication mode at 212 kbit/s and 424 kbit/s
// 11 : ISO/IEC 14443B
# define SYMBOL_TX_FRAMING 0x03
// PN53X_REG_Control_switch_rng
# define SYMBOL_CURLIMOFF 0x08 /* When set to 1, the 100 mA current limitations is desactivated. */
# define SYMBOL_SIC_SWITCH_EN 0x10 /* When set to logic 1, the SVDD switch is enabled and the SVDD output delivers power to secure IC and internal pads (SIGIN, SIGOUT and P34). */
# define SYMBOL_RANDOM_DATAREADY 0x02 /* When set to logic 1, a new random number is available. */
// PN53X_REG_CIU_RxMode
# define SYMBOL_RX_CRC_ENABLE 0x80
# define SYMBOL_RX_SPEED 0x70
# define SYMBOL_RX_NO_ERROR 0x08
# define SYMBOL_RX_MULTIPLE 0x04
// RX_FRAMING follow same scheme than TX_FRAMING
# define SYMBOL_RX_FRAMING 0x03
// PN53X_REG_CIU_TxAuto
# define SYMBOL_FORCE_100_ASK 0x40
# define SYMBOL_AUTO_WAKE_UP 0x20
# define SYMBOL_INITIAL_RF_ON 0x04
// PN53X_REG_CIU_ManualRCV
# define SYMBOL_PARITY_DISABLE 0x10
// PN53X_REG_CIU_TMode
# define SYMBOL_TAUTO 0x80
# define SYMBOL_TPRESCALERHI 0x0F
// PN53X_REG_CIU_TPrescaler
# define SYMBOL_TPRESCALERLO 0xFF
// PN53X_REG_CIU_Command
# define SYMBOL_COMMAND 0x0F
# define SYMBOL_COMMAND_TRANSCEIVE 0xC
// PN53X_REG_CIU_Status2
# define SYMBOL_MF_CRYPTO1_ON 0x08
// PN53X_REG_CIU_FIFOLevel
# define SYMBOL_FLUSH_BUFFER 0x80
# define SYMBOL_FIFO_LEVEL 0x7F
// PN53X_REG_CIU_Control
# define SYMBOL_INITIATOR 0x10
# define SYMBOL_RX_LAST_BITS 0x07
// PN53X_REG_CIU_BitFraming
# define SYMBOL_START_SEND 0x80
# define SYMBOL_RX_ALIGN 0x70
# define SYMBOL_TX_LAST_BITS 0x07
// PN53X Support Byte flags
#define SUPPORT_ISO14443A 0x01
#define SUPPORT_ISO14443B 0x02
#define SUPPORT_ISO18092 0x04
// Internal parameters flags
# define PARAM_NONE 0x00
# define PARAM_NAD_USED 0x01
# define PARAM_DID_USED 0x02
# define PARAM_AUTO_ATR_RES 0x04
# define PARAM_AUTO_RATS 0x10
# define PARAM_14443_4_PICC 0x20 /* Only for PN532 */
# define PARAM_NFC_SECURE 0x20 /* Only for PN533 */
# define PARAM_NO_AMBLE 0x40 /* Only for PN532 */
// Radio Field Configure Items // Configuration Data length
# define RFCI_FIELD 0x01 // 1
# define RFCI_TIMING 0x02 // 3
# define RFCI_RETRY_DATA 0x04 // 1
# define RFCI_RETRY_SELECT 0x05 // 3
# define RFCI_ANALOG_TYPE_A_106 0x0A // 11
# define RFCI_ANALOG_TYPE_A_212_424 0x0B // 8
# define RFCI_ANALOG_TYPE_B 0x0C // 3
# define RFCI_ANALOG_TYPE_14443_4 0x0D // 9
/**
* @enum pn53x_power_mode
* @brief PN53x power mode enumeration
*/
typedef enum {
NORMAL, // In that case, there is no power saved but the PN53x reacts as fast as possible on the host controller interface.
POWERDOWN, // Only on PN532, need to be wake up to process commands with a long preamble
LOWVBAT // Only on PN532, need to be wake up to process commands with a long preamble and SAMConfiguration command
} pn53x_power_mode;
/**
* @enum pn53x_operating_mode
* @brief PN53x operatin mode enumeration
*/
typedef enum {
IDLE,
INITIATOR,
TARGET,
} pn53x_operating_mode;
/**
* @enum pn532_sam_mode
* @brief PN532 SAM mode enumeration
*/
typedef enum {
PSM_NORMAL = 0x01,
PSM_VIRTUAL_CARD = 0x02,
PSM_WIRED_CARD = 0x03,
PSM_DUAL_CARD = 0x04
} pn532_sam_mode;
/**
* @internal
* @struct pn53x_io
* @brief PN53x I/O structure
*/
struct pn53x_io {
int (*send)(struct nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout);
int (*receive)(struct nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout);
};
/* defines */
#define PN53X_CACHE_REGISTER_MIN_ADDRESS PN53X_REG_CIU_Mode
#define PN53X_CACHE_REGISTER_MAX_ADDRESS PN53X_REG_CIU_Coll
#define PN53X_CACHE_REGISTER_SIZE ((PN53X_CACHE_REGISTER_MAX_ADDRESS - PN53X_CACHE_REGISTER_MIN_ADDRESS) + 1)
/**
* @internal
* @struct pn53x_data
* @brief PN53x data structure
*/
struct pn53x_data {
/** Chip type (PN531, PN532 or PN533) */
pn53x_type type;
/** Chip firmware text */
char firmware_text[22];
/** Current power mode */
pn53x_power_mode power_mode;
/** Current operating mode */
pn53x_operating_mode operating_mode;
/** Current emulated target */
nfc_target *current_target;
/** Current sam mode (only applicable for PN532) */
pn532_sam_mode sam_mode;
/** PN53x I/O functions stored in struct */
const struct pn53x_io *io;
/** Last status byte returned by PN53x */
uint8_t last_status_byte;
/** Register cache for REG_CIU_BIT_FRAMING, SYMBOL_TX_LAST_BITS: The last TX bits setting, we need to reset this if it does not apply anymore */
uint8_t ui8TxBits;
/** Register cache for SetParameters function. */
uint8_t ui8Parameters;
/** Last sent command */
uint8_t last_command;
/** Interframe timer correction */
int16_t timer_correction;
/** Timer prescaler */
uint16_t timer_prescaler;
/** WriteBack cache */
uint8_t wb_data[PN53X_CACHE_REGISTER_SIZE];
uint8_t wb_mask[PN53X_CACHE_REGISTER_SIZE];
bool wb_trigged;
/** Command timeout */
int timeout_command;
/** ATR timeout */
int timeout_atr;
/** Communication timeout */
int timeout_communication;
/** Supported modulation type */
nfc_modulation_type *supported_modulation_as_initiator;
nfc_modulation_type *supported_modulation_as_target;
};
#define CHIP_DATA(pnd) ((struct pn53x_data*)(pnd->chip_data))
/**
* @enum pn53x_modulation
* @brief NFC modulation enumeration
*/
typedef enum {
/** Undefined modulation */
PM_UNDEFINED = -1,
/** ISO14443-A (NXP MIFARE) http://en.wikipedia.org/wiki/MIFARE */
PM_ISO14443A_106 = 0x00,
/** JIS X 6319-4 (Sony Felica) http://en.wikipedia.org/wiki/FeliCa */
PM_FELICA_212 = 0x01,
/** JIS X 6319-4 (Sony Felica) http://en.wikipedia.org/wiki/FeliCa */
PM_FELICA_424 = 0x02,
/** ISO14443-B http://en.wikipedia.org/wiki/ISO/IEC_14443 (Not supported by PN531) */
PM_ISO14443B_106 = 0x03,
/** Jewel Topaz (Innovision Research & Development) (Not supported by PN531) */
PM_JEWEL_106 = 0x04,
/** ISO14443-B http://en.wikipedia.org/wiki/ISO/IEC_14443 (Not supported by PN531 nor PN532) */
PM_ISO14443B_212 = 0x06,
/** ISO14443-B http://en.wikipedia.org/wiki/ISO/IEC_14443 (Not supported by PN531 nor PN532) */
PM_ISO14443B_424 = 0x07,
/** ISO14443-B http://en.wikipedia.org/wiki/ISO/IEC_14443 (Not supported by PN531 nor PN532) */
PM_ISO14443B_847 = 0x08,
} pn53x_modulation;
/**
* @enum pn53x_target_type
* @brief NFC target type enumeration
*/
typedef enum {
/** Undefined target type */
PTT_UNDEFINED = -1,
/** Generic passive 106 kbps (ISO/IEC14443-4A, mifare, DEP) */
PTT_GENERIC_PASSIVE_106 = 0x00,
/** Generic passive 212 kbps (FeliCa, DEP) */
PTT_GENERIC_PASSIVE_212 = 0x01,
/** Generic passive 424 kbps (FeliCa, DEP) */
PTT_GENERIC_PASSIVE_424 = 0x02,
/** Passive 106 kbps ISO/IEC14443-4B */
PTT_ISO14443_4B_106 = 0x03,
/** Innovision Jewel tag */
PTT_JEWEL_106 = 0x04,
/** Mifare card */
PTT_MIFARE = 0x10,
/** FeliCa 212 kbps card */
PTT_FELICA_212 = 0x11,
/** FeliCa 424 kbps card */
PTT_FELICA_424 = 0x12,
/** Passive 106 kbps ISO/IEC 14443-4A */
PTT_ISO14443_4A_106 = 0x20,
/** Passive 106 kbps ISO/IEC 14443-4B with TCL flag */
PTT_ISO14443_4B_TCL_106 = 0x23,
/** DEP passive 106 kbps */
PTT_DEP_PASSIVE_106 = 0x40,
/** DEP passive 212 kbps */
PTT_DEP_PASSIVE_212 = 0x41,
/** DEP passive 424 kbps */
PTT_DEP_PASSIVE_424 = 0x42,
/** DEP active 106 kbps */
PTT_DEP_ACTIVE_106 = 0x80,
/** DEP active 212 kbps */
PTT_DEP_ACTIVE_212 = 0x81,
/** DEP active 424 kbps */
PTT_DEP_ACTIVE_424 = 0x82,
} pn53x_target_type;
/**
* @enum pn53x_target_mode
* @brief PN53x target mode enumeration
*/
typedef enum {
/** Configure the PN53x to accept all initiator mode */
PTM_NORMAL = 0x00,
/** Configure the PN53x to accept to be initialized only in passive mode */
PTM_PASSIVE_ONLY = 0x01,
/** Configure the PN53x to accept to be initialized only as DEP target */
PTM_DEP_ONLY = 0x02,
/** Configure the PN532 to accept to be initialized only as ISO/IEC14443-4 PICC */
PTM_ISO14443_4_PICC_ONLY = 0x04
} pn53x_target_mode;
extern const uint8_t pn53x_ack_frame[PN53x_ACK_FRAME__LEN];
extern const uint8_t pn53x_nack_frame[PN53x_ACK_FRAME__LEN];
int pn53x_init(struct nfc_device *pnd);
int pn53x_transceive(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRxLen, int timeout);
int pn53x_set_parameters(struct nfc_device *pnd, const uint8_t ui8Value, const bool bEnable);
int pn53x_set_tx_bits(struct nfc_device *pnd, const uint8_t ui8Bits);
int pn53x_wrap_frame(const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar, uint8_t *pbtFrame);
int pn53x_unwrap_frame(const uint8_t *pbtFrame, const size_t szFrameBits, uint8_t *pbtRx, uint8_t *pbtRxPar);
int pn53x_decode_target_data(const uint8_t *pbtRawData, size_t szRawData,
pn53x_type chip_type, nfc_modulation_type nmt,
nfc_target_info *pnti);
int pn53x_read_register(struct nfc_device *pnd, uint16_t ui16Reg, uint8_t *ui8Value);
int pn53x_write_register(struct nfc_device *pnd, uint16_t ui16Reg, uint8_t ui8SymbolMask, uint8_t ui8Value);
int pn53x_decode_firmware_version(struct nfc_device *pnd);
int pn53x_set_property_int(struct nfc_device *pnd, const nfc_property property, const int value);
int pn53x_set_property_bool(struct nfc_device *pnd, const nfc_property property, const bool bEnable);
int pn53x_check_communication(struct nfc_device *pnd);
int pn53x_idle(struct nfc_device *pnd);
// NFC device as Initiator functions
int pn53x_initiator_init(struct nfc_device *pnd);
int pn532_initiator_init_secure_element(struct nfc_device *pnd);
int pn53x_initiator_select_passive_target(struct nfc_device *pnd,
const nfc_modulation nm,
const uint8_t *pbtInitData, const size_t szInitData,
nfc_target *pnt);
int pn53x_initiator_poll_target(struct nfc_device *pnd,
const nfc_modulation *pnmModulations, const size_t szModulations,
const uint8_t uiPollNr, const uint8_t uiPeriod,
nfc_target *pnt);
int pn53x_initiator_select_dep_target(struct nfc_device *pnd,
const nfc_dep_mode ndm, const nfc_baud_rate nbr,
const nfc_dep_info *pndiInitiator,
nfc_target *pnt,
const int timeout);
int pn53x_initiator_transceive_bits(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits,
const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar);
int pn53x_initiator_transceive_bytes(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx,
uint8_t *pbtRx, const size_t szRx, int timeout);
int pn53x_initiator_transceive_bits_timed(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits,
const uint8_t *pbtTxPar, uint8_t *pbtRx, uint8_t *pbtRxPar, uint32_t *cycles);
int pn53x_initiator_transceive_bytes_timed(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx,
uint8_t *pbtRx, const size_t szRx, uint32_t *cycles);
int pn53x_initiator_deselect_target(struct nfc_device *pnd);
int pn53x_initiator_target_is_present(struct nfc_device *pnd, const nfc_target *pnt);
// NFC device as Target functions
int pn53x_target_init(struct nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRxLen, int timeout);
int pn53x_target_receive_bits(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtRxPar);
int pn53x_target_receive_bytes(struct nfc_device *pnd, uint8_t *pbtRx, const size_t szRxLen, int timeout);
int pn53x_target_send_bits(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTxBits, const uint8_t *pbtTxPar);
int pn53x_target_send_bytes(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout);
// Error handling functions
const char *pn53x_strerror(const struct nfc_device *pnd);
// C wrappers for PN53x commands
int pn53x_SetParameters(struct nfc_device *pnd, const uint8_t ui8Value);
int pn532_SAMConfiguration(struct nfc_device *pnd, const pn532_sam_mode mode, int timeout);
int pn53x_PowerDown(struct nfc_device *pnd);
int pn53x_InListPassiveTarget(struct nfc_device *pnd, const pn53x_modulation pmInitModulation,
const uint8_t szMaxTargets, const uint8_t *pbtInitiatorData,
const size_t szInitiatorDataLen, uint8_t *pbtTargetsData, size_t *pszTargetsData,
int timeout);
int pn53x_InDeselect(struct nfc_device *pnd, const uint8_t ui8Target);
int pn53x_InRelease(struct nfc_device *pnd, const uint8_t ui8Target);
int pn53x_InAutoPoll(struct nfc_device *pnd, const pn53x_target_type *ppttTargetTypes, const size_t szTargetTypes,
const uint8_t btPollNr, const uint8_t btPeriod, nfc_target *pntTargets,
const int timeout);
int pn53x_InJumpForDEP(struct nfc_device *pnd,
const nfc_dep_mode ndm, const nfc_baud_rate nbr,
const uint8_t *pbtPassiveInitiatorData,
const uint8_t *pbtNFCID3i,
const uint8_t *pbtGB, const size_t szGB,
nfc_target *pnt,
const int timeout);
int pn53x_TgInitAsTarget(struct nfc_device *pnd, pn53x_target_mode ptm,
const uint8_t *pbtMifareParams,
const uint8_t *pbtTkt, size_t szTkt,
const uint8_t *pbtFeliCaParams,
const uint8_t *pbtNFCID3t, const uint8_t *pbtGB, const size_t szGB,
uint8_t *pbtRx, const size_t szRxLen, uint8_t *pbtModeByte, int timeout);
// RFConfiguration
int pn53x_RFConfiguration__RF_field(struct nfc_device *pnd, bool bEnable);
int pn53x_RFConfiguration__Various_timings(struct nfc_device *pnd, const uint8_t fATR_RES_Timeout, const uint8_t fRetryTimeout);
int pn53x_RFConfiguration__MaxRtyCOM(struct nfc_device *pnd, const uint8_t MaxRtyCOM);
int pn53x_RFConfiguration__MaxRetries(struct nfc_device *pnd, const uint8_t MxRtyATR, const uint8_t MxRtyPSL, const uint8_t MxRtyPassiveActivation);
// Misc
int pn53x_check_ack_frame(struct nfc_device *pnd, const uint8_t *pbtRxFrame, const size_t szRxFrameLen);
int pn53x_check_error_frame(struct nfc_device *pnd, const uint8_t *pbtRxFrame, const size_t szRxFrameLen);
int pn53x_build_frame(uint8_t *pbtFrame, size_t *pszFrame, const uint8_t *pbtData, const size_t szData);
int pn53x_get_supported_modulation(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type **const supported_mt);
int pn53x_get_supported_baud_rate(nfc_device *pnd, const nfc_mode mode, const nfc_modulation_type nmt, const nfc_baud_rate **const supported_br);
int pn53x_get_information_about(nfc_device *pnd, char **pbuf);
void *pn53x_data_new(struct nfc_device *pnd, const struct pn53x_io *io);
void pn53x_data_free(struct nfc_device *pnd);
#endif // __NFC_CHIPS_PN53X_H__
|
1060840728-lvgang
|
libnfc/chips/pn53x.h
|
C
|
lgpl
| 17,645
|
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file pn53x-internal.h
* @brief PN531, PN532 and PN533 defines and compatibility
*/
#ifndef __PN53X_INTERNAL_H__
#define __PN53X_INTERNAL_H__
#include "log.h"
// Miscellaneous
#define Diagnose 0x00
#define GetFirmwareVersion 0x02
#define GetGeneralStatus 0x04
#define ReadRegister 0x06
#define WriteRegister 0x08
#define ReadGPIO 0x0C
#define WriteGPIO 0x0E
#define SetSerialBaudRate 0x10
#define SetParameters 0x12
#define SAMConfiguration 0x14
#define PowerDown 0x16
#define AlparCommandForTDA 0x18
// RC-S360 has another command 0x18 for reset &..?
// RF communication
#define RFConfiguration 0x32
#define RFRegulationTest 0x58
// Initiator
#define InJumpForDEP 0x56
#define InJumpForPSL 0x46
#define InListPassiveTarget 0x4A
#define InATR 0x50
#define InPSL 0x4E
#define InDataExchange 0x40
#define InCommunicateThru 0x42
#define InQuartetByteExchange 0x38
#define InDeselect 0x44
#define InRelease 0x52
#define InSelect 0x54
#define InActivateDeactivatePaypass 0x48
#define InAutoPoll 0x60
// Target
#define TgInitAsTarget 0x8C
#define TgSetGeneralBytes 0x92
#define TgGetData 0x86
#define TgSetData 0x8E
#define TgSetDataSecure 0x96
#define TgSetMetaData 0x94
#define TgSetMetaDataSecure 0x98
#define TgGetInitiatorCommand 0x88
#define TgResponseToInitiator 0x90
#define TgGetTargetStatus 0x8A
/** @note PN53x's normal frame:
*
* .-- Start
* | .-- Packet length
* | | .-- Length checksum
* | | | .-- Direction (D4 Host to PN, D5 PN to Host)
* | | | | .-- Code
* | | | | | .-- Packet checksum
* | | | | | | .-- Postamble
* V | | | | | |
* ----- V V V V V V
* 00 FF 02 FE D4 02 2A 00
*/
/** @note PN53x's extended frame:
*
* .-- Start
* | .-- Fixed to FF to enable extended frame
* | | .-- Packet length
* | | | .-- Length checksum
* | | | | .-- Direction (D4 Host to PN, D5 PN to Host)
* | | | | | .-- Code
* | | | | | | .-- Packet checksum
* | | | | | | | .-- Postamble
* V V V | | | | |
* ----- ----- ----- V V V V V
* 00 FF FF FF 00 02 FE D4 02 2A 00
*/
/**
* Start bytes, packet length, length checksum, direction, packet checksum and postamble are overhead
*/
// The TFI is considered part of the overhead
# define PN53x_NORMAL_FRAME__DATA_MAX_LEN 254
# define PN53x_NORMAL_FRAME__OVERHEAD 8
# define PN53x_EXTENDED_FRAME__DATA_MAX_LEN 264
# define PN53x_EXTENDED_FRAME__OVERHEAD 11
# define PN53x_ACK_FRAME__LEN 6
typedef struct {
uint8_t ui8Code;
uint8_t ui8CompatFlags;
#ifdef LOG
const char *abtCommandText;
#endif
} pn53x_command;
typedef enum {
PN53X = 0x00, // Unknown PN53x chip type
PN531 = 0x01,
PN532 = 0x02,
PN533 = 0x04,
RCS360 = 0x08
} pn53x_type;
#ifndef LOG
# define PNCMD( X, Y ) { X , Y }
# define PNCMD_TRACE( X ) do {} while(0)
#else
# define PNCMD( X, Y ) { X , Y, #X }
# define PNCMD_TRACE( X ) do { \
for (size_t i=0; i<(sizeof(pn53x_commands)/sizeof(pn53x_command)); i++) { \
if ( X == pn53x_commands[i].ui8Code ) { \
log_put( LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s", pn53x_commands[i].abtCommandText ); \
break; \
} \
} \
} while(0)
#endif
static const pn53x_command pn53x_commands[] = {
// Miscellaneous
PNCMD(Diagnose, PN531 | PN532 | PN533 | RCS360),
PNCMD(GetFirmwareVersion, PN531 | PN532 | PN533 | RCS360),
PNCMD(GetGeneralStatus, PN531 | PN532 | PN533 | RCS360),
PNCMD(ReadRegister, PN531 | PN532 | PN533 | RCS360),
PNCMD(WriteRegister, PN531 | PN532 | PN533 | RCS360),
PNCMD(ReadGPIO, PN531 | PN532 | PN533),
PNCMD(WriteGPIO, PN531 | PN532 | PN533),
PNCMD(SetSerialBaudRate, PN531 | PN532 | PN533),
PNCMD(SetParameters, PN531 | PN532 | PN533 | RCS360),
PNCMD(SAMConfiguration, PN531 | PN532),
PNCMD(PowerDown, PN531 | PN532),
PNCMD(AlparCommandForTDA, PN533 | RCS360), // Has another usage on RC-S360...
// RF communication
PNCMD(RFConfiguration, PN531 | PN532 | PN533 | RCS360),
PNCMD(RFRegulationTest, PN531 | PN532 | PN533),
// Initiator
PNCMD(InJumpForDEP, PN531 | PN532 | PN533 | RCS360),
PNCMD(InJumpForPSL, PN531 | PN532 | PN533),
PNCMD(InListPassiveTarget, PN531 | PN532 | PN533 | RCS360),
PNCMD(InATR, PN531 | PN532 | PN533),
PNCMD(InPSL, PN531 | PN532 | PN533),
PNCMD(InDataExchange, PN531 | PN532 | PN533),
PNCMD(InCommunicateThru, PN531 | PN532 | PN533 | RCS360),
PNCMD(InQuartetByteExchange, PN533),
PNCMD(InDeselect, PN531 | PN532 | PN533 | RCS360),
PNCMD(InRelease, PN531 | PN532 | PN533 | RCS360),
PNCMD(InSelect, PN531 | PN532 | PN533),
PNCMD(InAutoPoll, PN532),
PNCMD(InActivateDeactivatePaypass, PN533),
// Target
PNCMD(TgInitAsTarget, PN531 | PN532 | PN533),
PNCMD(TgSetGeneralBytes, PN531 | PN532 | PN533),
PNCMD(TgGetData, PN531 | PN532 | PN533),
PNCMD(TgSetData, PN531 | PN532 | PN533),
PNCMD(TgSetDataSecure, PN533),
PNCMD(TgSetMetaData, PN531 | PN532 | PN533),
PNCMD(TgSetMetaDataSecure, PN533),
PNCMD(TgGetInitiatorCommand, PN531 | PN532 | PN533),
PNCMD(TgResponseToInitiator, PN531 | PN532 | PN533),
PNCMD(TgGetTargetStatus, PN531 | PN532 | PN533),
};
// SFR part
#define _BV( X ) (1 << X)
#define P30 0
#define P31 1
#define P32 2
#define P33 3
#define P34 4
#define P35 5
// Registers part
#ifdef LOG
typedef struct {
uint16_t ui16Address;
const char *abtRegisterText;
const char *abtRegisterDescription;
} pn53x_register;
# define PNREG( X, Y ) { X , #X, Y }
#endif /* LOG */
#ifndef LOG
# define PNREG_TRACE( X ) do { \
} while(0)
#else
# define PNREG_TRACE( X ) do { \
for (size_t i=0; i<(sizeof(pn53x_registers)/sizeof(pn53x_register)); i++) { \
if ( X == pn53x_registers[i].ui16Address ) { \
log_put( LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_DEBUG, "%s (%s)", pn53x_registers[i].abtRegisterText, pn53x_registers[i].abtRegisterDescription ); \
break; \
} \
} \
} while(0)
#endif
// Register addresses
#define PN53X_REG_Control_switch_rng 0x6106
#define PN53X_REG_CIU_Mode 0x6301
#define PN53X_REG_CIU_TxMode 0x6302
#define PN53X_REG_CIU_RxMode 0x6303
#define PN53X_REG_CIU_TxControl 0x6304
#define PN53X_REG_CIU_TxAuto 0x6305
#define PN53X_REG_CIU_TxSel 0x6306
#define PN53X_REG_CIU_RxSel 0x6307
#define PN53X_REG_CIU_RxThreshold 0x6308
#define PN53X_REG_CIU_Demod 0x6309
#define PN53X_REG_CIU_FelNFC1 0x630A
#define PN53X_REG_CIU_FelNFC2 0x630B
#define PN53X_REG_CIU_MifNFC 0x630C
#define PN53X_REG_CIU_ManualRCV 0x630D
#define PN53X_REG_CIU_TypeB 0x630E
// #define PN53X_REG_- 0x630F
// #define PN53X_REG_- 0x6310
#define PN53X_REG_CIU_CRCResultMSB 0x6311
#define PN53X_REG_CIU_CRCResultLSB 0x6312
#define PN53X_REG_CIU_GsNOFF 0x6313
#define PN53X_REG_CIU_ModWidth 0x6314
#define PN53X_REG_CIU_TxBitPhase 0x6315
#define PN53X_REG_CIU_RFCfg 0x6316
#define PN53X_REG_CIU_GsNOn 0x6317
#define PN53X_REG_CIU_CWGsP 0x6318
#define PN53X_REG_CIU_ModGsP 0x6319
#define PN53X_REG_CIU_TMode 0x631A
#define PN53X_REG_CIU_TPrescaler 0x631B
#define PN53X_REG_CIU_TReloadVal_hi 0x631C
#define PN53X_REG_CIU_TReloadVal_lo 0x631D
#define PN53X_REG_CIU_TCounterVal_hi 0x631E
#define PN53X_REG_CIU_TCounterVal_lo 0x631F
// #define PN53X_REG_- 0x6320
#define PN53X_REG_CIU_TestSel1 0x6321
#define PN53X_REG_CIU_TestSel2 0x6322
#define PN53X_REG_CIU_TestPinEn 0x6323
#define PN53X_REG_CIU_TestPinValue 0x6324
#define PN53X_REG_CIU_TestBus 0x6325
#define PN53X_REG_CIU_AutoTest 0x6326
#define PN53X_REG_CIU_Version 0x6327
#define PN53X_REG_CIU_AnalogTest 0x6328
#define PN53X_REG_CIU_TestDAC1 0x6329
#define PN53X_REG_CIU_TestDAC2 0x632A
#define PN53X_REG_CIU_TestADC 0x632B
// #define PN53X_REG_- 0x632C
// #define PN53X_REG_- 0x632D
// #define PN53X_REG_- 0x632E
#define PN53X_REG_CIU_RFlevelDet 0x632F
#define PN53X_REG_CIU_SIC_CLK_en 0x6330
#define PN53X_REG_CIU_Command 0x6331
#define PN53X_REG_CIU_CommIEn 0x6332
#define PN53X_REG_CIU_DivIEn 0x6333
#define PN53X_REG_CIU_CommIrq 0x6334
#define PN53X_REG_CIU_DivIrq 0x6335
#define PN53X_REG_CIU_Error 0x6336
#define PN53X_REG_CIU_Status1 0x6337
#define PN53X_REG_CIU_Status2 0x6338
#define PN53X_REG_CIU_FIFOData 0x6339
#define PN53X_REG_CIU_FIFOLevel 0x633A
#define PN53X_REG_CIU_WaterLevel 0x633B
#define PN53X_REG_CIU_Control 0x633C
#define PN53X_REG_CIU_BitFraming 0x633D
#define PN53X_REG_CIU_Coll 0x633E
#define PN53X_SFR_P3 0xFFB0
#define PN53X_SFR_P3CFGA 0xFFFC
#define PN53X_SFR_P3CFGB 0xFFFD
#define PN53X_SFR_P7CFGA 0xFFF4
#define PN53X_SFR_P7CFGB 0xFFF5
#define PN53X_SFR_P7 0xFFF7
/* PN53x specific errors */
#define ETIMEOUT 0x01
#define ECRC 0x02
#define EPARITY 0x03
#define EBITCOUNT 0x04
#define EFRAMING 0x05
#define EBITCOLL 0x06
#define ESMALLBUF 0x07
#define EBUFOVF 0x09
#define ERFTIMEOUT 0x0a
#define ERFPROTO 0x0b
#define EOVHEAT 0x0d
#define EINBUFOVF 0x0e
#define EINVPARAM 0x10
#define EDEPUNKCMD 0x12
#define EINVRXFRAM 0x13
#define EMFAUTH 0x14
#define ENSECNOTSUPP 0x18 // PN533 only
#define EBCC 0x23
#define EDEPINVSTATE 0x25
#define EOPNOTALL 0x26
#define ECMD 0x27
#define ETGREL 0x29
#define ECID 0x2a
#define ECDISCARDED 0x2b
#define ENFCID3 0x2c
#define EOVCURRENT 0x2d
#define ENAD 0x2e
#ifdef LOG
static const pn53x_register pn53x_registers[] = {
PNREG(PN53X_REG_CIU_Mode, "Defines general modes for transmitting and receiving"),
PNREG(PN53X_REG_CIU_TxMode, "Defines the transmission data rate and framing during transmission"),
PNREG(PN53X_REG_CIU_RxMode, "Defines the transmission data rate and framing during receiving"),
PNREG(PN53X_REG_CIU_TxControl, "Controls the logical behaviour of the antenna driver pins TX1 and TX2"),
PNREG(PN53X_REG_CIU_TxAuto, "Controls the settings of the antenna driver"),
PNREG(PN53X_REG_CIU_TxSel, "Selects the internal sources for the antenna driver"),
PNREG(PN53X_REG_CIU_RxSel, "Selects internal receiver settings"),
PNREG(PN53X_REG_CIU_RxThreshold, "Selects thresholds for the bit decoder"),
PNREG(PN53X_REG_CIU_Demod, "Defines demodulator settings"),
PNREG(PN53X_REG_CIU_FelNFC1, "Defines the length of the valid range for the received frame"),
PNREG(PN53X_REG_CIU_FelNFC2, "Defines the length of the valid range for the received frame"),
PNREG(PN53X_REG_CIU_MifNFC, "Controls the communication in ISO/IEC 14443/MIFARE and NFC target mode at 106 kbit/s"),
PNREG(PN53X_REG_CIU_ManualRCV, "Allows manual fine tuning of the internal receiver"),
PNREG(PN53X_REG_CIU_TypeB, "Configure the ISO/IEC 14443 type B"),
// PNREG (PN53X_REG_-, "Reserved"),
// PNREG (PN53X_REG_-, "Reserved"),
PNREG(PN53X_REG_CIU_CRCResultMSB, "Shows the actual MSB values of the CRC calculation"),
PNREG(PN53X_REG_CIU_CRCResultLSB, "Shows the actual LSB values of the CRC calculation"),
PNREG(PN53X_REG_CIU_GsNOFF, "Selects the conductance of the antenna driver pins TX1 and TX2 for load modulation when own RF field is switched OFF"),
PNREG(PN53X_REG_CIU_ModWidth, "Controls the setting of the width of the Miller pause"),
PNREG(PN53X_REG_CIU_TxBitPhase, "Bit synchronization at 106 kbit/s"),
PNREG(PN53X_REG_CIU_RFCfg, "Configures the receiver gain and RF level"),
PNREG(PN53X_REG_CIU_GsNOn, "Selects the conductance of the antenna driver pins TX1 and TX2 for modulation, when own RF field is switched ON"),
PNREG(PN53X_REG_CIU_CWGsP, "Selects the conductance of the antenna driver pins TX1 and TX2 when not in modulation phase"),
PNREG(PN53X_REG_CIU_ModGsP, "Selects the conductance of the antenna driver pins TX1 and TX2 when in modulation phase"),
PNREG(PN53X_REG_CIU_TMode, "Defines settings for the internal timer"),
PNREG(PN53X_REG_CIU_TPrescaler, "Defines settings for the internal timer"),
PNREG(PN53X_REG_CIU_TReloadVal_hi, "Describes the 16-bit long timer reload value (Higher 8 bits)"),
PNREG(PN53X_REG_CIU_TReloadVal_lo, "Describes the 16-bit long timer reload value (Lower 8 bits)"),
PNREG(PN53X_REG_CIU_TCounterVal_hi, "Describes the 16-bit long timer actual value (Higher 8 bits)"),
PNREG(PN53X_REG_CIU_TCounterVal_lo, "Describes the 16-bit long timer actual value (Lower 8 bits)"),
// PNREG (PN53X_REG_-, "Reserved"),
PNREG(PN53X_REG_CIU_TestSel1, "General test signals configuration"),
PNREG(PN53X_REG_CIU_TestSel2, "General test signals configuration and PRBS control"),
PNREG(PN53X_REG_CIU_TestPinEn, "Enables test signals output on pins."),
PNREG(PN53X_REG_CIU_TestPinValue, "Defines the values for the 8-bit parallel bus when it is used as I/O bus"),
PNREG(PN53X_REG_CIU_TestBus, "Shows the status of the internal test bus"),
PNREG(PN53X_REG_CIU_AutoTest, "Controls the digital self-test"),
PNREG(PN53X_REG_CIU_Version, "Shows the CIU version"),
PNREG(PN53X_REG_CIU_AnalogTest, "Controls the pins AUX1 and AUX2"),
PNREG(PN53X_REG_CIU_TestDAC1, "Defines the test value for the TestDAC1"),
PNREG(PN53X_REG_CIU_TestDAC2, "Defines the test value for the TestDAC2"),
PNREG(PN53X_REG_CIU_TestADC, "Show the actual value of ADC I and Q"),
// PNREG (PN53X_REG_-, "Reserved for tests"),
// PNREG (PN53X_REG_-, "Reserved for tests"),
// PNREG (PN53X_REG_-, "Reserved for tests"),
PNREG(PN53X_REG_CIU_RFlevelDet, "Power down of the RF level detector"),
PNREG(PN53X_REG_CIU_SIC_CLK_en, "Enables the use of secure IC clock on P34 / SIC_CLK"),
PNREG(PN53X_REG_CIU_Command, "Starts and stops the command execution"),
PNREG(PN53X_REG_CIU_CommIEn, "Control bits to enable and disable the passing of interrupt requests"),
PNREG(PN53X_REG_CIU_DivIEn, "Controls bits to enable and disable the passing of interrupt requests"),
PNREG(PN53X_REG_CIU_CommIrq, "Contains common CIU interrupt request flags"),
PNREG(PN53X_REG_CIU_DivIrq, "Contains miscellaneous interrupt request flags"),
PNREG(PN53X_REG_CIU_Error, "Error flags showing the error status of the last command executed"),
PNREG(PN53X_REG_CIU_Status1, "Contains status flags of the CRC, Interrupt Request System and FIFO buffer"),
PNREG(PN53X_REG_CIU_Status2, "Contain status flags of the receiver, transmitter and Data Mode Detector"),
PNREG(PN53X_REG_CIU_FIFOData, "In- and output of 64 byte FIFO buffer"),
PNREG(PN53X_REG_CIU_FIFOLevel, "Indicates the number of bytes stored in the FIFO"),
PNREG(PN53X_REG_CIU_WaterLevel, "Defines the thresholds for FIFO under- and overflow warning"),
PNREG(PN53X_REG_CIU_Control, "Contains miscellaneous control bits"),
PNREG(PN53X_REG_CIU_BitFraming, "Adjustments for bit oriented frames"),
PNREG(PN53X_REG_CIU_Coll, "Defines the first bit collision detected on the RF interface"),
// SFR
PNREG(PN53X_SFR_P3CFGA, "Port 3 configuration"),
PNREG(PN53X_SFR_P3CFGB, "Port 3 configuration"),
PNREG(PN53X_SFR_P3, "Port 3 value"),
PNREG(PN53X_SFR_P7CFGA, "Port 7 configuration"),
PNREG(PN53X_SFR_P7CFGB, "Port 7 configuration"),
PNREG(PN53X_SFR_P7, "Port 7 value"),
};
#endif
#endif /* __PN53X_INTERNAL_H__ */
|
1060840728-lvgang
|
libnfc/chips/pn53x-internal.h
|
C
|
lgpl
| 16,012
|