first commit

This commit is contained in:
denisdulici
2017-09-14 22:21:00 +03:00
commit 515bdaf5cd
598 changed files with 48030 additions and 0 deletions

5
public/css/addons.css vendored Normal file
View File

@@ -0,0 +1,5 @@
.item-image {
width: 100%;
max-height: 150px;
margin-bottom: 15px;
}

98
public/css/akaunting-green.css vendored Normal file
View File

@@ -0,0 +1,98 @@
.nav-tabs-custom>.nav-tabs>li.active {
border-top-color: #6da252;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #6da252 !important;
}
.form-control:focus {
border-color: #6da252 !important;
}
#result-search {
border-color: #6da252;
}
#profit {
background: #6da252;
}
.info-box .progress .progress-bar.progress-bar-green, .progress-bar-success {
background-color: #6da252;
}
/* Bootstrap */
.btn-success {
background-color: #6da252;
border-color: #629149;
}
.btn-success.hover, .btn-success:hover {
background-color: #629149;
}
.btn-success.focus, .btn-success:focus {
background-color: #629149;
border-color: #2b4020;
}
.btn-success.active, .btn-success:active {
background-color: #6da252;
border-color: #629149;
}
.btn-success.active.focus, .btn-success.active:focus {
background-color: #4c7139;
border-color: #416131;
}
.bg-green {
background-color: #6da252 !important;
}
.alert-success {
background-color: #6da252 !important;
border-color: #629149;
}
.label-success {
background-color: #6da252 !important;
}
.box.box-success {
border-top-color: #6da252;
}
.box.box-solid.box-success>.box-header {
background-color: #6da252;
}
.box.box-solid.box-success {
border-color: #629149;
}
.text-green {
color: #6da252;
}
/* AdminLTE green skin */
.skin-green-light .main-header .navbar {
background-color: #6da252;
}
.skin-green-light .main-header .navbar .sidebar-toggle:hover {
background-color: #629149;
}
.skin-green-light .main-header .logo {
background-color: #6da252;
}
.skin-green-light .main-header li.user-header {
background-color: #6da252;
}
.skin-green-light .main-header .logo:hover {
background-color: #629149;
}

456
public/css/app.css vendored Normal file
View File

