mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Working on list status select
This commit is contained in:
parent
de2825750d
commit
fce46114bc
@ -45,6 +45,7 @@ class ClientController extends BaseController
|
||||
'entityType' => ENTITY_CLIENT,
|
||||
'title' => trans('texts.clients'),
|
||||
'sortCol' => '4',
|
||||
'statuses' => Utils::trans(Client::$statuses),
|
||||
'columns' => Utils::trans([
|
||||
'checkbox',
|
||||
'client',
|
||||
|
@ -521,6 +521,10 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
define('MAX_NUM_VENDORS', 100);
|
||||
define('MAX_NUM_VENDORS_PRO', 20000);
|
||||
|
||||
define('STATUS_ACTIVE', 'active');
|
||||
define('STATUS_ARCHIVED', 'archived');
|
||||
define('STATUS_DELETED', 'deleted');
|
||||
|
||||
define('INVOICE_STATUS_DRAFT', 1);
|
||||
define('INVOICE_STATUS_SENT', 2);
|
||||
define('INVOICE_STATUS_VIEWED', 3);
|
||||
@ -624,7 +628,7 @@ if (!defined('CONTACT_EMAIL')) {
|
||||
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
|
||||
define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest'));
|
||||
define('NINJA_DATE', '2000-01-01');
|
||||
define('NINJA_VERSION', '2.8.0' . env('NINJA_VERSION_SUFFIX'));
|
||||
define('NINJA_VERSION', '2.8.1' . env('NINJA_VERSION_SUFFIX'));
|
||||
|
||||
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
|
||||
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
|
||||
|
@ -31,6 +31,15 @@ class EntityModel extends Eloquent
|
||||
*/
|
||||
public static $notifySubscriptions = true;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $statuses = [
|
||||
STATUS_ACTIVE,
|
||||
STATUS_ARCHIVED,
|
||||
STATUS_DELETED,
|
||||
];
|
||||
|
||||
/**
|
||||
* @param null $context
|
||||
* @return mixed
|
||||
|
@ -32,7 +32,8 @@
|
||||
"nouislider": "~8.5.1",
|
||||
"bootstrap-daterangepicker": "~2.1.24",
|
||||
"sweetalert2": "^5.3.8",
|
||||
"jSignature": "brinley/jSignature#^2.1.0"
|
||||
"jSignature": "brinley/jSignature#^2.1.0",
|
||||
"select2": "select2-dist#^4.0.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"jquery": "~1.11"
|
||||
|
@ -62,6 +62,10 @@ elixir(function(mix) {
|
||||
bowerDir + '/bootstrap-daterangepicker/daterangepicker.css'
|
||||
], 'public/css/daterangepicker.css');
|
||||
|
||||
mix.styles([
|
||||
bowerDir + '/select2/dist/css/select2.css'
|
||||
], 'public/css/select2.css');
|
||||
|
||||
|
||||
/**
|
||||
* JS configuration
|
||||
@ -80,6 +84,10 @@ elixir(function(mix) {
|
||||
bowerDir + '/bootstrap-daterangepicker/daterangepicker.js'
|
||||
], 'public/js/daterangepicker.min.js');
|
||||
|
||||
mix.scripts([
|
||||
bowerDir + '/select2/dist/js/select2.js'
|
||||
], 'public/js/select2.min.js');
|
||||
|
||||
mix.scripts([
|
||||
bowerDir + '/jSignature/libs/jSignature.min.js'
|
||||
], 'public/js/jSignature.min.js');
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/css/built.css
vendored
4
public/css/built.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
public/css/built.public.css
vendored
4
public/css/built.public.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/js/jSignature.min.js
vendored
2
public/js/jSignature.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
resources/assets/css/style.css
vendored
2
resources/assets/css/style.css
vendored
@ -1238,4 +1238,4 @@ div.panel-body div.panel-body {
|
||||
|
||||
.bluevine-quote .row{
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,21 @@
|
||||
@extends('header')
|
||||
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<script src="{{ asset('js/select2.min.js') }}" type="text/javascript"></script>
|
||||
<link href="{{ asset('css/select2.css') }}" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-selection {
|
||||
border: 1px solid #dfe0e1 !important;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
{!! Former::open(Utils::pluralizeEntityType($entityType) . '/bulk')->addClass('listForm') !!}
|
||||
@ -28,9 +44,17 @@
|
||||
])->withAttributes(['class'=>'archive'])->split() !!}
|
||||
@endif
|
||||
|
||||
<label for="trashed" style="font-weight:normal; margin-left: 10px;">
|
||||
|
||||
<label for="trashed" style="font-weight:normal; margin-left: 10px;">
|
||||
<!--
|
||||
<input id="trashed" type="checkbox" onclick="setTrashVisible()"
|
||||
{{ Session::get("show_trash:{$entityType}") ? 'checked' : ''}}/> {{ trans('texts.show_archived_deleted')}}
|
||||
{{ Session::get("show_trash:{$entityType}") ? 'checked' : ''}}/> {{ trans('texts.show_archived_deleted')}}
|
||||
-->
|
||||
{!! Former::multiselect('statuses')
|
||||
->select('Active')
|
||||
->style('width: 200px')
|
||||
->options($statuses)
|
||||
->raw() !!}
|
||||
</label>
|
||||
|
||||
<div id="top_right_buttons" class="pull-right">
|
||||
@ -154,6 +178,7 @@
|
||||
}
|
||||
@endif
|
||||
|
||||
/*
|
||||
function setTrashVisible() {
|
||||
var checked = $('#trashed').is(':checked');
|
||||
var url = '{{ URL::to('view_archive/' . $entityType) }}' + (checked ? '/true' : '/false');
|
||||
@ -162,6 +187,7 @@
|
||||
refreshDatatable();
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
$(function() {
|
||||
var tableFilter = '';
|
||||
@ -231,6 +257,14 @@
|
||||
$('button.archive').not('.dropdown-toggle').text(buttonLabel);
|
||||
}
|
||||
|
||||
$('#statuses').select2({
|
||||
placeholder: "{{ trans('texts.status') }}",
|
||||
}).on('change', function() {
|
||||
refreshDatatable();
|
||||
}).val([0]).trigger('change');
|
||||
|
||||
|
||||
//$('#statuses').select2().val([0,1,2]).trigger('change');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user