@@ -0,0 +1,456 @@
.logo-lg {
text-align: left;
}
.logo-image-mini {
margin: 12px 3px 0 0;
}
.logo-image-lg {
margin: -5px 5px 0 0;
}
.input-group-addon {
min-width: 41px;
}
.new-button {
margin-left: 20px;
}
.content-center {
margin: 0 auto;
max-width : 1300px;
}
.form-group {
/*max-width: 450px;*/
}
.tab-margin {
margin: 25px 0;
}
.sort-icon {
opacity: 0.5;
}
.input-filter {
display: inline;
width: inherit;
}
.title-filter {
margin-right: 10px;
}
.btn-filter {
margin-bottom: 1px;
}
.setting-buttons {
/*padding: 15px 0 0 15px;
border-top: 1px solid #f4f4f4;*/
float: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
border-top: 1px solid #f4f4f4;
padding: 10px;
background-color: #fff;
}
#sale {
width: 15px;
height: 15px;
background: #00c0ef;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
}
#cost {
width: 15px;
height: 15px;
background: #F56954;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
}
#profit {
width: 15px;
height: 15px;
background: #2FB628;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;
}
.table-responsive {
overflow-x: hidden;
}
div.required .control-label:not(span):after, td.required:after {
content: ' *';
color: #F00;
font-weight: bold;
}
.form-group .select2-container {
width: 100% !important;
}
.form-group .select2-container--default .select2-selection--single {
border-radius: 0px;
}
.form-group .select2-container .select2-selection--single {
height: 34px;
border: 1px solid #d2d6de;
}
.form-group .select2-container .select2-selection--single .select2-selection__rendered {
padding-left: 0px;
}
.form-group .select2-container--default .select2-selection--single .select2-selection__placeholder {
color: inherit;
}
.form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
height: 30px;
}
.form-group .select2-container--default .select2-selection--single .select2-selection__arrow b {
border-color: #555 transparent transparent transparent;
}
.info-box .progress .progress-bar {
background: inherit;
}
.info-box .progress .progress-bar.progress-bar-green, .progress-bar-success {
background-color: #00a65a;
}
.info-box .progress .progress-bar.progress-bar-red, .progress-bar-danger {
background-color: #dd4b39;
}
.info-box .progress .progress-bar.progress-bar-aqua, .progress-bar-info {
background-color: #00c0ef;
}
.box.box-success .table.table-bordered {
font-size: 14px;
}
.info-box-icon i {
margin-top: 20px;
}
.box.box-success .chart svg, .chart canvas {
width: 96% !important;
margin-left: 25px;
}
.daily-footer {
margin-left: 5px;
margin-top: 5px;
padding-top: 10px;
border-top: 1px solid #f4f4f4;
}
.nav-tabs-custom>.nav-tabs>li.active {
border-top-color: #00a65a;
}
.input-group .btn-group.radio-inline {
padding-left: inherit;
}
.input-group input[type=file]:focus, input[type=checkbox]:focus, input[type=radio]:focus {
outline: inherit;
outline-offset: 0px;
}
.input-group .checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {
margin-left: 0px;
}
.users-image {
float: left;
width: 25px;
height: 25px;
border-radius: 50%;
margin-right: 10px;
margin-top: -2px;
}
.setting-form .box-footer .col-sm-12 .form-group {
margin-left: 5px;
}
/*
.setting-form .box-footer .col-sm-12 .form-group a {
margin-left: 10px;
}
*/
.col-sm-12 .nav-tabs-custom .tab-content .tab-pane {
overflow: auto;
}
.fake-input {
/*width: 370px !important;*/
}
.user-panel {
position: inherit;
}
.navbar-custom-menu .navbar-nav > li > a > i {
line-height: 20px;
}
.tasks-menu img {
margin: 1px 0 2px 0;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #00a65a !important;
color : #FFFFFF;
}
.form-control:focus {
border-color: #00a65a !important;
}
.box.box-success .invoice, .box.box-success .bill {
border: none;
margin: 0;
}
.bill {
position: relative;
background: #fff;
padding: 20px;
}
#loading {
position: absolute;
top: 40%;
left: 40%;
}
#payment-modal .form-group.col-md-6 .help-block {
color : #F00;
}
.login-page {
background-image: url('../img/login.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
height: 100%;
width: 100%;
padding: 5% 0;
position: fixed;
}
.login-logo img {
width: 70px;
}
.user-panel > .image > img {
max-height: 45px;
}
.main-header .add-new.nav.navbar-nav i {
margin-top: 3px;
line-height: 17px;
}
.navbar-nav > .add-new-menu > .dropdown-menu {
width: 465px;
max-height: 180px;
padding: 0 0 0 0;
margin: 0;
top: 100%;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline {
margin-left: 0;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li {
width: 150px;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li > .list-unstyled > li .menu {
margin: 0;
padding: 0;
list-style: none;
overflow-x: hidden;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li > .list-unstyled > li.header {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
background-color: #ffffff;
padding: 7px 10px;
border-bottom: 1px solid #f4f4f4;
color: #444444;
font-size: 14px;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li > .list-unstyled > li > a {
color: #444444;
overflow: hidden;
text-overflow: ellipsis;
padding: 10px;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li > .list-unstyled > li .menu > li > a {
display: block;
white-space: nowrap;
border-bottom: 1px solid #f4f4f4;
color: #444444;
overflow: hidden;
text-overflow: ellipsis;
padding: 10px;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li > .list-unstyled > li .menu > li > a:hover {
background: #f4f4f4;
text-decoration: none;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li > .list-unstyled > li.footer > a {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
font-size: 12px;
background-color: #fff;
padding: 7px 10px;
border-bottom: 1px solid #eeeeee;
color: #444 !important;
text-align: center;
}
.add-new .add-new-menu .menu {
width: 150px;
}
.ajax-search {
padding: 5px;
}
#result-search {
border-color: #00a65a;
}
#result-search li a:hover {
color: #FFFFFF;
background-color : #00A65A !important;
}
#result-search li a:hover .ajax-search .name {
color: #FFFFFF !important;
}
.ajax-search .name {
font-size: 14px;
font-weight: bold;
}
.ajax-search .type {
font-size: 12px;
}
.table.table-responsive tbody tr td {
vertical-align: middle;
}
.form-group.has-error .fancy-file {
margin-bottom: 15px;
}
ul.add-new.nav.navbar-nav.pull-left {
margin: 0;
}
.table {
font-weight: 400;
font-size: inherit;
}
.no-padding-left {
padding-left: 0;
}
.no-padding-right {
padding-right: 0;
}
.invoice-header {
padding-bottom: 9px;
margin: 10px 0 20px 0;
border-bottom: 1px solid #eee;
}
.invoice-company {
padding-left: 23px;
}
.invoice-logo {
max-width: 430px;
max-height: 120px;
}
@media only screen and (max-width : 768px) {
.main-header .add-new.nav.navbar-nav i {
margin-top: 3px;
line-height: 27px;
}
ul.add-new.nav.navbar-nav.pull-left li {
position: initial;
}
.navbar-nav .open .dropdown-menu {
position: absolute;
}
.dropdown.add-new-menu.open .dropdown-menu {
background-color: #ffffff;
}
}
@media only screen and (max-width : 480px) {
.main-header .add-new.nav.navbar-nav i {
margin-top: 3px;
line-height: 27px;
}
ul.add-new.nav.navbar-nav.pull-left li {
position: initial;
}
.navbar-nav .open .dropdown-menu {
position: absolute;
}
.navbar-nav > .add-new-menu > .dropdown-menu > .list-inline > li {
width: 120px;
}
.dropdown.add-new-menu.open .dropdown-menu {
background-color: #ffffff;
}
}

43
public/css/bootstrap-fancyfile.css vendored Normal file
View File

@@ -0,0 +1,43 @@
.fancy-file {
display: block;
position: relative;
}
.fancy-file input[type="file"] {
position: relative;
text-align: right;
-moz-opacity: 0;
filter: alpha(opacity: 0);
opacity: 0;
z-index: 2;
cursor: pointer;
}
.fancy-file div {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
height: 36px;
}
.fancy-file input[type="text"],
.fancy-file button,
.fancy-file .btn {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.fancy-file input[type="text"] {
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.fancy-file button,
.fancy-file .btn {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}

4
public/css/font-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

163
public/css/install.css vendored Normal file
View File

@@ -0,0 +1,163 @@
.install-image {
position: fixed;
left: 0;
right: 0;
z-index: 1;
display: block;
background-image: url('../img/install.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
height: 100%;
width: 100%;
-webkit-filter: grayscale(50%);
-moz-filter: grayscale(50%);
-o-filter: grayscale(50%);
-ms-filter: grayscale(50%);
filter: grayscale(50%);
}
.install-content {
position: fixed;
left: 0;
right: 0;
z-index: 9999;
margin: 0 auto;
max-width : 450px;
}
.install-logo {
text-align: center;
}
.install-logo img {
margin: 25px auto;
width: 70px;
}
.install-loading-bar {
font-size: 35px;
position: absolute;
z-index: 500;
top: 45px;
left: 7px;
width: 434px;
background: rgb(136, 136, 136);
opacity: 0.2;
-moz-border-radius-bottomleft: 1px;
-moz-border-radius-bottomright: 1px;
border-bottom-left-radius: 1px;
border-bottom-right-radius: 1px;
}
.install-loading-spin {
font-size: 100px;
position: absolute;
margin: auto;
color: #fff;
padding: 28% 40%;
}
.table-responsive {
overflow-x: hidden;
}
div.required .control-label:not(span):after, td.required:after {
content: ' *';
color: #F00;
font-weight: bold;
}
.form-group .select2-container {
width: 100% !important;
}
.form-group .select2-container--default .select2-selection--single {
border-radius: 0px;
}
.form-group .select2-container .select2-selection--single {
height: 34px;
border: 1px solid #d2d6de;
}
.form-group .select2-container .select2-selection--single .select2-selection__rendered {
padding-left: 0px;
}
.form-group .select2-container--default .select2-selection--single .select2-selection__placeholder {
color: inherit;
}
.form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
height: 30px;
}
.form-group .select2-container--default .select2-selection--single .select2-selection__arrow b {
border-color: #555 transparent transparent transparent;
}
.info-box .progress .progress-bar {
background: inherit;
}
.info-box .progress .progress-bar.progress-bar-green, .progress-bar-success {
background-color: #00a65a;
}
.info-box .progress .progress-bar.progress-bar-red, .progress-bar-danger {
background-color: #dd4b39;
}
.info-box .progress .progress-bar.progress-bar-aqua, .progress-bar-info {
background-color: #00c0ef;
}
.box.box-success .table.table-bordered {
font-size: 14px;
}
.info-box-icon i {
margin-top: 20px;
}
.box.box-success .chart svg, .chart canvas {
width: 96% !important;
margin-left: 25px;
}
.nav-tabs-custom>.nav-tabs>li.active {
border-top-color: #00a65a;
}
.input-group .btn-group.radio-inline {
padding-left: inherit;
}
.input-group input[type=file]:focus, input[type=checkbox]:focus, input[type=radio]:focus {
outline: inherit;
outline-offset: 0px;
}
.input-group .checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {
margin-left: 0px;
}
.navbar-custom-menu .navbar-nav > li > a > i {
line-height: 20px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: #00a65a !important;
}
.form-control:focus {
border-color: #00a65a !important;
}
.box.box-solid.box-success {
border: none;
box-shadow: 0 2px 10px rgba(153, 153, 153, 0.5);
}

11
public/css/ionicons.min.css vendored Normal file

File diff suppressed because one or more lines are too long

15
public/css/skin-black.css vendored Normal file
View File

@@ -0,0 +1,15 @@
.skin-black .main-sidebar, .skin-black .left-side {
background-color: #2f4050;
}
.skin-black .sidebar-menu>li:hover>a, .skin-black .sidebar-menu>li.active>a {
background: #293846;
}
.skin-black .sidebar-menu>li>.treeview-menu {
background: #293846;
}
.skin-black .sidebar-form input[type="text"], .skin-black .sidebar-form .btn {
background-color: #415365;
}

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/img/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
public/img/company.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
public/img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
public/img/install.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

BIN
public/img/login.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

BIN
public/img/maintanance.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

249
public/js/app.js vendored Normal file
View File

@@ -0,0 +1,249 @@
$(document).ready(function () {
// Live Search
$.fn.liveSearch = function (option) {
return this.each(function () {
this.timer = null;
this.items = new Array();
$.extend(this, option);
$(this).attr('autocomplete', 'off');
// Blur
$(this).on('blur', function () {
setTimeout(function (object) {
object.hide();
}, 200, this);
});
// Keydown
$(this).on('input', function (event) {
this.request();
});
// Show
this.show = function () {
var pos = $('#search').position();
$(this).parent().parent().siblings('ul.dropdown-menu').css({
top : pos.top + $('#search').height(),
width: $('#search').width(),
left: pos.left
});
$(this).parent().parent().siblings('ul.dropdown-menu').show();
};
// Hide
this.hide = function () {
$(this).parent().parent().siblings('ul.dropdown-menu').hide();
};
// Request
this.request = function () {
clearTimeout(this.timer);
this.timer = setTimeout(function (object) {
object.source($(object).val(), $.proxy(object.response, object));
}, 200, this);
};
// Response
this.response = function (json) {
html = '';
if (json.length) {
for (i = 0; i < json.length; i++) {
this.items[json[i]['id']] = json[i];
}
var count = json.length;
for (i = 0; i < count; i++) {
html += '<li data-value="' + json[i]['type'] + '-' + json[i]['id'] + '">';
html += ' <a href="' + json[i]['href'] + '">';
html += ' <div class="ajax-search">';
html += ' <div class="row">';
html += ' <div class="name" style="color: ' + json[i]['color'] + ';">' + json[i]['name'] + '</div>';
html += ' <span class="type">' + json[i]['type'] + '</span>';
html += ' </div>';
html += ' </div>';
html += ' </a>';
html += '</li>';
}
}
if (html) {
this.show();
} else {
this.hide();
}
$(this).parent().parent().siblings('ul.dropdown-menu').html(html);
};
$(this).parent().parent().after('<ul class="dropdown-menu" id="result-search" style="padding:2px 2px 2px 2px;"></ul>');
$(this).parent().parent().siblings('ul.dropdown-menu').delegate('a', 'click', $.proxy(this.click, this));
});
};
$('input[name=\'search\']').liveSearch({
'source': function (request, response) {
if (request != '' && request.length > 2) {
$.ajax({
url : url_search,
type : 'GET',
dataType: 'JSON',
data : 'keyword=' + $(this).val(),
success : function (json) {
response($.map(json, function (item) {
return {
id : item.id,
name : item.name,
type : item.type,
color: item.color,
href : item.href
}
}));
}
});
} else {
$('#search > .dropdown-menu').hide();
}
}
});
last_radio = '';
$("input:radio").each(function () {
if ($(this).parent().parent().hasClass('radio-inline')) {
input_name = $(this).attr("name");
input_value = $(this).attr("value");
input_text = $(this).text();
input_checked = $(this).is(':checked');
enable_class = 'btn-default';
disable_class = 'btn-default';
if (last_radio == input_name) {
return;
}
last_radio = input_name;
if ($(':radio[name="' + input_name + '"]').length != 2) {
return;
}
if ((input_value != 0) && (input_value != 1)) {
return;
}
if ((input_text.localeCompare(text_yes) == 1) && (input_text.localeCompare(text_no) == 1)) {
return;
}
if (input_value == 1 && input_checked == true) {
enable_class = 'btn-success active';
} else {
disable_class = 'btn-danger active';
}
$('#' + input_name + '_1').removeClass('btn-default').addClass(enable_class);
$('#' + input_name + '_0').removeClass('btn-default').addClass(disable_class);
}
});
$(document).on('click', '.btn-group label:not(.active)', function (e) {
disable_label = $(this);
disable_input = $('#' + disable_label.attr('id') + ' :input');
if (disable_input.attr('type') != 'radio') {
return;
}
if (!disable_input.is(':checked')) {
enable_input = $('input[name="' + disable_input.attr('name') + '"]:checked');
enable_label = enable_input.parent();
enable_label.removeClass('btn-success active');
enable_label.removeClass('btn-danger active');
enable_input.removeAttr('checked');
enable_label.addClass('btn btn-default');
disable_label.removeClass('btn-default');
if (disable_input.val() == 0) {
disable_label.addClass('btn-danger active');
} else {
disable_label.addClass('btn-success active');
}
disable_input.attr('checked', 'checked');
enable_input.trigger('change');
disable_input.trigger('change');
}
});
});
function confirmDelete(form_id, title, message, button_cancel, button_delete) {
$('#confirm-modal').remove();
var html = '';
html += '<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true">';
html += ' <div class="modal-dialog">';
html += ' <div class="modal-content">';
html += ' <div class="modal-header">';
html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>';
html += ' <h4 class="modal-title" id="confirmModalLabel">' + title + '</h4>';
html += ' </div>';
html += ' <div class="modal-body">';
html += ' <p>' + message + '</p>';
html += ' <p></p>';
html += ' </div>';
html += ' <div class="modal-footer">';
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">' + button_cancel + '</button>';
html += ' <button type="button" class="btn btn-danger" onclick="$(\'' + form_id + '\').submit();">' + button_delete + '</button>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += '</div>';
$('body').append(html);
$('#confirm-modal').modal('show');
}
$(document).on('click', '.popup', function(e) {
e.preventDefault();
$('#modal-popup').remove();
var element = this;
$.ajax({
url: $(element).attr('href'),
type: 'get',
dataType: 'html',
success: function(data) {
html = '<div class="modal" id="modal-popup">';
html += ' <div class="modal-dialog">';
html += ' <div class="modal-content">';
html += ' <div class="modal-header">';
html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>';
html += ' <h4 class="modal-title">' + $(element).text() + '</h4>';
html += ' </div>';
html += ' <div class="modal-body">' + data + '</div>';
html += ' </div';
html += ' </div>';
html += '</div>';
$('body').append(html);
$('#modal-popup').modal('show');
}
});
});

130
public/js/bootstrap-fancyfile.js vendored Normal file
View File

@@ -0,0 +1,130 @@
!function ($) {
"use strict"; // jshint ;_;
/* FANCYFILE CLASS DEFINITION
* ========================= */
var fancyfile = '[data-toggle=fancyfile]'
, FancyFile = function (element, options) {
var $el = $(element);
this.options = $.extend({}, $.fn.fancyfile.defaults, options);
this.makeFancy($el);
};
FancyFile.prototype = {
constructor: FancyFile,
makeFancy : function (element) {
var $fancy = $(this.options.container);
var $clone = element.clone( true );
var classes = $clone.attr('class');
var $aLink = $(this.options.fakeButton);
var $fakeInput = $(this.options.fakeInput);
var colorized = false;
if(classes) {
classes.split(' ').forEach(function(bc){
if(/input|span/i.test(bc)) {
$fancy.find('div').addClass(bc);
}
if(/primary|info|success|warning|danger|inverse/.test(bc)) {
colorized = true;
$aLink.addClass(bc);
}
});
}
var buttonText = element.attr('data-text');
if(buttonText) {
this.options.text = buttonText === 'false' ? '' : buttonText;
}
var buttonIcon = element.attr('data-icon');
if(buttonIcon) {
this.options.icon = buttonIcon === 'false' ? '' : '<i class="' + buttonIcon + '"></i>';
}
var buttonStyle = element.attr('data-style');
if(buttonStyle) {
colorized = buttonStyle === 'false' ? false : true ;
this.options.style = buttonStyle === 'false' ? '' : buttonStyle;
}
var icon = this.options.icon ? this.options.icon + ' ' : '';
$aLink.html(icon + this.options.text);
if(colorized || /primary|info|success|warning|danger|inverse/.test(this.options.style)) {
$aLink.find('i').addClass('icon-white');
}
if(this.options.style !== '') {
$aLink.addClass(this.options.style);
}
var buttonPlaceholder = element.attr('data-placeholder');
if(buttonPlaceholder) {
this.options.placeholder = buttonPlaceholder === 'false' ? '' : buttonPlaceholder;
}
$fakeInput.attr('placeholder', this.options.placeholder);
$fancy.insertBefore(element);
$clone.attr('type','file');
$fancy.append($clone);
$fancy.find('div').append($fakeInput).append($aLink);
var nW = $fancy.find('div').width();
$clone.width(nW);
element.remove();
$fakeInput.width((nW - $aLink.width()) - 41).height(20);
$aLink.height(20);
$clone.hover(function(e){
$(this).parent().find('.fake-input').addClass('active');
$(this).parent().find('.btn').addClass('active');
}, function(e){
$(this).parent().find('.fake-input').removeClass('active');
$(this).parent().find('.btn').removeClass('active');
});
$clone.on('change.fancyfile.data-api', FancyFile.prototype.change);
},
change: function (e) {
var file = this.files[0],
name = file.name;
$(this).parent().find('.fake-input').val(name);
}
};
/* FANCYFILE PLUGIN DEFINITION
* ========================== */
var old = $.fn.fancyfile;
$.fn.fancyfile = function (options) {
return this.each(function () {
var $this = $(this)
, data = $this.data('fancyfile');
if (!data) $this.data('fancyfile', (data = new FancyFile(this, options)));
if (typeof options === 'string') data[options].call($this);
});
};
$.fn.fancyfile.defaults = {
container : '<div class="fancy-file"><div class="fake-file"></div></div>',
fakeInput : '<input class="fake-input form-control" type="text" />',
fakeButton : '<button class="btn"></button>',
text : 'Select File',
icon : '<i class="icon-file glyphicon glyphicon-file"></i>',
style : '',
placeholder : 'Select File…'
};
$.fn.fancyfile.Constructor = FancyFile;
/* FANCYFILE NO CONFLICT
* ==================== */
$.fn.fancyfile.noConflict = function () {
$.fn.fancyfile = old;
return this;
};
/* DATA-API APPLY TO STANDARD FANCYFILE ELEMENTS
* ============== */
$(window).on('load', function () {
$(fancyfile).each(function () {
$(this).fancyfile();
});
});
}(window.jQuery);

8457
public/js/highchart/highcharts.js vendored Normal file

File diff suppressed because it is too large Load Diff