first commit
This commit is contained in:
26
.env.example
Normal file
26
.env.example
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
APP_ENV=local
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_KEY=SomeRandomString
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=homestead
|
||||||
|
DB_USERNAME=homestead
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
QUEUE_DRIVER=sync
|
||||||
|
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_DRIVER=smtp
|
||||||
|
MAIL_HOST=mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
* text=auto
|
||||||
|
*.css linguist-vendored
|
||||||
|
*.scss linguist-vendored
|
||||||
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/vendor
|
||||||
|
/node_modules
|
||||||
|
/public/storage
|
||||||
|
Homestead.yaml
|
||||||
|
Homestead.json
|
||||||
|
.env
|
||||||
14
.vscode/launch.json
vendored
Normal file
14
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "Debug (Launch) - Current File",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "${file}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
33
app/Console/Commands/Inspire.php
Normal file
33
app/Console/Commands/Inspire.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Foundation\Inspiring;
|
||||||
|
|
||||||
|
class Inspire extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'inspire';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Display an inspiring quote';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/Console/Kernel.php
Normal file
30
app/Console/Kernel.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console;
|
||||||
|
|
||||||
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
|
class Kernel extends ConsoleKernel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The Artisan commands provided by your application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $commands = [
|
||||||
|
// Commands\Inspire::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the application's command schedule.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function schedule(Schedule $schedule)
|
||||||
|
{
|
||||||
|
// $schedule->command('inspire')
|
||||||
|
// ->hourly();
|
||||||
|
}
|
||||||
|
}
|
||||||
8
app/Events/Event.php
Normal file
8
app/Events/Event.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events;
|
||||||
|
|
||||||
|
abstract class Event
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
50
app/Exceptions/Handler.php
Normal file
50
app/Exceptions/Handler.php
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Exceptions;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
|
||||||
|
class Handler extends ExceptionHandler
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A list of the exception types that should not be reported.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $dontReport = [
|
||||||
|
AuthorizationException::class,
|
||||||
|
HttpException::class,
|
||||||
|
ModelNotFoundException::class,
|
||||||
|
ValidationException::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report or log an exception.
|
||||||
|
*
|
||||||
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||||
|
*
|
||||||
|
* @param \Exception $e
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function report(Exception $e)
|
||||||
|
{
|
||||||
|
parent::report($e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render an exception into an HTTP response.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Exception $e
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function render($request, Exception $e)
|
||||||
|
{
|
||||||
|
return parent::render($request, $e);
|
||||||
|
}
|
||||||
|
}
|
||||||
72
app/Http/Controllers/Auth/AuthController.php
Normal file
72
app/Http/Controllers/Auth/AuthController.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\User;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\ThrottlesLogins;
|
||||||
|
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
|
||||||
|
|
||||||
|
class AuthController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Registration & Login Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller handles the registration of new users, as well as the
|
||||||
|
| authentication of existing users. By default, this controller uses
|
||||||
|
| a simple trait to add these behaviors. Why don't you explore it?
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Where to redirect users after login / registration.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $redirectTo = '/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new authentication controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware($this->guestMiddleware(), ['except' => 'logout']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a validator for an incoming registration request.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return \Illuminate\Contracts\Validation\Validator
|
||||||
|
*/
|
||||||
|
protected function validator(array $data)
|
||||||
|
{
|
||||||
|
return Validator::make($data, [
|
||||||
|
'name' => 'required|max:255',
|
||||||
|
'email' => 'required|email|max:255|unique:users',
|
||||||
|
'password' => 'required|min:6|confirmed',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new user instance after a valid registration.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
|
protected function create(array $data)
|
||||||
|
{
|
||||||
|
return User::create([
|
||||||
|
'name' => $data['name'],
|
||||||
|
'email' => $data['email'],
|
||||||
|
'password' => bcrypt($data['password']),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
app/Http/Controllers/Auth/PasswordController.php
Normal file
32
app/Http/Controllers/Auth/PasswordController.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
|
|
||||||
|
class PasswordController extends Controller
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This controller is responsible for handling password reset requests
|
||||||
|
| and uses a simple trait to include this behavior. You're free to
|
||||||
|
| explore this trait and override any methods you wish to tweak.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use ResetsPasswords;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new password controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('guest');
|
||||||
|
}
|
||||||
|
}
|
||||||
14
app/Http/Controllers/Controller.php
Normal file
14
app/Http/Controllers/Controller.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||||
|
use Illuminate\Foundation\Auth\Access\AuthorizesResources;
|
||||||
|
|
||||||
|
class Controller extends BaseController
|
||||||
|
{
|
||||||
|
use AuthorizesRequests, AuthorizesResources, DispatchesJobs, ValidatesRequests;
|
||||||
|
}
|
||||||
29
app/Http/Controllers/HomeController.php
Normal file
29
app/Http/Controllers/HomeController.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Requests;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the application dashboard.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('home');
|
||||||
|
}
|
||||||
|
}
|
||||||
36
app/Http/Controllers/LoginController.php
Normal file
36
app/Http/Controllers/LoginController.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
use App\Http\Requests;
|
||||||
|
use Auth;
|
||||||
|
use Validator;
|
||||||
|
use Redirect;
|
||||||
|
|
||||||
|
class LoginController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function authenticate(Request $request) {
|
||||||
|
$post = $request->all();
|
||||||
|
$email = $post['email'];
|
||||||
|
$password = $post['password'];
|
||||||
|
|
||||||
|
if (Auth::attempt(['email' => $email, 'password' => $password])) {
|
||||||
|
|
||||||
|
// Authentication passed...
|
||||||
|
if (Auth::user()->role == 'admin') {
|
||||||
|
// return $next($request);
|
||||||
|
return redirect()->intended('admin');
|
||||||
|
}
|
||||||
|
return redirect('/logout');
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return Redirect::back()->withErrors(array(
|
||||||
|
'error'=>'Invalid Email Address or Password'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1261
app/Http/Controllers/admin/AdminController.php
Normal file
1261
app/Http/Controllers/admin/AdminController.php
Normal file
File diff suppressed because it is too large
Load Diff
55
app/Http/Kernel.php
Normal file
55
app/Http/Kernel.php
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
|
class Kernel extends HttpKernel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The application's global HTTP middleware stack.
|
||||||
|
*
|
||||||
|
* These middleware are run during every request to your application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middleware = [
|
||||||
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||||
|
\App\Http\Middleware\Cors::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware groups.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middlewareGroups = [
|
||||||
|
'web' => [
|
||||||
|
\App\Http\Middleware\EncryptCookies::class,
|
||||||
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||||
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
'throttle:60,1',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware.
|
||||||
|
*
|
||||||
|
* These middleware may be assigned to groups or used individually.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $routeMiddleware = [
|
||||||
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
|
'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
|
||||||
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
'admin' => \App\Http\Middleware\IsAdmin::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
30
app/Http/Middleware/Authenticate.php
Normal file
30
app/Http/Middleware/Authenticate.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
class Authenticate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @param string|null $guard
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next, $guard = null)
|
||||||
|
{
|
||||||
|
if (Auth::guard($guard)->guest()) {
|
||||||
|
if ($request->ajax() || $request->wantsJson()) {
|
||||||
|
return response('Unauthorized.', 401);
|
||||||
|
} else {
|
||||||
|
return redirect()->guest('login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
23
app/Http/Middleware/Cors.php
Normal file
23
app/Http/Middleware/Cors.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
|
||||||
|
class Cors
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
return $next($request)
|
||||||
|
->header('Access-Control-Allow-Origin', '*')
|
||||||
|
->header('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE, OPTIONS')
|
||||||
|
->header('Access-Control-Allow-Headers', 'Content-Type, Authorizations');
|
||||||
|
}
|
||||||
|
}
|
||||||
17
app/Http/Middleware/EncryptCookies.php
Normal file
17
app/Http/Middleware/EncryptCookies.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
|
||||||
|
|
||||||
|
class EncryptCookies extends BaseEncrypter
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the cookies that should not be encrypted.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
24
app/Http/Middleware/IsAdmin.php
Normal file
24
app/Http/Middleware/IsAdmin.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Auth;
|
||||||
|
|
||||||
|
class IsAdmin
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
if (Auth::user() && Auth::user()->role == 'admin') {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
}
|
||||||
26
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file
26
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
|
class RedirectIfAuthenticated
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @param string|null $guard
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next, $guard = null)
|
||||||
|
{
|
||||||
|
if (Auth::guard($guard)->check()) {
|
||||||
|
return redirect('/');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
17
app/Http/Middleware/VerifyCsrfToken.php
Normal file
17
app/Http/Middleware/VerifyCsrfToken.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||||
|
|
||||||
|
class VerifyCsrfToken extends BaseVerifier
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The URIs that should be excluded from CSRF verification.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
10
app/Http/Requests/Request.php
Normal file
10
app/Http/Requests/Request.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
abstract class Request extends FormRequest
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
100
app/Http/routes.php
Normal file
100
app/Http/routes.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Routes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register all of the routes for an application.
|
||||||
|
| It's a breeze. Simply tell Laravel the URIs it should respond to
|
||||||
|
| and give it the controller to call when that URI is requested.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::get('/', function () {
|
||||||
|
return view('welcome');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Route::post('/custom/auth', 'LoginController@authenticate');
|
||||||
|
Route::post('/custom/register', 'CustomAuthController@postRegister');
|
||||||
|
|
||||||
|
Route::group(['middleware' => 'auth'], function () {
|
||||||
|
|
||||||
|
Route::group(['prefix' => 'admin', 'middleware' => 'admin'], function () {
|
||||||
|
|
||||||
|
Route::get('/', 'admin\AdminController@dashboard');
|
||||||
|
Route::get('orders', 'admin\AdminController@orders');
|
||||||
|
Route::get('orders/view/{ck}', 'admin\AdminController@viewOrders');
|
||||||
|
Route::get('orders/view/{ck}/print', 'admin\AdminController@printOrder');
|
||||||
|
Route::get('create-store', 'admin\AdminController@createStore');
|
||||||
|
|
||||||
|
Route::post('orders/download', 'admin\AdminController@download');
|
||||||
|
|
||||||
|
Route::post('create-store/save', 'admin\AdminController@saveNewStore');
|
||||||
|
Route::get('stores-list', 'admin\AdminController@storeList');
|
||||||
|
|
||||||
|
Route::get('view-store/{id}', 'admin\AdminController@viewStore');
|
||||||
|
Route::post('store/update', 'admin\AdminController@updateStore');
|
||||||
|
|
||||||
|
Route::post('store/delete/{id}/{url}', 'admin\AdminController@deleteStore');
|
||||||
|
|
||||||
|
Route::get('overlay-pattern', 'admin\AdminController@overlayPattern');
|
||||||
|
Route::get('overlay-pattern', 'admin\AdminController@overlayPattern');
|
||||||
|
|
||||||
|
Route::get('reports', 'admin\AdminController@viewReports');
|
||||||
|
Route::get('commission', 'admin\AdminController@viewCommission');
|
||||||
|
|
||||||
|
Route::get('clipart-add', 'admin\AdminController@addClipart');
|
||||||
|
Route::get('cliparts', 'admin\AdminController@viewClipart');
|
||||||
|
Route::get('clipart-categories', 'admin\AdminController@viewClipartCategories');
|
||||||
|
Route::post('clipart/save-category', 'admin\AdminController@saveClipartCategory');
|
||||||
|
Route::post('clipart/save-svg-clipart', 'admin\AdminController@saveSVGClipart');
|
||||||
|
Route::post('clipart/delete-clipart-category', 'admin\AdminController@deleteClipartCategory');
|
||||||
|
Route::post('clipart/save-clipart-cat-ordering', 'admin\AdminController@saveClipartCatOrdering');
|
||||||
|
Route::post('clipart/update-clipart-category', 'admin\AdminController@updateClipartCategory');
|
||||||
|
Route::post('clipart/delete', 'admin\AdminController@deleteClipart');
|
||||||
|
|
||||||
|
Route::get('visualizer/add', 'admin\AdminController@visualizerAdd');
|
||||||
|
Route::get('visualizer', 'admin\AdminController@visualizer');
|
||||||
|
Route::post('visualizer/request/get-sports-category', 'admin\AdminController@selectSportsCategory');
|
||||||
|
Route::get('/get-overlay-pattern', 'admin\AdminController@getOverlayPattern');
|
||||||
|
Route::post('/add-new-visualizer/save', 'admin\AdminController@saveNewVisualizer');
|
||||||
|
Route::get('/view-visualizer/{id}', 'admin\AdminController@viewVisualizer');
|
||||||
|
Route::post('visualizer/delete', 'admin\AdminController@deleteVisualizer');
|
||||||
|
Route::post('visualizer/update', 'admin\AdminController@updateVisualizer');
|
||||||
|
|
||||||
|
|
||||||
|
Route::get('print-files', 'admin\AdminController@printFiles');
|
||||||
|
Route::get('print-files/{tempid}', 'admin\AdminController@printFilesDetails');
|
||||||
|
Route::post('print-files/delete', 'admin\AdminController@printFilesDelete');
|
||||||
|
Route::get('upload-print-file', 'admin\AdminController@uploadPrintFile');
|
||||||
|
Route::post('upload-print-file/save', 'admin\AdminController@uploadPrintFileSave');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Route::get('user-list', 'admin\AdminController@userList');
|
||||||
|
|
||||||
|
Route::post('post/update-user-as-store-owner', 'admin\AdminController@updatUserAsStoreOwner');
|
||||||
|
Route::post('post/remove-store-access', 'admin\AdminController@removeStoreAccess');
|
||||||
|
Route::post('post/save-new-store-owner', 'admin\AdminController@saveNewStoreOwner');
|
||||||
|
|
||||||
|
Route::post('post/show-store-order-details', 'admin\AdminController@showStoreOrderDetails');
|
||||||
|
|
||||||
|
// Download Routes /////////////////
|
||||||
|
Route::get('orders/download/tshirt/{ck}/{id}', 'admin\AdminController@downloadPrintFile_tshirt');
|
||||||
|
Route::get('orders/download/jersey/{ck}/{id}', 'admin\AdminController@downloadPrintFile_jersey');
|
||||||
|
Route::get('orders/download/mask/{ck}/{id}', 'admin\AdminController@downloadPrintFile_mask');
|
||||||
|
// End Download Routes /////////////
|
||||||
|
|
||||||
|
Route::get('tax-settings', 'admin\AdminController@taxIndex');
|
||||||
|
Route::post('post/update-hibernate', 'admin\AdminController@updateHibernate');
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::auth();
|
||||||
|
|
||||||
|
// Route::get('/home', 'HomeController@index');
|
||||||
21
app/Jobs/Job.php
Normal file
21
app/Jobs/Job.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Jobs;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
|
||||||
|
abstract class Job
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queueable Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This job base class provides a central location to place any logic that
|
||||||
|
| is shared across all of your jobs. The trait included with the class
|
||||||
|
| provides access to the "onQueue" and "delay" queue helper methods.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Queueable;
|
||||||
|
}
|
||||||
1
app/Listeners/.gitkeep
Normal file
1
app/Listeners/.gitkeep
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
499
app/Models/admin/AdminModel.php
Normal file
499
app/Models/admin/AdminModel.php
Normal file
@@ -0,0 +1,499 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\admin;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class AdminModel extends Model
|
||||||
|
{
|
||||||
|
function selectPaymentDetails($field, $value){
|
||||||
|
|
||||||
|
if($field != "All"){
|
||||||
|
$i = DB::table('payment_details')
|
||||||
|
->where($field, $value)
|
||||||
|
->orderby('Id', 'ASC')
|
||||||
|
->get();
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$i = DB::table('payment_details')
|
||||||
|
->leftjoin('orders', 'payment_details.CartKey', '=', 'orders.CartKey')
|
||||||
|
->leftjoin('teamstores', 'teamstores.Id', '=', 'orders.StoreId')
|
||||||
|
->select('payment_details.*', 'orders.StoreId', 'teamstores.StoreName')
|
||||||
|
->where("payment_details.CartKey", "!=", null)
|
||||||
|
->groupby('orders.CartKey')
|
||||||
|
->orderby('payment_details.Id', 'ASC')
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOrderItem($field, $ck){
|
||||||
|
$i = DB::table('orders')
|
||||||
|
->where($field, $ck)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function itemGroup($cartKey){
|
||||||
|
$pdo = DB::connection()->getPdo();
|
||||||
|
$query = $pdo->prepare("SELECT orders.*, COUNT(orders.Id) AS qty, orders.Price * SUM(orders.Quantity) AS total_price, teamstores.StoreName FROM orders LEFT JOIN teamstores on teamstores.Id = orders.StoreId WHERE CartKey = :ck GROUP BY ProductId");
|
||||||
|
$query->execute([':ck'=>$cartKey]);
|
||||||
|
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||||
|
return $row;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDisplayItemThumb(){
|
||||||
|
|
||||||
|
$i = DB::table('teamstore_product_thumbnails')
|
||||||
|
->where('ImageClass', 'active')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectShippingAddress($field, $value){
|
||||||
|
|
||||||
|
$i = DB::table('shipping_addresses')
|
||||||
|
->where($field, $value)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectClientDesign($design_code){
|
||||||
|
$i = DB::table('client_designs')
|
||||||
|
->where('DesignCode', $design_code)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertTeamstore($data){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')->insert($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectTeamstore(){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')
|
||||||
|
->paginate(16);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectTeamstoreFilter($field, $value){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')
|
||||||
|
->orderby($field, $value)
|
||||||
|
->paginate(16);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectTeamstoreSearch($field, $value, $keyword){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')
|
||||||
|
->where("StoreName", "LIKE","%$keyword%")
|
||||||
|
->orderby($field, $value)
|
||||||
|
->paginate(16);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectTeamstoreById($id){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')
|
||||||
|
->where("Id", $id)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTeamstore($id, $data){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')
|
||||||
|
->where("Id", $id)
|
||||||
|
->update($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteTeamstoreById($id){
|
||||||
|
|
||||||
|
$i = DB::table('teamstores')
|
||||||
|
->where("Id", $id)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectPattern(){
|
||||||
|
|
||||||
|
$i = DB::table('patterns')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectPatternWithfield($field, $value){
|
||||||
|
|
||||||
|
$i = DB::table('patterns')
|
||||||
|
->where($field, $value)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectClipartCategory(){
|
||||||
|
$i = DB::table('clipart_categories')
|
||||||
|
->leftjoin('user_logins', 'clipart_categories.UserId', '=', 'user_logins.id')
|
||||||
|
->select('clipart_categories.*', 'user_logins.username')
|
||||||
|
->orderby('clipart_categories.Ordering', 'ASC')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ClipartCategory(){
|
||||||
|
$i = DB::table('clipart_categories')
|
||||||
|
->leftjoin('user_logins', 'clipart_categories.UserId', '=', 'user_logins.id')
|
||||||
|
->select('clipart_categories.*', 'user_logins.username')
|
||||||
|
->orderby('clipart_categories.Ordering', 'ASC')
|
||||||
|
->paginate(18);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectStoreOwners($store_id){
|
||||||
|
$i = DB::table('user_logins')
|
||||||
|
->where('role', 'store_owner')
|
||||||
|
->where('store_id', $store_id)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertClipartCategory($data){
|
||||||
|
|
||||||
|
$i = DB::table('clipart_categories')->insertGetId($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertClipart($data){
|
||||||
|
|
||||||
|
$i = DB::table('cliparts')->insert($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateClipartCatOrdering($order, $id){
|
||||||
|
$i = DB::table('clipart_categories')->where('Id', $id)
|
||||||
|
->update(['Ordering' => $order]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function userList(){
|
||||||
|
$i = DB::table('user_logins')
|
||||||
|
->select('id', 'name', 'username', 'email')
|
||||||
|
// ->where("name", "LIKE","%$keyword%")
|
||||||
|
// ->orWhere("username", "LIKE","%$keyword%")
|
||||||
|
// ->orWhere("email", "LIKE","%$keyword%")
|
||||||
|
->where("role", "user")
|
||||||
|
->orderby('name', 'ASC')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeUserAsStoreOwner($data){
|
||||||
|
|
||||||
|
$i = DB::table('user_logins')
|
||||||
|
->where("Id", $data['user_id'])
|
||||||
|
->update(['role'=> 'store_owner', 'store_id'=> $data['store_id']]);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function model_removeStoreAccess($data){
|
||||||
|
$i = DB::table('user_logins')
|
||||||
|
->where("Id", $data['user_id'])
|
||||||
|
->update(['role'=> 'user', 'store_id'=> $data['store_id']]);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteClipartCategory($id){
|
||||||
|
|
||||||
|
$i = DB::table('clipart_categories')
|
||||||
|
->where("Id", $id)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteClipart($id){
|
||||||
|
|
||||||
|
$i = DB::table('cliparts')
|
||||||
|
->where("Id", $id)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateClipartCategory($id, $data){
|
||||||
|
|
||||||
|
$i = DB::table('clipart_categories')
|
||||||
|
->where("Id", $id)
|
||||||
|
->update($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCliparts($cat_id){
|
||||||
|
|
||||||
|
if($cat_id != 0 || $cat_id != ""){
|
||||||
|
$i = DB::table('cliparts')->select('cliparts.*', 'clipart_categories.CategoryName')
|
||||||
|
->leftjoin('clipart_categories', 'clipart_categories.Id','=','cliparts.CategoryId')
|
||||||
|
->where('cliparts.CategoryId', $cat_id)
|
||||||
|
->orderby("Id", "DESC")
|
||||||
|
->paginate(16);
|
||||||
|
return $i;
|
||||||
|
}else{
|
||||||
|
$i = DB::table('cliparts')->select('cliparts.*', 'clipart_categories.CategoryName')
|
||||||
|
->leftjoin('clipart_categories', 'clipart_categories.Id','=','cliparts.CategoryId')
|
||||||
|
// ->where('cliparts.CategoryId', $cat_id)
|
||||||
|
->orderby("Id", "DESC")
|
||||||
|
->paginate(16);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectSports(){
|
||||||
|
|
||||||
|
$i = DB::table('sports')
|
||||||
|
->orderby("SportsName", "ASC")
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectSportsCategory($id){
|
||||||
|
|
||||||
|
$i = DB::table('template_categories')
|
||||||
|
->where('TemplateId', $id)
|
||||||
|
->orderby("Category", "ASC")
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectStoreOrders(){
|
||||||
|
$i = DB::table('orders')->select('orders.*', 'orders.Id as Order_Id', 'orders.DateCreated AS date_ordered', 'payment_details.InvoiceNumber', 'payment_details.Currency', 'payment_details.Payer_Email', 'payment_details.Payer_Firstname', 'payment_details.Payer_Lastname', 'shipping_addresses.*', 'teamstores.*')
|
||||||
|
->leftjoin('payment_details', 'payment_details.CartKey','=','orders.CartKey')
|
||||||
|
->leftjoin('shipping_addresses', 'shipping_addresses.PaymentDetail_Id','=','payment_details.Id')
|
||||||
|
->leftjoin('teamstores', 'teamstores.Id','=','orders.StoreId')
|
||||||
|
// ->where('orders.StoreId', $store_id)
|
||||||
|
->orderby('orders.DateCreated', 'DESC')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveNewVisualizer($data){
|
||||||
|
$i = DB::table('templates')->insert($data);
|
||||||
|
$id = DB::getPdo()->lastInsertId();
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'i' => $i,
|
||||||
|
'lastId' => $id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateVisualizer($id, $data){
|
||||||
|
|
||||||
|
$i = DB::table('templates')
|
||||||
|
->where("Id", $id)
|
||||||
|
->update($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveVisualizerDefaultBodyColor($data){
|
||||||
|
$i = DB::table('template_body_colors')->insert($data);
|
||||||
|
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveVisualizerDefaultTrimColor($data){
|
||||||
|
$i = DB::table('template_trim_colors')->insert($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveVisualizerPath($data){
|
||||||
|
$i = DB::table('template_paths')->insert($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectVisualizer($sports_id, $sports_category){
|
||||||
|
$i = DB::table('templates')
|
||||||
|
->where('SportsId', $sports_id)
|
||||||
|
->where('Category', $sports_category)
|
||||||
|
->orderBy('Id', 'DESC')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDisplayItemThumbById($id){
|
||||||
|
|
||||||
|
$i = DB::table('teamstore_product_thumbnails')
|
||||||
|
->where('ProductId', $id)
|
||||||
|
->where('ImageClass', 'active')
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOrder($field, $value){
|
||||||
|
$i = DB::table('orders')
|
||||||
|
->where($field, $value)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function editVisualizer($id){
|
||||||
|
$i = DB::table('templates')
|
||||||
|
->where('Id', $id)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function deleteVisualizer($id){
|
||||||
|
|
||||||
|
$i = DB::table('templates')
|
||||||
|
->where("Id", $id)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteDefaultBodyColor($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('template_body_colors')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteTemplatePath($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('template_paths')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteDefaultTrimColor($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('template_trim_colors')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deletePrintPatternList($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('print_pattern_list')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectTemplatePath($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('template_paths')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDefaultBodyColor($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('template_body_colors')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDefaultTrimColor($tempCode){
|
||||||
|
|
||||||
|
$i = DB::table('template_trim_colors')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->get();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateDefaultBodyColor($tempCode, $data){
|
||||||
|
|
||||||
|
$i = DB::table('template_body_colors')
|
||||||
|
->where("TemplateCode", $tempCode)
|
||||||
|
->update($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateVisualizerPath($id, $data){
|
||||||
|
|
||||||
|
$i = DB::table('template_paths')
|
||||||
|
->where("Id", $id)
|
||||||
|
->update($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectCommission(){
|
||||||
|
$i = DB::select("SELECT t.StoreName, pd.InvoiceNumber, pd.CartKey, pd.Total, pd.SubTotal, pd.Tax, pd.Currency,
|
||||||
|
(pd.Total * 0.029) AS proc_fee,
|
||||||
|
(pd.SubTotal - 0.29) AS trans_rate, ROUND(((
|
||||||
|
SELECT trans_rate) - (
|
||||||
|
SELECT proc_fee)), 2) AS commission_rate, ROUND(((
|
||||||
|
SELECT commission_rate) * 0.25), 2) AS twenty_five_percent, ROUND(((
|
||||||
|
SELECT commission_rate) * 0.05), 2) AS five_percent
|
||||||
|
FROM orders AS o
|
||||||
|
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey
|
||||||
|
INNER JOIN teamstores AS t ON o.StoreId = t.Id
|
||||||
|
GROUP BY pd.CartKey
|
||||||
|
ORDER BY o.DateCreated");
|
||||||
|
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectVisualizerPrint(){
|
||||||
|
$i = DB::select("SELECT t.TemplateCode, t.Thumbnail, t.TemplateName, t.IsActive,
|
||||||
|
s.SportsName, tc.Category
|
||||||
|
FROM templates AS t
|
||||||
|
LEFT JOIN sports AS s ON t.SportsId = s.Id
|
||||||
|
LEFT JOIN template_categories AS tc ON tc.Id = t.Category");
|
||||||
|
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function insertPrintFiles($data){
|
||||||
|
|
||||||
|
$i = DB::table('print_pattern_list')->insert($data);
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectGroupPrintFiles(){
|
||||||
|
$i = DB::select("SELECT ppl.TemplateCode, t.TemplateName, s.SportsName, tc.Category
|
||||||
|
FROM print_pattern_list AS ppl
|
||||||
|
INNER JOIN templates AS t ON t.TemplateCode = ppl.TemplateCode
|
||||||
|
INNER JOIN sports AS s ON s.Id = t.SportsId
|
||||||
|
INNER JOIN template_categories AS tc ON tc.Id = t.Category
|
||||||
|
GROUP BY ppl.TemplateCode");
|
||||||
|
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectPrintFiles($tempCode){
|
||||||
|
$i = DB::select("SELECT t.TemplateName, ppl.Id, ppl.Path, ppl.`Type`, ppl.Size from templates AS t
|
||||||
|
INNER JOIN print_pattern_list AS ppl ON ppl.TemplateCode = t.TemplateCode
|
||||||
|
WHERE t.TemplateCode = '$tempCode'
|
||||||
|
ORDER BY ppl.`Type` ASC");
|
||||||
|
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function deletePrintFiles($id){
|
||||||
|
$i = DB::table('print_pattern_list')
|
||||||
|
->where("Id", $id)
|
||||||
|
->delete();
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectTax(){
|
||||||
|
$i = DB::select("SELECT t.Id, t.StoreName, tx.DateCreated FROM tax AS tx
|
||||||
|
INNER JOIN teamstores AS t
|
||||||
|
ON t.Id = tx.TeamstoreId");
|
||||||
|
return $i;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
app/Policies/.gitkeep
Normal file
1
app/Policies/.gitkeep
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
28
app/Providers/AppServiceProvider.php
Normal file
28
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
31
app/Providers/AuthServiceProvider.php
Normal file
31
app/Providers/AuthServiceProvider.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
|
||||||
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class AuthServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The policy mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $policies = [
|
||||||
|
'App\Model' => 'App\Policies\ModelPolicy',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any application authentication / authorization services.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot(GateContract $gate)
|
||||||
|
{
|
||||||
|
$this->registerPolicies($gate);
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
33
app/Providers/EventServiceProvider.php
Normal file
33
app/Providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event listener mappings for the application.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $listen = [
|
||||||
|
'App\Events\SomeEvent' => [
|
||||||
|
'App\Listeners\EventListener',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any other events for your application.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Contracts\Events\Dispatcher $events
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot(DispatcherContract $events)
|
||||||
|
{
|
||||||
|
parent::boot($events);
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
61
app/Providers/RouteServiceProvider.php
Normal file
61
app/Providers/RouteServiceProvider.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Routing\Router;
|
||||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class RouteServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This namespace is applied to your controller routes.
|
||||||
|
*
|
||||||
|
* In addition, it is set as the URL generator's root namespace.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $namespace = 'App\Http\Controllers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define your route model bindings, pattern filters, etc.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Routing\Router $router
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot(Router $router)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
|
||||||
|
parent::boot($router);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the routes for the application.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Routing\Router $router
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function map(Router $router)
|
||||||
|
{
|
||||||
|
$this->mapWebRoutes($router);
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the "web" routes for the application.
|
||||||
|
*
|
||||||
|
* These routes all receive session state, CSRF protection, etc.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Routing\Router $router
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function mapWebRoutes(Router $router)
|
||||||
|
{
|
||||||
|
$router->group([
|
||||||
|
'namespace' => $this->namespace, 'middleware' => 'web',
|
||||||
|
], function ($router) {
|
||||||
|
require app_path('Http/routes.php');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
28
app/User.php
Normal file
28
app/User.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
|
||||||
|
class User extends Authenticatable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $table = 'user_logins';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name', 'username', 'email', 'password', 'role', 'store_id'
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be hidden for arrays.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'password', 'remember_token',
|
||||||
|
];
|
||||||
|
}
|
||||||
51
artisan
Normal file
51
artisan
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Artisan Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When we run the console application, the current CLI command will be
|
||||||
|
| executed in this console and the response sent back to a terminal
|
||||||
|
| or another output device for the developers. Here goes nothing!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||||
|
|
||||||
|
$status = $kernel->handle(
|
||||||
|
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||||
|
new Symfony\Component\Console\Output\ConsoleOutput
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shutdown The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once Artisan has finished running. We will fire off the shutdown events
|
||||||
|
| so that any final work may be done by the application before we shut
|
||||||
|
| down the process. This is the last thing to happen to the request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel->terminate($input, $status);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
55
bootstrap/app.php
Normal file
55
bootstrap/app.php
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The first thing we will do is create a new Laravel application instance
|
||||||
|
| which serves as the "glue" for all the components of Laravel, and is
|
||||||
|
| the IoC container for the system binding all of the various parts.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = new Illuminate\Foundation\Application(
|
||||||
|
realpath(__DIR__.'/../')
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bind Important Interfaces
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, we need to bind some important interfaces into the container so
|
||||||
|
| we will be able to resolve them when needed. The kernels serve the
|
||||||
|
| incoming requests to this application from both the web and CLI.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Http\Kernel::class,
|
||||||
|
App\Http\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Console\Kernel::class,
|
||||||
|
App\Console\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||||
|
App\Exceptions\Handler::class
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Return The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This script returns the application instance. The instance is given to
|
||||||
|
| the calling script so we can separate the building of the instances
|
||||||
|
| from the actual running of the application and sending responses.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $app;
|
||||||
34
bootstrap/autoload.php
Normal file
34
bootstrap/autoload.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Composer Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Include The Compiled Class File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| To dramatically increase your application's performance, you may use a
|
||||||
|
| compiled class file which contains all of the classes commonly used
|
||||||
|
| by a request. The Artisan "optimize" is used to create this file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$compiledPath = __DIR__.'/cache/compiled.php';
|
||||||
|
|
||||||
|
if (file_exists($compiledPath)) {
|
||||||
|
require $compiledPath;
|
||||||
|
}
|
||||||
2
bootstrap/cache/.gitignore
vendored
Normal file
2
bootstrap/cache/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
50
composer.json
Normal file
50
composer.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"name": "laravel/laravel",
|
||||||
|
"description": "The Laravel Framework.",
|
||||||
|
"keywords": ["framework", "laravel"],
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "project",
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.5.9",
|
||||||
|
"laravel/framework": "5.2.*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fzaninotto/faker": "~1.4",
|
||||||
|
"mockery/mockery": "0.9.*",
|
||||||
|
"phpunit/phpunit": "~4.0",
|
||||||
|
"symfony/css-selector": "2.8.*|3.0.*",
|
||||||
|
"symfony/dom-crawler": "2.8.*|3.0.*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"database"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"classmap": [
|
||||||
|
"tests/TestCase.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-root-package-install": [
|
||||||
|
"php -r \"copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"php artisan key:generate"
|
||||||
|
],
|
||||||
|
"post-install-cmd": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postInstall",
|
||||||
|
"php artisan optimize"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
|
||||||
|
"php artisan optimize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"preferred-install": "dist"
|
||||||
|
}
|
||||||
|
}
|
||||||
3263
composer.lock
generated
Normal file
3263
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
207
config/app.php
Normal file
207
config/app.php
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the "environment" your application is currently
|
||||||
|
| running in. This may determine how you prefer to configure various
|
||||||
|
| services your application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => env('APP_DEBUG', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| your application so that it is used when running Artisan tasks.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. We have gone
|
||||||
|
| ahead and set this to a sensible default for you out of the box.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by the translation service provider. You are free to set this value
|
||||||
|
| to any of the locales which will be supported by the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Fallback Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The fallback locale determines the locale to use when the current one
|
||||||
|
| is not available. You may change the value to correspond to any of
|
||||||
|
| the language folders that are provided through your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is used by the Illuminate encrypter service and should be set
|
||||||
|
| to a random, 32 character string, otherwise these encrypted strings
|
||||||
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Logging Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the log settings for your application. Out of
|
||||||
|
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||||
|
| you a variety of powerful log handlers / formatters to utilize.
|
||||||
|
|
|
||||||
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'log' => env('APP_LOG', 'single'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Autoloaded Service Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service providers listed here will be automatically loaded on the
|
||||||
|
| request to your application. Feel free to add your own services to
|
||||||
|
| this array to grant expanded functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Laravel Framework Service Providers...
|
||||||
|
*/
|
||||||
|
Illuminate\Auth\AuthServiceProvider::class,
|
||||||
|
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
||||||
|
Illuminate\Bus\BusServiceProvider::class,
|
||||||
|
Illuminate\Cache\CacheServiceProvider::class,
|
||||||
|
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
||||||
|
Illuminate\Cookie\CookieServiceProvider::class,
|
||||||
|
Illuminate\Database\DatabaseServiceProvider::class,
|
||||||
|
Illuminate\Encryption\EncryptionServiceProvider::class,
|
||||||
|
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
||||||
|
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
||||||
|
Illuminate\Hashing\HashServiceProvider::class,
|
||||||
|
Illuminate\Mail\MailServiceProvider::class,
|
||||||
|
Illuminate\Pagination\PaginationServiceProvider::class,
|
||||||
|
Illuminate\Pipeline\PipelineServiceProvider::class,
|
||||||
|
Illuminate\Queue\QueueServiceProvider::class,
|
||||||
|
Illuminate\Redis\RedisServiceProvider::class,
|
||||||
|
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
||||||
|
Illuminate\Session\SessionServiceProvider::class,
|
||||||
|
Illuminate\Translation\TranslationServiceProvider::class,
|
||||||
|
Illuminate\Validation\ValidationServiceProvider::class,
|
||||||
|
Illuminate\View\ViewServiceProvider::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Application Service Providers...
|
||||||
|
*/
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
App\Providers\AuthServiceProvider::class,
|
||||||
|
App\Providers\EventServiceProvider::class,
|
||||||
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Aliases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This array of class aliases will be registered when this application
|
||||||
|
| is started. However, feel free to register as many as you wish as
|
||||||
|
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'aliases' => [
|
||||||
|
|
||||||
|
'App' => Illuminate\Support\Facades\App::class,
|
||||||
|
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||||
|
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||||
|
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||||
|
'Cache' => Illuminate\Support\Facades\Cache::class,
|
||||||
|
'Config' => Illuminate\Support\Facades\Config::class,
|
||||||
|
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||||
|
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||||
|
'DB' => Illuminate\Support\Facades\DB::class,
|
||||||
|
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||||
|
'Event' => Illuminate\Support\Facades\Event::class,
|
||||||
|
'File' => Illuminate\Support\Facades\File::class,
|
||||||
|
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||||
|
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||||
|
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||||
|
'Log' => Illuminate\Support\Facades\Log::class,
|
||||||
|
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||||
|
'Password' => Illuminate\Support\Facades\Password::class,
|
||||||
|
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||||
|
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||||
|
'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||||
|
'Request' => Illuminate\Support\Facades\Request::class,
|
||||||
|
'Response' => Illuminate\Support\Facades\Response::class,
|
||||||
|
'Route' => Illuminate\Support\Facades\Route::class,
|
||||||
|
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||||
|
'Session' => Illuminate\Support\Facades\Session::class,
|
||||||
|
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||||
|
'URL' => Illuminate\Support\Facades\URL::class,
|
||||||
|
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
|
'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
107
config/auth.php
Normal file
107
config/auth.php
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Defaults
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default authentication "guard" and password
|
||||||
|
| reset options for your application. You may change these defaults
|
||||||
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => 'web',
|
||||||
|
'passwords' => 'users',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| here which uses session storage and the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| Supported: "session", "token"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
'driver' => 'token',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication drivers have a user provider. This defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| mechanisms used by this application to persist your user's data.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| sources which represent each model / table. These sources may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => App\User::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Resetting Passwords
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may set the options for resetting passwords including the view
|
||||||
|
| that is your password reset e-mail. You may also set the name of the
|
||||||
|
| table that maintains all of the reset tokens for your application.
|
||||||
|
|
|
||||||
|
| You may specify multiple password reset configurations if you have more
|
||||||
|
| than one user table or model in the application and you want to have
|
||||||
|
| separate password reset settings based on the specific user types.
|
||||||
|
|
|
||||||
|
| The expire time is the number of minutes that the reset token should be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passwords' => [
|
||||||
|
'users' => [
|
||||||
|
'provider' => 'users',
|
||||||
|
'email' => 'auth.emails.password',
|
||||||
|
'table' => 'password_resets',
|
||||||
|
'expire' => 60,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
52
config/broadcasting.php
Normal file
52
config/broadcasting.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Broadcaster
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default broadcaster that will be used by the
|
||||||
|
| framework when an event needs to be broadcast. You may set this to
|
||||||
|
| any of the connections defined in the "connections" array below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('BROADCAST_DRIVER', 'pusher'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Broadcast Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the broadcast connections that will be used
|
||||||
|
| to broadcast events to other systems or over websockets. Samples of
|
||||||
|
| each available type of connection are provided inside this array.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'pusher' => [
|
||||||
|
'driver' => 'pusher',
|
||||||
|
'key' => env('PUSHER_KEY'),
|
||||||
|
'secret' => env('PUSHER_SECRET'),
|
||||||
|
'app_id' => env('PUSHER_APP_ID'),
|
||||||
|
'options' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'driver' => 'log',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
81
config/cache.php
Normal file
81
config/cache.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache connection that gets used while
|
||||||
|
| using this caching library. This connection is used when another is
|
||||||
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('CACHE_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Stores
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the cache "stores" for your application as
|
||||||
|
| well as their drivers. You may even define multiple stores for the
|
||||||
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'stores' => [
|
||||||
|
|
||||||
|
'apc' => [
|
||||||
|
'driver' => 'apc',
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'driver' => 'array',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'cache',
|
||||||
|
'connection' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'file' => [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path('framework/cache'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'memcached' => [
|
||||||
|
'driver' => 'memcached',
|
||||||
|
'servers' => [
|
||||||
|
[
|
||||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MEMCACHED_PORT', 11211),
|
||||||
|
'weight' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||||
|
| be other applications utilizing the same cache. So, we'll specify a
|
||||||
|
| value to get prefixed to all our keys so we can avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => 'laravel',
|
||||||
|
|
||||||
|
];
|
||||||
35
config/compile.php
Normal file
35
config/compile.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Additional Compiled Classes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify additional classes to include in the compiled file
|
||||||
|
| generated by the `artisan optimize` command. These should be classes
|
||||||
|
| that are included on basically every request into the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Compiled File Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may list service providers which define a "compiles" function
|
||||||
|
| that returns additional files that should be compiled, providing an
|
||||||
|
| easy way to get common files from any packages you are utilizing.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
120
config/database.php
Normal file
120
config/database.php
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| PDO Fetch Style
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default, database results will be returned as instances of the PHP
|
||||||
|
| stdClass object; however, you may desire to retrieve records in an
|
||||||
|
| array format for simplicity. Here you can tweak the fetch style.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fetch' => PDO::FETCH_CLASS,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for all database work. Of course
|
||||||
|
| you may use many connections at once using the Database library.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here are each of the database connections setup for your application.
|
||||||
|
| Of course, examples of configuring each database platform that is
|
||||||
|
| supported by Laravel is shown below to make development simple.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| All database work in Laravel is done through the PHP PDO facilities
|
||||||
|
| so make sure you have the driver for your particular database of
|
||||||
|
| choice installed on your machine before you begin development.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'host' => env('DB_HOST'),
|
||||||
|
'port' => env('DB_PORT'),
|
||||||
|
'database' => env('DB_DATABASE'),
|
||||||
|
'username' => env('DB_USERNAME'),
|
||||||
|
'password' => env('DB_PASSWORD'),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'collation' => 'utf8_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
'strict' => false,
|
||||||
|
'engine' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'schema' => 'public',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run in the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => 'migrations',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer set of commands than a typical key-value systems
|
||||||
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'cluster' => false,
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'host' => env('REDIS_HOST', 'localhost'),
|
||||||
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
'database' => 0,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
71
config/filesystems.php
Normal file
71
config/filesystems.php
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default filesystem disk that should be used
|
||||||
|
| by the framework. A "local" driver, as well as a variety of cloud
|
||||||
|
| based drivers are available for your choosing. Just store away!
|
||||||
|
|
|
||||||
|
| Supported: "local", "ftp", "s3", "rackspace"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => 'local',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cloud Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Many applications store files both locally and in the cloud. For this
|
||||||
|
| reason, you may specify a default "cloud" driver here. This driver
|
||||||
|
| will be bound as the Cloud disk implementation in the container.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cloud' => 's3',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Disks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||||
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disks' => [
|
||||||
|
|
||||||
|
'local' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'public' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/public'),
|
||||||
|
'visibility' => 'public',
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => 'your-key',
|
||||||
|
'secret' => 'your-secret',
|
||||||
|
'region' => 'your-region',
|
||||||
|
'bucket' => 'your-bucket',
|
||||||
|
],
|
||||||
|
|
||||||
|
'uploads' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => env('UPLOAD_FOLDER_PATH'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
112
config/mail.php
Normal file
112
config/mail.php
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mail Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||||
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
|
||||||
|
| "ses", "sparkpost", "log"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may provide the host address of the SMTP server used by your
|
||||||
|
| applications. A default option is provided that is compatible with
|
||||||
|
| the Mailgun mail service which will provide reliable deliveries.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Port
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the SMTP port used by your application to deliver e-mails to
|
||||||
|
| users of the application. Like the host we have set this value to
|
||||||
|
| stay compatible with the Mailgun e-mail application by default.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'port' => env('MAIL_PORT', 587),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all e-mails sent by your application to be sent from
|
||||||
|
| the same address. Here, you may specify a name and address that is
|
||||||
|
| used globally for all e-mails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => ['address' => null, 'name' => null],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| E-Mail Encryption Protocol
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the encryption protocol that should be used when
|
||||||
|
| the application send e-mail messages. A sensible default using the
|
||||||
|
| transport layer security protocol should provide great security.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Server Username
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your SMTP server requires a username for authentication, you should
|
||||||
|
| set it here. This will get used to authenticate with your server on
|
||||||
|
| connection. You may also set the "password" value below this one.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Server Password
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may set the password required by your SMTP server to send out
|
||||||
|
| messages from your application. This will be given to the server on
|
||||||
|
| connection so that the application will be able to send messages.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Sendmail System Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||||
|
| the path to where Sendmail lives on this server. A default path has
|
||||||
|
| been provided here, which will work well on most of your systems.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
|
];
|
||||||
85
config/queue.php
Normal file
85
config/queue.php
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The Laravel queue API supports a variety of back-ends via an unified
|
||||||
|
| API, giving you convenient access to each back-end using the same
|
||||||
|
| syntax for each one. Here you may set the default queue driver.
|
||||||
|
|
|
||||||
|
| Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('QUEUE_DRIVER', 'sync'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection information for each server that
|
||||||
|
| is used by your application. A default configuration has been added
|
||||||
|
| for each back-end shipped with Laravel. You are free to add more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sync' => [
|
||||||
|
'driver' => 'sync',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'table' => 'jobs',
|
||||||
|
'queue' => 'default',
|
||||||
|
'expire' => 60,
|
||||||
|
],
|
||||||
|
|
||||||
|
'beanstalkd' => [
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'queue' => 'default',
|
||||||
|
'ttr' => 60,
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqs' => [
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => 'your-public-key',
|
||||||
|
'secret' => 'your-secret-key',
|
||||||
|
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
|
||||||
|
'queue' => 'your-queue-name',
|
||||||
|
'region' => 'us-east-1',
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => 'default',
|
||||||
|
'queue' => 'default',
|
||||||
|
'expire' => 60,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control which database and table are used to store the jobs that
|
||||||
|
| have failed. You may change them to any database / table you wish.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => [
|
||||||
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
'table' => 'failed_jobs',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
38
config/services.php
Normal file
38
config/services.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
|
||||||
|
| default location for this type of information, allowing packages
|
||||||
|
| to have a conventional place to find your various credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailgun' => [
|
||||||
|
'domain' => env('MAILGUN_DOMAIN'),
|
||||||
|
'secret' => env('MAILGUN_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('SES_KEY'),
|
||||||
|
'secret' => env('SES_SECRET'),
|
||||||
|
'region' => 'us-east-1',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sparkpost' => [
|
||||||
|
'secret' => env('SPARKPOST_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'stripe' => [
|
||||||
|
'model' => App\User::class,
|
||||||
|
'key' => env('STRIPE_KEY'),
|
||||||
|
'secret' => env('STRIPE_SECRET'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
166
config/session.php
Normal file
166
config/session.php
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default session "driver" that will be used on
|
||||||
|
| requests. By default, we will use the lightweight native driver but
|
||||||
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'file'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle before it expires. If you want them
|
||||||
|
| to immediately expire on the browser closing, set that option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => 120,
|
||||||
|
|
||||||
|
'expire_on_close' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to easily specify that all of your session data
|
||||||
|
| should be encrypted before it is stored. All encryption will be run
|
||||||
|
| automatically by Laravel and you can use the Session like normal.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encrypt' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the native session driver, we need a location where session
|
||||||
|
| files may be stored. A default has been set for you but a different
|
||||||
|
| location may be specified. This is only needed for file sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path('framework/sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table we
|
||||||
|
| should use to manage the sessions. Of course, a sensible default is
|
||||||
|
| provided for you; however, you are free to change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the cookie used to identify a session
|
||||||
|
| instance by ID. The name specified here will get used every time a
|
||||||
|
| new session cookie is created by the framework for every driver.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => 'laravel_session',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application but you are free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => '/',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the domain of the cookie used to identify a session
|
||||||
|
| in your application. This will determine which domains the cookie is
|
||||||
|
| available to in your application. A sensible default has been set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you if it can not be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. You are free to modify this option if needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => true,
|
||||||
|
|
||||||
|
];
|
||||||
23
config/site_config.php
Normal file
23
config/site_config.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Defined Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is a set of variables that are made specific to this application
|
||||||
|
| that are better placed here rather than in .env file.
|
||||||
|
| Use config('your_key') to get the values.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 'company_name' => env('COMPANY_NAME','Acme Inc'),
|
||||||
|
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
|
||||||
|
|
||||||
|
// 'prod_private_server_ip' => env('35.232.234.8', '35.232.234.8'),
|
||||||
|
'prod_private_server_ip' => env('PRODUCTION_PRIVATE_SERVER'), // local
|
||||||
|
'images_directory' => env('IMAGES_DIRECTORY'),
|
||||||
|
|
||||||
|
];
|
||||||
33
config/view.php
Normal file
33
config/view.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| View Storage Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Most templating systems load templates from disk. Here you may specify
|
||||||
|
| an array of paths that should be checked for your views. Of course
|
||||||
|
| the usual Laravel view path has already been registered for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
realpath(base_path('resources/views')),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Compiled View Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines where all the compiled Blade templates will be
|
||||||
|
| stored for your application. Typically, this is within the storage
|
||||||
|
| directory. However, as usual, you are free to change this value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'compiled' => realpath(storage_path('framework/views')),
|
||||||
|
|
||||||
|
];
|
||||||
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.sqlite
|
||||||
21
database/factories/ModelFactory.php
Normal file
21
database/factories/ModelFactory.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Model Factories
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of your model factories. Model factories give
|
||||||
|
| you a convenient way to create models for testing and seeding your
|
||||||
|
| database. Just tell the factory how a default model should look.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||||
|
return [
|
||||||
|
'name' => $faker->name,
|
||||||
|
'email' => $faker->safeEmail,
|
||||||
|
'password' => bcrypt(str_random(10)),
|
||||||
|
'remember_token' => str_random(10),
|
||||||
|
];
|
||||||
|
});
|
||||||
1
database/migrations/.gitkeep
Normal file
1
database/migrations/.gitkeep
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
34
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
34
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateUsersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('users', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->string('password');
|
||||||
|
$table->rememberToken();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::drop('users');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreatePasswordResetsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('password_resets', function (Blueprint $table) {
|
||||||
|
$table->string('email')->index();
|
||||||
|
$table->string('token')->index();
|
||||||
|
$table->timestamp('created_at');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::drop('password_resets');
|
||||||
|
}
|
||||||
|
}
|
||||||
1
database/seeds/.gitkeep
Normal file
1
database/seeds/.gitkeep
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
16
database/seeds/DatabaseSeeder.php
Normal file
16
database/seeds/DatabaseSeeder.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
// $this->call(UsersTableSeeder::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
16
gulpfile.js
Normal file
16
gulpfile.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
var elixir = require('laravel-elixir');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Elixir Asset Management
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
|
||||||
|
| for your Laravel application. By default, we are compiling the Sass
|
||||||
|
| file for our application, as well as publishing vendor resources.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
elixir(function(mix) {
|
||||||
|
mix.sass('app.scss');
|
||||||
|
});
|
||||||
12
package.json
Normal file
12
package.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"prod": "gulp --production",
|
||||||
|
"dev": "gulp watch"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"gulp": "^3.9.1",
|
||||||
|
"laravel-elixir": "^5.0.0",
|
||||||
|
"bootstrap-sass": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
30
phpunit.xml
Normal file
30
phpunit.xml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="bootstrap/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Application Test Suite">
|
||||||
|
<directory suffix="Test.php">./tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<filter>
|
||||||
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
|
<directory suffix=".php">./app</directory>
|
||||||
|
<exclude>
|
||||||
|
<file>./app/Http/routes.php</file>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
20
public/.htaccess
Normal file
20
public/.htaccess
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||||
|
|
||||||
|
# Handle Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
</IfModule>
|
||||||
2
public/assets/spectrum/.gitignore
vendored
Normal file
2
public/assets/spectrum/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
.DS_Store
|
||||||
7
public/assets/spectrum/.travis.yml
Normal file
7
public/assets/spectrum/.travis.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- 10
|
||||||
|
before_script:
|
||||||
|
- npm install -g grunt-cli
|
||||||
|
script:
|
||||||
|
- grunt travis --verbose
|
||||||
70
public/assets/spectrum/Gruntfile.js
Normal file
70
public/assets/spectrum/Gruntfile.js
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
|
||||||
|
module.exports = function(grunt) {
|
||||||
|
|
||||||
|
grunt.initConfig({
|
||||||
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
|
|
||||||
|
qunit: {
|
||||||
|
all: {
|
||||||
|
options: {
|
||||||
|
urls: ['test/index.html', 'test/loaders.html'],
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
jshint: {
|
||||||
|
options: {
|
||||||
|
sub: true,
|
||||||
|
strict: true,
|
||||||
|
newcap: false,
|
||||||
|
globals: {
|
||||||
|
jQuery: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
with_overrides: {
|
||||||
|
options: {
|
||||||
|
strict: false
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
src: ['i18n/*.js', 'test/tests.js']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
all: ['spectrum.js']
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
uglify: {
|
||||||
|
options: {
|
||||||
|
},
|
||||||
|
dist: {
|
||||||
|
files: {
|
||||||
|
'build/spectrum-min.js': ['spectrum.js']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
|
|
||||||
|
|
||||||
|
// Testing tasks
|
||||||
|
grunt.registerTask('test', ['jshint', 'qunit']);
|
||||||
|
|
||||||
|
// Travis CI task.
|
||||||
|
grunt.registerTask('travis', 'test');
|
||||||
|
|
||||||
|
// Default task.
|
||||||
|
grunt.registerTask('default', ['test']);
|
||||||
|
|
||||||
|
//Build Task.
|
||||||
|
grunt.registerTask('build', ['test', 'uglify']);
|
||||||
|
|
||||||
|
};
|
||||||
20
public/assets/spectrum/LICENSE
Normal file
20
public/assets/spectrum/LICENSE
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Copyright (c) Brian Grinstead
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
69
public/assets/spectrum/README.md
Normal file
69
public/assets/spectrum/README.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Spectrum
|
||||||
|
## The No Hassle Colorpicker
|
||||||
|
|
||||||
|
See the demo and docs: http://bgrins.github.io/spectrum.
|
||||||
|
|
||||||
|
I wanted a colorpicker that didn't require images, and that had an API that made sense to me as a developer who has worked with color in a number of applications. I had tried a number of existing plugins, but decided to try and make a smaller, simpler one.
|
||||||
|
|
||||||
|
I started using canvas, then switched to CSS gradients, since it turned out to be easier to manage, and provided better cross browser support.
|
||||||
|
|
||||||
|
### Basic Usage
|
||||||
|
|
||||||
|
Head over to the [docs](http://bgrins.github.io/spectrum) for more information. There is a visual demo of the different options hosted at: http://bgrins.github.io/spectrum.
|
||||||
|
|
||||||
|
<script src='spectrum.js'></script>
|
||||||
|
<link rel='stylesheet' href='spectrum.css' />
|
||||||
|
|
||||||
|
<input id='colorpicker' />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$("#colorpicker").spectrum({
|
||||||
|
color: "#f00"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
### npm
|
||||||
|
|
||||||
|
Spectrum is registered as package with npm. It can be installed with:
|
||||||
|
|
||||||
|
npm install spectrum-colorpicker
|
||||||
|
|
||||||
|
### Bower
|
||||||
|
|
||||||
|
Spectrum is registered as a package with [Bower](http://bower.io/), so it can be pulled down using:
|
||||||
|
|
||||||
|
bower install spectrum
|
||||||
|
|
||||||
|
### Using spectrum with a CDN
|
||||||
|
|
||||||
|
CDN provided by [cdnjs](https://cdnjs.com/libraries/spectrum)
|
||||||
|
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.1/spectrum.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.1/spectrum.min.css">
|
||||||
|
|
||||||
|
### Continuous Integration
|
||||||
|
|
||||||
|
[](http://travis-ci.org/bgrins/spectrum)
|
||||||
|
|
||||||
|
Visit https://travis-ci.org/bgrins/spectrum to view the status of the automated tests.
|
||||||
|
|
||||||
|
### Building Spectrum Locally
|
||||||
|
|
||||||
|
If you'd like to download and use the plugin, head over to http://bgrins.github.io/spectrum/ and click the 'Download Zip' button.
|
||||||
|
|
||||||
|
If you'd like to run the development version, spectrum uses Grunt to automate the testing, linting, and building. Head over to http://gruntjs.com/getting-started for more information. First, clone the repository, then run:
|
||||||
|
|
||||||
|
npm install -g grunt-cli
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# runs jshint and the unit test suite
|
||||||
|
grunt
|
||||||
|
|
||||||
|
# runs jshint, the unit test suite, and builds a minified version of the file.
|
||||||
|
grunt build
|
||||||
|
|
||||||
|
### Internationalization
|
||||||
|
|
||||||
|
If you are able to translate the text in the UI to another language, please do! You can do so by either [filing a pull request](https://github.com/bgrins/spectrum/pulls) or [opening an issue]( https://github.com/bgrins/spectrum/issues) with the translation. The existing languages are listed at: https://github.com/bgrins/spectrum/tree/master/i18n.
|
||||||
|
|
||||||
|
For an example, see the [Dutch translation](i18n/jquery.spectrum-nl.js).
|
||||||
22
public/assets/spectrum/bower.json
Normal file
22
public/assets/spectrum/bower.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "spectrum",
|
||||||
|
"version": "1.8.1",
|
||||||
|
"main": ["./spectrum.css", "./spectrum.js"],
|
||||||
|
"docs": "http://bgrins.github.com/spectrum",
|
||||||
|
"homepage": "http://bgrins.github.com/spectrum",
|
||||||
|
"demo": "http://jsfiddle.net/bgrins/ctkY3/",
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": ">=1.7.2"
|
||||||
|
},
|
||||||
|
"ignore": [
|
||||||
|
".gitignore",
|
||||||
|
".travis.yml",
|
||||||
|
"build/",
|
||||||
|
"docs/",
|
||||||
|
"example/",
|
||||||
|
"Gruntfile.js",
|
||||||
|
"LICENSE",
|
||||||
|
"README.md",
|
||||||
|
"test/"
|
||||||
|
]
|
||||||
|
}
|
||||||
1
public/assets/spectrum/build/.gitignore
vendored
Normal file
1
public/assets/spectrum/build/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
spectrum-min.js
|
||||||
6158
public/assets/spectrum/docs/bootstrap.css
vendored
Normal file
6158
public/assets/spectrum/docs/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
273
public/assets/spectrum/docs/docs.css
vendored
Normal file
273
public/assets/spectrum/docs/docs.css
vendored
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
|
||||||
|
/* Styles for the demo page only. See spectrum.css for the actual colorpicker styles */
|
||||||
|
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
|
||||||
|
body { margin: 0; font-size: 14px; line-height: 1.5; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVQIW2OMqXogyYADMIIkl7QpPMcmP+gkAYLGGdeobP2EAAAAAElFTkSuQmCC); }
|
||||||
|
body, button, input, select, textarea { font-family: Droid Sans, Tahoma, sans-serif; color: #222; }
|
||||||
|
body p { font-family: Verdana; font-size: 12px; color: #333; line-height: 1.8; }
|
||||||
|
h1 { font-family: Lucida Sans, Droid Sans, Verdana; font-size: 30px; line-height: inherit; margin: 0; padding:0; font-weight: lighter; position:fixed; top: 3px; left: 10px; }
|
||||||
|
h1 a { text-decoration: none; color: #334 !important; }
|
||||||
|
h1 a:hover { text-decoration: underline; color: #336 !important; }
|
||||||
|
#header { background: #eee; background: #eee; height: 60px; line-height: 60px; padding: 3px 10px;}
|
||||||
|
|
||||||
|
#goals { margin:0 auto; padding:0; width: 98%; }
|
||||||
|
.goal { float: left; width: 29%; margin:1%; padding:1%; color: #335; min-height: 300px; background: #eee; border-radius: 10px; font-family: Verdana; }
|
||||||
|
#docs .goal h4 { text-align: center; margin: .5em 0; font-weight: lighter; text-decoration: underline; font-family: Verdana; }
|
||||||
|
a { color: #00e; }
|
||||||
|
a:visited { color: #009; }
|
||||||
|
a:hover { color: #06e; }
|
||||||
|
a:focus { outline: thin dotted; }
|
||||||
|
#header h2 { float:left; margin:0; padding:0; margin-left: 180px; font-size: 14px; line-height: inherit; font-weight: normal; font-family: Georgia;}
|
||||||
|
#header h2 em {background: #444; color: #fff; font-style: normal; padding: 5px; border-radius: 5px; border: solid 1px #999; box-shadow: 0 0 4px #333;}
|
||||||
|
#links { float:right; text-align: right; }
|
||||||
|
#pick2-details { font: monospace; }
|
||||||
|
#switch-current { float: left; position:relative; display:none;}
|
||||||
|
/*#switch-current .spectrum-container { position: fixed; top:60px; left: 10px; }*/
|
||||||
|
#docs-content { margin-left: 190px; padding: 10px 30px; border:solid 10px #ecc; border-right:none;border-bottom:none; padding-bottom: 20px; background: #fff; background: rgba(255, 255, 255, .6); }
|
||||||
|
.footer { padding-top: 50px; }
|
||||||
|
.switch-current-output { display:none; margin:3px auto; width: 200px; text-align: center; }
|
||||||
|
.type { padding-left: 4px; font-size: .8em; font-weight: bold;}
|
||||||
|
.description, .example {
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #888;
|
||||||
|
background: white;
|
||||||
|
position:relative;
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
|
#docs { }
|
||||||
|
#docs ul { margin-left: 25px; padding-left:10px; }
|
||||||
|
#docs li { list-style: square; margin-left: 6px; }
|
||||||
|
#docs p { margin: 0; padding:0; padding-top:4px; }
|
||||||
|
#docs pre { position:relative; }
|
||||||
|
#docs h2 { margin: 30px -25px; border-bottom: solid 1px; }
|
||||||
|
#docs h3 { padding: 10px 15px; margin: 10px auto; margin-top: 40px; border: solid 3px #aaa;
|
||||||
|
box-shadow: 0 3px 5px #333; }
|
||||||
|
#docs h3.point { box-shadow: none; margin-left: -30px; margin-right: -30px; border: solid 1px #999; border-left: none; border-right:none;}
|
||||||
|
#code-heading { font-size: 24px; text-align: center; margin: 6px 0; }
|
||||||
|
#docs-content { color: #222; }
|
||||||
|
#docs-content.dark { color: #ddd; }
|
||||||
|
code { font-weight: bold; color: #933; }
|
||||||
|
.note { float:right; background: #eee; padding: 4px; font-size: 11px; border: solid 1px #bbb; border-radius: 4px;}
|
||||||
|
.option-content .note { float:none; position:absolute; right: 0; top: -40px;}
|
||||||
|
.option-content { position:relative; background: #ededed;
|
||||||
|
border: solid 2px #aaa; border-top: none;
|
||||||
|
padding: 12px; width: 95%; margin: 0 auto;
|
||||||
|
margin-top: -10px; padding-top: 20px;
|
||||||
|
box-shadow: 0 0 10px #ccc; border-radius: 0 0 5px 5px;
|
||||||
|
}
|
||||||
|
.em-label { padding:4px; margin-left: 10px; display:inline-block; vertical-align: top; margin-top: 3px; }
|
||||||
|
.hide { display:none; }
|
||||||
|
.clearfix:before, .clearfix:after { content: ""; display: table; }
|
||||||
|
.clearfix:after { clear: both; }
|
||||||
|
.clearfix { *zoom: 1; }
|
||||||
|
|
||||||
|
input[type="text"] { height: auto; }
|
||||||
|
.label {
|
||||||
|
padding: 1px 4px 2px;
|
||||||
|
font-size: 10.998px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 13px;
|
||||||
|
color: #ffffff;
|
||||||
|
vertical-align: middle;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
background-color: #999999;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.label:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.label-important {
|
||||||
|
background-color: #b94a48;
|
||||||
|
}
|
||||||
|
.label-important:hover {
|
||||||
|
background-color: #953b39;
|
||||||
|
}
|
||||||
|
.label-result {
|
||||||
|
background-color: #3a87ad;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.example .label-result {
|
||||||
|
position:absolute;
|
||||||
|
top: -10px;
|
||||||
|
left: 5px;
|
||||||
|
}
|
||||||
|
.label-warning {
|
||||||
|
background-color: #f89406;
|
||||||
|
}
|
||||||
|
.label-warning:hover {
|
||||||
|
background-color: #c67605;
|
||||||
|
}
|
||||||
|
.label-success {
|
||||||
|
background-color: #468847;
|
||||||
|
}
|
||||||
|
.label-success:hover {
|
||||||
|
background-color: #356635;
|
||||||
|
}
|
||||||
|
.label-info {
|
||||||
|
background-color: #3a87ad;
|
||||||
|
}
|
||||||
|
.label-info:hover {
|
||||||
|
background-color: #2d6987;
|
||||||
|
}
|
||||||
|
.label-inverse {
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
||||||
|
.label-inverse:hover {
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
}
|
||||||
|
.alert {
|
||||||
|
padding: 8px 35px 8px 14px;
|
||||||
|
margin: 10px 0;
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
border: 1px solid #fbeed5;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #c09853;
|
||||||
|
}
|
||||||
|
.alert-heading {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
.alert .close {
|
||||||
|
position: relative;
|
||||||
|
top: -2px;
|
||||||
|
right: -21px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
.alert-success {
|
||||||
|
background-color: #dff0d8;
|
||||||
|
border-color: #d6e9c6;
|
||||||
|
color: #468847;
|
||||||
|
}
|
||||||
|
.alert-danger,
|
||||||
|
.alert-error {
|
||||||
|
background-color: #f2dede;
|
||||||
|
border-color: #eed3d7;
|
||||||
|
color: #b94a48;
|
||||||
|
}
|
||||||
|
.alert-info {
|
||||||
|
background-color: #d9edf7;
|
||||||
|
border-color: #bce8f1;
|
||||||
|
color: #3a87ad;
|
||||||
|
}
|
||||||
|
.alert-block {
|
||||||
|
padding-top: 14px;
|
||||||
|
padding-bottom: 14px;
|
||||||
|
}
|
||||||
|
.alert-block > p,
|
||||||
|
.alert-block > ul {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.alert-block p + p {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.btn-primary:visited {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* prettify */
|
||||||
|
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888; background: white;}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||||
|
|
||||||
|
/* desert scheme ported from vim to google prettify */
|
||||||
|
.dark pre { display: block; background-color: #333; border:1px solid #888; padding:2px; }
|
||||||
|
.dark pre .nocode { background-color: none; color: #000 }
|
||||||
|
.dark pre .str { color: #ffa0a0 } /* string - pink */
|
||||||
|
.dark pre .kwd { color: #f0e68c; font-weight: bold }
|
||||||
|
.dark pre .com { color: #87ceeb } /* comment - skyblue */
|
||||||
|
.dark pre .typ { color: #98fb98 } /* type - lightgreen */
|
||||||
|
.dark pre .lit { color: #cd5c5c } /* literal - darkred */
|
||||||
|
.dark pre .pun { color: #fff } /* punctuation */
|
||||||
|
.dark pre .pln { color: #fff } /* plaintext */
|
||||||
|
.dark pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */
|
||||||
|
.dark pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */
|
||||||
|
.dark pre .atv { color: #ffa0a0 } /* attribute value - pink */
|
||||||
|
.dark pre .dec { color: #98fb98 } /* decimal - lightgreen */
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.dark pre { background-color: none }
|
||||||
|
.dark pre .str, .dark code .str { color: #060 }
|
||||||
|
.dark pre .kwd, .dark code .kwd { color: #006; font-weight: bold }
|
||||||
|
.dark pre .com, .dark code .com { color: #600; font-style: italic }
|
||||||
|
.dark pre .typ, .dark code .typ { color: #404; font-weight: bold }
|
||||||
|
.dark pre .lit, .dark code .lit { color: #044 }
|
||||||
|
.dark pre .pun, .dark code .pun { color: #440 }
|
||||||
|
.dark pre .pln, .dark code .pln { color: #000 }
|
||||||
|
.dark pre .tag, .dark code .tag { color: #006; font-weight: bold }
|
||||||
|
.dark pre .atn, .dark code .atn { color: #404 }
|
||||||
|
.dark pre .atv, .dark code .atv { color: #060 }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* http://projects.jga.me/toc/ */
|
||||||
|
#toc {
|
||||||
|
top: 76px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0px;
|
||||||
|
position: fixed;
|
||||||
|
font-size: 11px;
|
||||||
|
width: 180px;
|
||||||
|
color: #222;
|
||||||
|
overflow-y: auto;
|
||||||
|
font-family: Georgia;
|
||||||
|
}
|
||||||
|
#toc-slider {
|
||||||
|
position:fixed;
|
||||||
|
top:0;
|
||||||
|
bottom:0;
|
||||||
|
left: 0;
|
||||||
|
width: 170px;
|
||||||
|
background: #eee;
|
||||||
|
line-height: 60px;
|
||||||
|
padding-top: 3px;
|
||||||
|
padding-left: 10px;
|
||||||
|
border-right: solid 10px #cce;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-device-width: 480px) {
|
||||||
|
|
||||||
|
#toc, #toc-slider, h1 {
|
||||||
|
position:absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#toc ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc li {
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc a {
|
||||||
|
color: #225;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc .toc-h2 {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc .toc-h3 {
|
||||||
|
padding-left: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toc .toc-active {
|
||||||
|
background: #CCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.full-spectrum {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.full-spectrum .sp-palette {
|
||||||
|
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
493
public/assets/spectrum/docs/docs.js
Normal file
493
public/assets/spectrum/docs/docs.js
Normal file
@@ -0,0 +1,493 @@
|
|||||||
|
|
||||||
|
function updateBorders(color) {
|
||||||
|
var hexColor = "transparent";
|
||||||
|
if(color) {
|
||||||
|
hexColor = color.toHexString();
|
||||||
|
}
|
||||||
|
$("#docs-content").css("border-color", hexColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
$("#full").spectrum({
|
||||||
|
allowEmpty:true,
|
||||||
|
color: "#ECC",
|
||||||
|
showInput: true,
|
||||||
|
containerClassName: "full-spectrum",
|
||||||
|
showInitial: true,
|
||||||
|
showPalette: true,
|
||||||
|
showSelectionPalette: true,
|
||||||
|
showAlpha: true,
|
||||||
|
maxPaletteSize: 10,
|
||||||
|
preferredFormat: "hex",
|
||||||
|
localStorageKey: "spectrum.demo",
|
||||||
|
move: function (color) {
|
||||||
|
updateBorders(color);
|
||||||
|
},
|
||||||
|
show: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function (color) {
|
||||||
|
updateBorders(color);
|
||||||
|
},
|
||||||
|
|
||||||
|
palette: [
|
||||||
|
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", /*"rgb(153, 153, 153)","rgb(183, 183, 183)",*/
|
||||||
|
"rgb(204, 204, 204)", "rgb(217, 217, 217)", /*"rgb(239, 239, 239)", "rgb(243, 243, 243)",*/ "rgb(255, 255, 255)"],
|
||||||
|
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||||
|
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||||
|
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||||
|
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||||
|
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||||
|
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||||
|
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||||
|
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||||
|
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||||
|
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||||
|
/*"rgb(133, 32, 12)", "rgb(153, 0, 0)", "rgb(180, 95, 6)", "rgb(191, 144, 0)", "rgb(56, 118, 29)",
|
||||||
|
"rgb(19, 79, 92)", "rgb(17, 85, 204)", "rgb(11, 83, 148)", "rgb(53, 28, 117)", "rgb(116, 27, 71)",*/
|
||||||
|
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||||
|
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#hideButtons").spectrum({
|
||||||
|
showButtons: false,
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var isDisabled = true;
|
||||||
|
$("#toggle-disabled").click(function() {
|
||||||
|
if (isDisabled) {
|
||||||
|
$("#disabled").spectrum("enable");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#disabled").spectrum("disable");
|
||||||
|
}
|
||||||
|
isDisabled = !isDisabled;
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input:disabled").spectrum({
|
||||||
|
|
||||||
|
});
|
||||||
|
$("#disabled").spectrum({
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#pick1").spectrum({
|
||||||
|
flat: true,
|
||||||
|
change: function(color) {
|
||||||
|
var hsv = color.toHsv();
|
||||||
|
var rgb = color.toRgbString();
|
||||||
|
var hex = color.toHexString();
|
||||||
|
//console.log("callback",color.toHslString(), color.toHsl().h, color.toHsl().s, color.toHsl().l)
|
||||||
|
$("#docs-content").css({
|
||||||
|
'background-color': color.toRgbString()
|
||||||
|
}).toggleClass("dark", hsv.v < .5);
|
||||||
|
$("#switch-current-rgb").text(rgb);
|
||||||
|
$("#switch-current-hex").text(hex);
|
||||||
|
},
|
||||||
|
show: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: ['white', '#306', '#c5c88d', '#ac5c5c', '#344660']
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#collapsed").spectrum({
|
||||||
|
color: "#dd3333",
|
||||||
|
change: updateBorders,
|
||||||
|
show: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#flat").spectrum({
|
||||||
|
flat: true,
|
||||||
|
showInput: true,
|
||||||
|
move: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#flatClearable").spectrum({
|
||||||
|
flat: true,
|
||||||
|
move: updateBorders,
|
||||||
|
change: updateBorders,
|
||||||
|
allowEmpty:true,
|
||||||
|
showInput: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showInput").spectrum({
|
||||||
|
color: "#dd33dd",
|
||||||
|
showInput: true,
|
||||||
|
change: updateBorders,
|
||||||
|
show: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showAlpha").spectrum({
|
||||||
|
color: "rgba(255, 128, 0, .5)",
|
||||||
|
showAlpha: true,
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showAlphaWithInput").spectrum({
|
||||||
|
color: "rgba(255, 128, 0, .5)",
|
||||||
|
showAlpha: true,
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [
|
||||||
|
["rgba(255, 128, 0, .9)", "rgba(255, 128, 0, .5)"],
|
||||||
|
["red", "green", "blue"],
|
||||||
|
["hsla(25, 50, 75, .5)", "rgba(100, .5, .5, .8)"]
|
||||||
|
],
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showAlphaWithInputAndEmpty").spectrum({
|
||||||
|
color: "rgba(255, 128, 0, .5)",
|
||||||
|
allowEmpty:true,
|
||||||
|
showAlpha: true,
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [
|
||||||
|
["rgba(255, 128, 0, .9)", "rgba(255, 128, 0, .5)"],
|
||||||
|
["red", "green", "blue"],
|
||||||
|
["hsla(25, 50, 75, .5)", "rgba(100, .5, .5, .8)"]
|
||||||
|
],
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showInputWithClear").spectrum({
|
||||||
|
allowEmpty:true,
|
||||||
|
color: "",
|
||||||
|
showInput: true,
|
||||||
|
change: updateBorders,
|
||||||
|
show: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#openWithLink").spectrum({
|
||||||
|
color: "#dd3333",
|
||||||
|
change: updateBorders,
|
||||||
|
show: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#className").spectrum({
|
||||||
|
className: 'awesome'
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#replacerClassName").spectrum({
|
||||||
|
replacerClassName: 'awesome'
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#containerClassName").spectrum({
|
||||||
|
containerClassName: 'awesome'
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showPalette").spectrum({
|
||||||
|
showPalette: true,
|
||||||
|
palette: [
|
||||||
|
['black', 'white', 'blanchedalmond'],
|
||||||
|
['rgb(255, 128, 0);', 'hsv 100 70 50', 'lightyellow']
|
||||||
|
],
|
||||||
|
hide: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Hidden: " + c.toHexString());
|
||||||
|
},
|
||||||
|
change: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Change called: " + c.toHexString());
|
||||||
|
},
|
||||||
|
move: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Move called: " + c.toHexString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var textPalette = ["rgb(255, 255, 255)", "rgb(204, 204, 204)", "rgb(192, 192, 192)", "rgb(153, 153, 153)", "rgb(102, 102, 102)", "rgb(51, 51, 51)", "rgb(0, 0, 0)", "rgb(255, 204, 204)", "rgb(255, 102, 102)", "rgb(255, 0, 0)", "rgb(204, 0, 0)", "rgb(153, 0, 0)", "rgb(102, 0, 0)", "rgb(51, 0, 0)", "rgb(255, 204, 153)", "rgb(255, 153, 102)", "rgb(255, 153, 0)", "rgb(255, 102, 0)", "rgb(204, 102, 0)", "rgb(153, 51, 0)", "rgb(102, 51, 0)", "rgb(255, 255, 153)", "rgb(255, 255, 102)", "rgb(255, 204, 102)", "rgb(255, 204, 51)", "rgb(204, 153, 51)", "rgb(153, 102, 51)", "rgb(102, 51, 51)", "rgb(255, 255, 204)", "rgb(255, 255, 51)", "rgb(255, 255, 0)", "rgb(255, 204, 0)", "rgb(153, 153, 0)", "rgb(102, 102, 0)", "rgb(51, 51, 0)", "rgb(153, 255, 153)", "rgb(102, 255, 153)", "rgb(51, 255, 51)", "rgb(51, 204, 0)", "rgb(0, 153, 0)", "rgb(0, 102, 0)", "rgb(0, 51, 0)", "rgb(153, 255, 255)", "rgb(51, 255, 255)", "rgb(102, 204, 204)", "rgb(0, 204, 204)", "rgb(51, 153, 153)", "rgb(51, 102, 102)", "rgb(0, 51, 51)", "rgb(204, 255, 255)", "rgb(102, 255, 255)", "rgb(51, 204, 255)", "rgb(51, 102, 255)", "rgb(51, 51, 255)", "rgb(0, 0, 153)", "rgb(0, 0, 102)", "rgb(204, 204, 255)", "rgb(153, 153, 255)", "rgb(102, 102, 204)", "rgb(102, 51, 255)", "rgb(102, 0, 204)", "rgb(51, 51, 153)", "rgb(51, 0, 153)", "rgb(255, 204, 255)", "rgb(255, 153, 255)", "rgb(204, 102, 204)", "rgb(204, 51, 204)", "rgb(153, 51, 153)", "rgb(102, 51, 102)", "rgb(51, 0, 51)"];
|
||||||
|
|
||||||
|
$("#showPaletteOnly").spectrum({
|
||||||
|
color: 'blanchedalmond',
|
||||||
|
showPaletteOnly: true,
|
||||||
|
showPalette:true,
|
||||||
|
palette: [
|
||||||
|
['black', 'white', 'blanchedalmond',
|
||||||
|
'rgb(255, 128, 0);', 'hsv 100 70 50'],
|
||||||
|
['red', 'yellow', 'green', 'blue', 'violet']
|
||||||
|
],
|
||||||
|
change: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Change called: " + c.toHexString());
|
||||||
|
},
|
||||||
|
move: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Move called: " + c.toHexString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#hideAfterPaletteSelect").spectrum({
|
||||||
|
showPaletteOnly: true,
|
||||||
|
showPalette:true,
|
||||||
|
hideAfterPaletteSelect:true,
|
||||||
|
color: 'blanchedalmond',
|
||||||
|
palette: [
|
||||||
|
['black', 'white', 'blanchedalmond',
|
||||||
|
'rgb(255, 128, 0);', 'hsv 100 70 50'],
|
||||||
|
['red', 'yellow', 'green', 'blue', 'violet']
|
||||||
|
],
|
||||||
|
change: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Change called: " + c.toHexString());
|
||||||
|
},
|
||||||
|
move: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Move called: " + c.toHexString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#togglePaletteOnly").spectrum({
|
||||||
|
color: 'blanchedalmond',
|
||||||
|
showPaletteOnly: true,
|
||||||
|
togglePaletteOnly: true,
|
||||||
|
showPalette:true,
|
||||||
|
palette: [
|
||||||
|
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
||||||
|
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
||||||
|
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
||||||
|
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
||||||
|
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
||||||
|
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
||||||
|
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
||||||
|
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#clickoutFiresChange").spectrum({
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#clickoutDoesntFireChange").spectrum({
|
||||||
|
change: updateBorders,
|
||||||
|
clickoutFiresChange: false
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showInitial").spectrum({
|
||||||
|
showInitial: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showInputAndInitial").spectrum({
|
||||||
|
showInitial: true,
|
||||||
|
showInput: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#showInputInitialClear").spectrum({
|
||||||
|
allowEmpty:true,
|
||||||
|
showInitial: true,
|
||||||
|
showInput: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#changeOnMove").spectrum({
|
||||||
|
move: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Move called: " + c.toHexString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#changeOnMoveNo").spectrum({
|
||||||
|
showInput: true,
|
||||||
|
change: function(c) {
|
||||||
|
var label = $("[data-label-for=" + this.id + "]");
|
||||||
|
label.text("Change called: " + c.toHexString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function prettyTime() {
|
||||||
|
var date = new Date();
|
||||||
|
|
||||||
|
return date.toLocaleTimeString();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#eventshow").spectrum({
|
||||||
|
show: function(c) {
|
||||||
|
var label = $("#eventshowLabel");
|
||||||
|
label.text("show called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#eventhide").spectrum({
|
||||||
|
hide: function(c) {
|
||||||
|
var label = $("#eventhideLabel");
|
||||||
|
label.text("hide called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#eventdragstart").spectrum({
|
||||||
|
showAlpha: true
|
||||||
|
}).on("dragstart.spectrum", function(e, c) {
|
||||||
|
var label = $("#eventdragstartLabel");
|
||||||
|
label.text("dragstart called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#eventdragstop").spectrum({
|
||||||
|
showAlpha: true
|
||||||
|
}).on("dragstop.spectrum", function(e, c) {
|
||||||
|
var label = $("#eventdragstopLabel");
|
||||||
|
label.text("dragstop called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(".basic").spectrum({ change: updateBorders });
|
||||||
|
$(".override").spectrum({
|
||||||
|
color: "yellow",
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".startEmpty").spectrum({
|
||||||
|
allowEmpty:true,
|
||||||
|
change: updateBorders});
|
||||||
|
|
||||||
|
$("#beforeShow").spectrum({
|
||||||
|
beforeShow: function() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#custom").spectrum({
|
||||||
|
color: "#f00"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#buttonText").spectrum({
|
||||||
|
allowEmpty:true,
|
||||||
|
chooseText: "Alright",
|
||||||
|
cancelText: "No way"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#showSelectionPalette").spectrum({
|
||||||
|
showPalette: true,
|
||||||
|
showSelectionPalette: true, // true by default
|
||||||
|
palette: [ ]
|
||||||
|
});
|
||||||
|
$("#showSelectionPaletteStorage").spectrum({
|
||||||
|
showPalette: true,
|
||||||
|
localStorageKey: "spectrum.homepage", // Any picker with the same string will share selection
|
||||||
|
showSelectionPalette: true,
|
||||||
|
palette: [ ]
|
||||||
|
});
|
||||||
|
$("#showSelectionPaletteStorage2").spectrum({
|
||||||
|
showPalette: true,
|
||||||
|
localStorageKey: "spectrum.homepage", // Any picker with the same string will share selection
|
||||||
|
showSelectionPalette: true,
|
||||||
|
palette: [ ]
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#selectionPalette").spectrum({
|
||||||
|
showPalette: true,
|
||||||
|
palette: [ ],
|
||||||
|
showSelectionPalette: true, // true by default
|
||||||
|
selectionPalette: ["red", "green", "blue"]
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#maxSelectionSize").spectrum({
|
||||||
|
showPalette: true,
|
||||||
|
palette: [ ],
|
||||||
|
showSelectionPalette: true, // true by default
|
||||||
|
selectionPalette: ["red", "green", "blue"],
|
||||||
|
maxSelectionSize: 2
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#preferredHex").spectrum({
|
||||||
|
preferredFormat: "hex",
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||||
|
});
|
||||||
|
$("#preferredHex3").spectrum({
|
||||||
|
preferredFormat: "hex3",
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||||
|
});
|
||||||
|
$("#preferredHsl").spectrum({
|
||||||
|
preferredFormat: "hsl",
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||||
|
});
|
||||||
|
$("#preferredRgb").spectrum({
|
||||||
|
preferredFormat: "rgb",
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||||
|
});
|
||||||
|
$("#preferredName").spectrum({
|
||||||
|
preferredFormat: "name",
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||||
|
});
|
||||||
|
$("#preferredNone").spectrum({
|
||||||
|
showInput: true,
|
||||||
|
showPalette: true,
|
||||||
|
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#triggerSet").spectrum({
|
||||||
|
change: updateBorders
|
||||||
|
});
|
||||||
|
|
||||||
|
// Show the original input to demonstrate the value changing when calling `set`
|
||||||
|
$("#triggerSet").show();
|
||||||
|
|
||||||
|
$("#btnEnterAColor").click(function() {
|
||||||
|
$("#triggerSet").spectrum("set", $("#enterAColor").val());
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toggle").spectrum();
|
||||||
|
$("#btn-toggle").click(function() {
|
||||||
|
$("#toggle").spectrum("toggle");
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#toc').toc({
|
||||||
|
'selectors': 'h2,h3', //elements to use as headings
|
||||||
|
'container': '#docs', //element to find all selectors in
|
||||||
|
'smoothScrolling': true, //enable or disable smooth scrolling on click
|
||||||
|
'prefix': 'toc', //prefix for anchor tags and class names
|
||||||
|
'highlightOnScroll': true, //add class to heading that is currently in focus
|
||||||
|
'highlightOffset': 100, //offset to trigger the next headline
|
||||||
|
'anchorName': function(i, heading, prefix) { //custom function for anchor name
|
||||||
|
return heading.id || prefix+i;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
prettyPrint();
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
9597
public/assets/spectrum/docs/jquery-1.9.1.js
vendored
Normal file
9597
public/assets/spectrum/docs/jquery-1.9.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9111
public/assets/spectrum/docs/jquery-2.1.0.js
vendored
Normal file
9111
public/assets/spectrum/docs/jquery-2.1.0.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10872
public/assets/spectrum/docs/jquery-3.5.1.js
vendored
Normal file
10872
public/assets/spectrum/docs/jquery-3.5.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
28
public/assets/spectrum/docs/prettify.js
Normal file
28
public/assets/spectrum/docs/prettify.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||||
|
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
||||||
|
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||||
|
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||||
|
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||||
|
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||||
|
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||||
|
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
||||||
|
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||||
|
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
||||||
|
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
||||||
|
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
||||||
|
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
||||||
|
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||||
|
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||||
|
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||||
|
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||||
|
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||||
|
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||||
|
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
||||||
|
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
||||||
|
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
||||||
|
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
||||||
|
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
||||||
|
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
||||||
|
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
||||||
|
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||||
|
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
||||||
109
public/assets/spectrum/docs/toc.js
Normal file
109
public/assets/spectrum/docs/toc.js
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
!function($) {
|
||||||
|
$.fn.toc = function(options) {
|
||||||
|
var self = this;
|
||||||
|
var opts = $.extend({}, jQuery.fn.toc.defaults, options);
|
||||||
|
|
||||||
|
var container = $(opts.container);
|
||||||
|
var headings = $(opts.selectors, container);
|
||||||
|
var headingOffsets = [];
|
||||||
|
var activeClassName = opts.prefix+'-active';
|
||||||
|
|
||||||
|
var findScrollableElement = function(els) {
|
||||||
|
for (var i = 0, argLength = arguments.length; i < argLength; i++) {
|
||||||
|
var el = arguments[i],
|
||||||
|
$scrollElement = $(el);
|
||||||
|
if ($scrollElement.scrollTop() > 0) {
|
||||||
|
return $scrollElement;
|
||||||
|
} else {
|
||||||
|
$scrollElement.scrollTop(1);
|
||||||
|
var isScrollable = $scrollElement.scrollTop() > 0;
|
||||||
|
$scrollElement.scrollTop(0);
|
||||||
|
if (isScrollable) {
|
||||||
|
return $scrollElement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
var scrollable = findScrollableElement(opts.container, 'body', 'html');
|
||||||
|
|
||||||
|
var scrollTo = function(e) {
|
||||||
|
if (opts.smoothScrolling) {
|
||||||
|
e.preventDefault();
|
||||||
|
var elScrollTo = $(e.target).attr('href');
|
||||||
|
var $el = $(elScrollTo);
|
||||||
|
|
||||||
|
scrollable.animate({ scrollTop: $el.offset().top }, 400, 'swing', function() {
|
||||||
|
location.hash = elScrollTo;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$('li', self).removeClass(activeClassName);
|
||||||
|
$(e.target).parent().addClass(activeClassName);
|
||||||
|
};
|
||||||
|
|
||||||
|
//highlight on scroll
|
||||||
|
var timeout;
|
||||||
|
var highlightOnScroll = function(e) {
|
||||||
|
if (timeout) {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
}
|
||||||
|
timeout = setTimeout(function() {
|
||||||
|
var top = $(window).scrollTop();
|
||||||
|
for (var i = 0, c = headingOffsets.length; i < c; i++) {
|
||||||
|
if (headingOffsets[i] >= top) {
|
||||||
|
$('li', self).removeClass(activeClassName);
|
||||||
|
$('li:eq('+(i-1)+')', self).addClass(activeClassName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 50);
|
||||||
|
};
|
||||||
|
if (opts.highlightOnScroll) {
|
||||||
|
$(window).bind('scroll', highlightOnScroll);
|
||||||
|
highlightOnScroll();
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.each(function() {
|
||||||
|
//build TOC
|
||||||
|
var ul = $('<ul/>');
|
||||||
|
headings.each(function(i, heading) {
|
||||||
|
var $h = $(heading);
|
||||||
|
headingOffsets.push($h.offset().top - opts.highlightOffset);
|
||||||
|
|
||||||
|
//add anchor
|
||||||
|
var anchorName = opts.anchorName(i, heading, opts.prefix);
|
||||||
|
var anchor = $([]);
|
||||||
|
if (!document.getElementById(anchorName)) {
|
||||||
|
anchor = $('<span/>').attr('id', opts.anchorName(i, heading, opts.prefix)).insertBefore($h);
|
||||||
|
}
|
||||||
|
//build TOC item
|
||||||
|
var a = $('<a/>')
|
||||||
|
.text($h.text())
|
||||||
|
.attr('href', '#' + anchorName)
|
||||||
|
.bind('click', scrollTo);
|
||||||
|
|
||||||
|
var li = $('<li/>')
|
||||||
|
.addClass(opts.prefix+'-'+$h[0].tagName.toLowerCase())
|
||||||
|
.append(a);
|
||||||
|
|
||||||
|
ul.append(li);
|
||||||
|
});
|
||||||
|
var el = $(this);
|
||||||
|
el.html(ul);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
jQuery.fn.toc.defaults = {
|
||||||
|
container: 'body',
|
||||||
|
selectors: 'h1,h2,h3',
|
||||||
|
smoothScrolling: true,
|
||||||
|
prefix: '',
|
||||||
|
highlightOnScroll: true,
|
||||||
|
highlightOffset: 100,
|
||||||
|
anchorName: function(i, heading, prefix) {
|
||||||
|
return prefix+i;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}(jQuery);
|
||||||
254
public/assets/spectrum/example/example.js
Normal file
254
public/assets/spectrum/example/example.js
Normal file
@@ -0,0 +1,254 @@
|
|||||||
|
|
||||||
|
$(function() {
|
||||||
|
|
||||||
|
var colorpickerInput = $("#full");
|
||||||
|
|
||||||
|
|
||||||
|
function toggleButtonState() {
|
||||||
|
var options = colorpickerInput.spectrum("option");
|
||||||
|
$(".toggleBtn").each(function() {
|
||||||
|
$(this).toggleClass("active", !!options[$(this).data("rule")]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on("click", ".toggleBtn", function() {
|
||||||
|
var option = $(this).data("rule");
|
||||||
|
var existing = colorpickerInput.spectrum("option", option);
|
||||||
|
|
||||||
|
colorpickerInput.spectrum("option", option, !existing);
|
||||||
|
toggleButtonState();
|
||||||
|
});
|
||||||
|
|
||||||
|
colorpickerInput.spectrum({
|
||||||
|
color: "#ECC",
|
||||||
|
flat: true,
|
||||||
|
showInput: true,
|
||||||
|
className: "full-spectrum",
|
||||||
|
showInitial: true,
|
||||||
|
showPalette: true,
|
||||||
|
showSelectionPalette: true,
|
||||||
|
maxPaletteSize: 10,
|
||||||
|
preferredFormat: "hex",
|
||||||
|
localStorageKey: "spectrum.example",
|
||||||
|
move: function (color) {
|
||||||
|
},
|
||||||
|
show: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function (color) {
|
||||||
|
},
|
||||||
|
|
||||||
|
palette: [
|
||||||
|
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", /*"rgb(153, 153, 153)","rgb(183, 183, 183)",*/
|
||||||
|
"rgb(204, 204, 204)", "rgb(217, 217, 217)", /*"rgb(239, 239, 239)", "rgb(243, 243, 243)",*/ "rgb(255, 255, 255)"],
|
||||||
|
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||||
|
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||||
|
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||||
|
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||||
|
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||||
|
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||||
|
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||||
|
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||||
|
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||||
|
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||||
|
/*"rgb(133, 32, 12)", "rgb(153, 0, 0)", "rgb(180, 95, 6)", "rgb(191, 144, 0)", "rgb(56, 118, 29)",
|
||||||
|
"rgb(19, 79, 92)", "rgb(17, 85, 204)", "rgb(11, 83, 148)", "rgb(53, 28, 117)", "rgb(116, 27, 71)",*/
|
||||||
|
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||||
|
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#size").change(function() {
|
||||||
|
var size = Math.min(500, Math.max(50, $(this).val()));
|
||||||
|
$(".sp-picker-container").width(size);
|
||||||
|
|
||||||
|
colorpickerInput.spectrum("reflow");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#huesize").change(function() {
|
||||||
|
var size = Math.min(80, Math.max(5, $(this).val()));
|
||||||
|
|
||||||
|
$(".sp-hue").css("left", (103 - size) + "%");
|
||||||
|
$(".sp-color").css("right", size + "%");
|
||||||
|
$(".sp-fill").css("padding-top", (100 - size) + "%");
|
||||||
|
|
||||||
|
colorpickerInput.spectrum("reflow");
|
||||||
|
});
|
||||||
|
|
||||||
|
toggleButtonState();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var palettes = { };
|
||||||
|
|
||||||
|
|
||||||
|
palettes.newGmail = [["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]];
|
||||||
|
|
||||||
|
palettes.default = [
|
||||||
|
["#000000", "#434343", "#666666", "#999999", "#b7b7b7", "#cccccc", "#d9d9d9", "#efefef", "#f3f3f3", "#ffffff"],
|
||||||
|
["#980000", "#ff0000", "#ff9900", "#ffff00", "#00ff00", "#00ffff", "#4a86e8", "#0000ff", "#9900ff", "#ff00ff"],
|
||||||
|
["#e6b8af", "#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d9ead3", "#c9daf8", "#cfe2f3", "#d9d2e9", "#ead1dc"],
|
||||||
|
["#dd7e6b", "#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#a4c2f4", "#9fc5e8", "#b4a7d6", "#d5a6bd"],
|
||||||
|
["#cc4125", "#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6d9eeb", "#6fa8dc", "#8e7cc3", "#c27ba0"],
|
||||||
|
["#a61c00", "#cc0000", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3c78d8", "#3d85c6", "#674ea7", "#a64d79"],
|
||||||
|
["#85200c", "#990000", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#1155cc", "#0b5394", "#351c75", "#741b47"],
|
||||||
|
["#5b0f00", "#660000", "#783f04", "#7f6000", "#274e13", "#0c343d", "#1c4587", "#073763", "#20124d", "#4c1130"]
|
||||||
|
];
|
||||||
|
|
||||||
|
palettes.snagit = [
|
||||||
|
["#ffffff", "#000000", "#c00000", "#f79646", "#f5f445", "#7fd13b", "#4bacc6", "#1f497d", "#8064a2", "#ff0000"],
|
||||||
|
["#f2f2f2", "#7f7f7f", "#f8d1d3", "#fdeada", "#fafdd7", "#e5f5d7", "#dbeef3", "#c6d9f0", "#e5e0ec", "#ffcc00"],
|
||||||
|
["#d7d7d7", "#595959", "#f2a3a7", "#fbd5b5", "#fbfaae", "#cbecb0", "#b7dde8", "#8db3e2", "#ccc1d9", "#ffff00"],
|
||||||
|
["#bebebe", "#414141", "#eb757b", "#fac08f", "#eef98e", "#b2e389", "#92cddc", "#548dd4", "#b2a2c7", "#00ff00"],
|
||||||
|
["#a3a3a3", "#2a2a2a", "#a3171e", "#e36c09", "#dede07", "#5ea226", "#31859b", "#17365d", "#5f497a", "#0000ff"],
|
||||||
|
["#7e7e7e", "#141414", "#6d0f14", "#974806", "#c0c00d", "#3f6c19", "#205867", "#0f243e", "#3f3151", "#9900ff"]
|
||||||
|
];
|
||||||
|
|
||||||
|
palettes.newton = [
|
||||||
|
|
||||||
|
"#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
palettes.aol = [
|
||||||
|
|
||||||
|
["#ffffff", "#fff7de", "#ffffce", "#ffffbd", "#ffffd6", "#b5ff84", "#c6efde", "#efffff", "#efe7f7", "#dea5d6"],
|
||||||
|
["#ded6c6", "#ffc6bd", "#ffe7b5", "#ffe7a5", "#efef7b", "#adf77b", "#5abd9c", "#a5d6f7", "#8494e7", "#ef7be7"],
|
||||||
|
["#cec6b5", "#e78473", "#efad52", "#f7b500", "#efef9c", "#a5ff00", "#7bd6bd", "#a5d6de", "#8c5ae7", "#de6bce"],
|
||||||
|
["#8c8473", "#ef0018", "#ef4210", "#f79400", "#ffff00", "#63d600", "#a5c684", "#5a63d6", "#7b52c6", "#c642ce"],
|
||||||
|
["#736b63", "#d60039", "#d67310", "#f7844a", "#f7de00", "#429400", "#4a944a", "#4200ff", "#9c00de", "#a500c6"],
|
||||||
|
["#39524a", "#b51821", "#944a08", "#a55229", "#8c8c00", "#318c00", "#429484", "#3100c6", "#523984", "#940084"],
|
||||||
|
["#000000", "#940008", "#840008", "#ad2929", "#637321", "#296b00", "#29006b", "#21007b", "#52007b", "#84007b"]
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
palettes.oldGmail = [
|
||||||
|
["#ffffff", "#cecece", "#c6c6c6", "#9c9c9c", "#636363", "#313131", "#000000"],
|
||||||
|
["#ffcece", "#ff6363", "#ff0000", "#ce0000", "#9c0000", "#630000", "#310000"],
|
||||||
|
["#ffce9c", "#ff9c63", "#ff9c00", "#ff6300", "#ce6300", "#9c3100", "#633100"],
|
||||||
|
["#ffff9c", "#ffff63", "#ffce63", "#ffce31", "#ce9c31", "#9c6331", "#633131"],
|
||||||
|
["#ffffce", "#ffff31", "#ffff00", "#ffce00", "#9c9c00", "#636300", "#313100"],
|
||||||
|
["#9cff9c", "#63ff9c", "#31ff31", "#31ce00", "#009c00", "#006300", "#003100"],
|
||||||
|
["#9cffff", "#31ffff", "#63cece", "#00cece", "#319c9c", "#316363", "#003131"],
|
||||||
|
["#ceffff", "#63ffff", "#31ceff", "#3163ff", "#3131ff", "#00009c", "#000063"],
|
||||||
|
["#ceceff", "#9c9cff", "#6363ce", "#6331ff", "#6300ce", "#31319c", "#31009c"],
|
||||||
|
["#ffceff", "#ff9cff", "#ce63ce", "#ce31ce", "#9c319c", "#633163", "#310031"]
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
palettes.hotmail = [
|
||||||
|
["#ffffff", "#000000", "#efefe7", "#184a7b", "#4a84bd", "#c6524a", "#9cbd5a", "#8463a5", "#4aadc6", "#f79442"],
|
||||||
|
["#f7f7f7", "#7b7b7b", "#dedec6", "#c6def7", "#dee7f7", "#f7dede", "#eff7de", "#e7e7ef", "#deeff7", "#ffefde"],
|
||||||
|
["#dedede", "#5a5a5a", "#c6bd94", "#8cb5e7", "#bdcee7", "#e7bdb5", "#d6e7bd", "#cec6de", "#b5deef", "#ffd6b5"],
|
||||||
|
["#bdbdbd", "#393939", "#948c52", "#528cd6", "#94b5d6", "#de9494", "#c6d69c", "#b5a5c6", "#94cede", "#ffc68c"],
|
||||||
|
["#a5a5a5", "#212121", "#4a4229", "#10315a", "#316394", "#943131", "#739439", "#5a4a7b", "#31849c", "#e76b08"],
|
||||||
|
["#848484", "#080808", "#181810", "#082139", "#214263", "#632121", "#4a6329", "#393152", "#215a63", "#944a00"],
|
||||||
|
["#c60000", "#ff0000", "#ffc600", "#ffff00", "#94d652", "#00b552", "#00b5f7", "#0073c6", "#002163", "#7331a5"],
|
||||||
|
|
||||||
|
];
|
||||||
|
palettes.yahoo = [
|
||||||
|
|
||||||
|
["#000000", "#111111", "#2d2d2d", "#434343", "#5b5b5b", "#737373", "#8b8b8b", "#a2a2a2", "#b9b9b9", "#d0d0d0", "#e6e6e6", "#ffffff"],
|
||||||
|
["#7f7f00", "#bfbf00", "#ffff00", "#ffff40", "#ffff80", "#ffffbf", "#525330", "#898a49", "#aea945", "#c3be71", "#e0dcaa", "#fcfae1"],
|
||||||
|
["#407f00", "#60bf00", "#80ff00", "#a0ff40", "#c0ff80", "#dfffbf", "#3b5738", "#668f5a", "#7f9757", "#8a9b55", "#b7c296", "#e6ebd5"],
|
||||||
|
["#007f40", "#00bf60", "#00ff80", "#40ffa0", "#80ffc0", "#bfffdf", "#033d21", "#438059", "#7fa37c", "#8dae94", "#acc6b5", "#ddebe2"],
|
||||||
|
["#007f7f", "#00bfbf", "#00ffff", "#40ffff", "#80ffff", "#bfffff", "#033d3d", "#347d7e", "#609a9f", "#96bdc4", "#b5d1d7", "#e2f1f4"],
|
||||||
|
["#00407f", "#0060bf", "#0080ff", "#40a0ff", "#80c0ff", "#bfdfff", "#1b2c48", "#385376", "#57708f", "#7792ac", "#a8bed1", "#deebf6"],
|
||||||
|
["#00007f", "#0000bf", "#0000ff", "#4040ff", "#8080ff", "#bfbfff", "#212143", "#373e68", "#444f75", "#585e82", "#8687a4", "#d2d1e1"],
|
||||||
|
["#40007f", "#6000bf", "#8000ff", "#a040ff", "#c080ff", "#dfbfff", "#302449", "#54466f", "#655a7f", "#726284", "#9e8fa9", "#dcd1df"],
|
||||||
|
["#7f007f", "#bf00bf", "#ff00ff", "#ff40ff", "#ff80ff", "#ffbfff", "#4a234a", "#794a72", "#936386", "#9d7292", "#c0a0b6", "#ecdae5"],
|
||||||
|
["#7f003f", "#bf005f", "#ff007f", "#ff409f", "#ff80bf", "#ffbfdf", "#451528", "#823857", "#a94a76", "#bc6f95", "#d8a5bb", "#f7dde9"],
|
||||||
|
["#800000", "#c00000", "#ff0000", "#ff4040", "#ff8080", "#ffc0c0", "#441415", "#82393c", "#aa4d4e", "#bc6e6e", "#d8a3a4", "#f8dddd"],
|
||||||
|
["#7f3f00", "#bf5f00", "#ff7f00", "#ff9f40", "#ffbf80", "#ffdfbf", "#482c1b", "#855a40", "#b27c51", "#c49b71", "#e1c4a8", "#fdeee0"]
|
||||||
|
|
||||||
|
];
|
||||||
|
palettes.sixteen = [
|
||||||
|
["#000000", "#000084", "#0000ff", "#840000"],
|
||||||
|
["#840084", "#008200", "#ff0000", "#008284"],
|
||||||
|
["#ff00ff", "#848200", "#848284", "#00ff00"],
|
||||||
|
["#ffa600", "#00ffff", "#c6c3c6", "#ffff00"],
|
||||||
|
["#ffffff"]
|
||||||
|
];
|
||||||
|
|
||||||
|
palettes.websafe = [
|
||||||
|
["#000", "#300", "#600", "#900", "#c00", "#f00"],
|
||||||
|
["#003", "#303", "#603", "#903", "#c03", "#f03"],
|
||||||
|
["#006", "#306", "#606", "#906", "#c06", "#f06"],
|
||||||
|
["#009", "#309", "#609", "#909", "#c09", "#f09"],
|
||||||
|
["#00c", "#30c", "#60c", "#90c", "#c0c", "#f0c"],
|
||||||
|
["#00f", "#30f", "#60f", "#90f", "#c0f", "#f0f"],
|
||||||
|
["#030", "#330", "#630", "#930", "#c30", "#f30"],
|
||||||
|
["#033", "#333", "#633", "#933", "#c33", "#f33"],
|
||||||
|
["#036", "#336", "#636", "#936", "#c36", "#f36"],
|
||||||
|
["#039", "#339", "#639", "#939", "#c39", "#f39"],
|
||||||
|
["#03c", "#33c", "#63c", "#93c", "#c3c", "#f3c"],
|
||||||
|
["#03f", "#33f", "#63f", "#93f", "#c3f", "#f3f"],
|
||||||
|
["#060", "#360", "#660", "#960", "#c60", "#f60"],
|
||||||
|
["#063", "#363", "#663", "#963", "#c63", "#f63"],
|
||||||
|
["#066", "#366", "#666", "#966", "#c66", "#f66"],
|
||||||
|
["#069", "#369", "#669", "#969", "#c69", "#f69"],
|
||||||
|
["#06c", "#36c", "#66c", "#96c", "#c6c", "#f6c"],
|
||||||
|
["#06f", "#36f", "#66f", "#96f", "#c6f", "#f6f"],
|
||||||
|
["#090", "#390", "#690", "#990", "#c90", "#f90"],
|
||||||
|
["#093", "#393", "#693", "#993", "#c93", "#f93"],
|
||||||
|
["#096", "#396", "#696", "#996", "#c96", "#f96"],
|
||||||
|
["#099", "#399", "#699", "#999", "#c99", "#f99"],
|
||||||
|
["#09c", "#39c", "#69c", "#99c", "#c9c", "#f9c"],
|
||||||
|
["#09f", "#39f", "#69f", "#99f", "#c9f", "#f9f"],
|
||||||
|
["#0c0", "#3c0", "#6c0", "#9c0", "#cc0", "#fc0"],
|
||||||
|
["#0c3", "#3c3", "#6c3", "#9c3", "#cc3", "#fc3"],
|
||||||
|
["#0c6", "#3c6", "#6c6", "#9c6", "#cc6", "#fc6"],
|
||||||
|
["#0c9", "#3c9", "#6c9", "#9c9", "#cc9", "#fc9"],
|
||||||
|
["#0cc", "#3cc", "#6cc", "#9cc", "#ccc", "#fcc"],
|
||||||
|
["#0cf", "#3cf", "#6cf", "#9cf", "#ccf", "#fcf"],
|
||||||
|
["#0f0", "#3f0", "#6f0", "#9f0", "#cf0", "#ff0"],
|
||||||
|
["#0f3", "#3f3", "#6f3", "#9f3", "#cf3", "#ff3"],
|
||||||
|
["#0f6", "#3f6", "#6f6", "#9f6", "#cf6", "#ff6"],
|
||||||
|
["#0f9", "#3f9", "#6f9", "#9f9", "#cf9", "#ff9"],
|
||||||
|
["#0fc", "#3fc", "#6fc", "#9fc", "#cfc", "#ffc"],
|
||||||
|
["#0ff", "#3ff", "#6ff", "#9ff", "#cff", "#fff"]
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
palettes.named = [
|
||||||
|
["White", "Ivory", "Snow", "LightYellow", "MintCream", "Azure", "FloralWhite", "Honeydew", "GhostWhite", "Seashell", "Cornsilk", "AliceBlue", "LemonChiffon", "LightCyan"],
|
||||||
|
["OldLace", "LightGoldenrodYellow", "LavenderBlush", "WhiteSmoke", "Beige", "Linen", "PapayaWhip", "BlanchedAlmond", "AntiqueWhite", "MistyRose", "Bisque", "Lavender", "Moccasin", "PaleGoldenrod"],
|
||||||
|
["NavajoWhite", "Yellow", "PeachPuff", "Wheat", "Khaki", "Gainsboro", "PaleTurquoise", "Pink", "Aquamarine", "LightGray", "PowderBlue", "PaleGreen", "GreenYellow", "LightPink"],
|
||||||
|
["LightBlue", "Gold", "Thistle", "LightGreen", "LightSteelBlue", "Silver", "LightSkyBlue", "BurlyWood", "SkyBlue", "Chartreuse", "Plum", "LawnGreen", "Tan", "LightSalmon"],
|
||||||
|
["SandyBrown", "Cyan", "Aqua", "DarkKhaki", "Violet", "Turquoise", "Orange", "YellowGreen", "DarkSalmon", "MediumAquamarine", "DarkSeaGreen", "DarkGray", "MediumTurquoise", "Goldenrod"],
|
||||||
|
["MediumSpringGreen", "SpringGreen", "Salmon", "LightCoral", "Coral", "DarkOrange", "HotPink", "RosyBrown", "Orchid", "Lime", "PaleVioletRed", "Peru", "DarkTurquoise", "CornflowerBlue"],
|
||||||
|
["Tomato", "DeepSkyBlue", "LimeGreen", "CadetBlue", "MediumSeaGreen", "DarkGoldenrod", "MediumPurple", "LightSeaGreen", "LightSlateGray", "MediumOrchid", "Gray", "Chocolate", "IndianRed", "SlateGray"],
|
||||||
|
["MediumSlateBlue", "DodgerBlue", "OliveDrab", "SteelBlue", "OrangeRed", "Olive", "SlateBlue", "RoyalBlue", "Magenta", "Fuchsia", "SeaGreen", "DimGray", "DeepPink", "Sienna"],
|
||||||
|
["DarkOrchid", "DarkCyan", "ForestGreen", "DarkOliveGreen", "BlueViolet", "Teal", "MediumVioletRed", "Crimson", "SaddleBrown", "Brown", "FireBrick", "Red", "Green", "DarkSlateBlue"],
|
||||||
|
["DarkSlateGray", "DarkViolet", "DarkGreen", "DarkMagenta", "Purple", "DarkRed", "Maroon", "Indigo", "MidnightBlue", "Blue", "MediumBlue", "DarkBlue", "Navy", "Black"]
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
for (var i in palettes) {
|
||||||
|
$("<h3 />").text(i).appendTo("#palettes");
|
||||||
|
$("<input />").appendTo("#palettes").spectrum({
|
||||||
|
flat: true,
|
||||||
|
showInput: true,
|
||||||
|
className: i,
|
||||||
|
preferredFormat: "rgb",
|
||||||
|
showPalette: true,
|
||||||
|
showPaletteOnly: true,
|
||||||
|
palette: palettes[i]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$("#langdemo").spectrum({
|
||||||
|
flat: false,
|
||||||
|
showInput: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
149
public/assets/spectrum/example/index.html
Normal file
149
public/assets/spectrum/example/index.html
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Spectrum - The No Hassle jQuery Colorpicker</title>
|
||||||
|
|
||||||
|
<meta name="description" content="Spectrum is a JavaScript colorpicker plugin using the jQuery framework. It is highly customizable, but can also be used as a simple input type=color polyfill">
|
||||||
|
<meta name="author" content="Brian Grinstead and Spectrum contributors">
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="../spectrum.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../docs/bootstrap.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../docs/docs.css">
|
||||||
|
<script type="text/javascript" src="../docs/jquery-1.9.1.js"></script>
|
||||||
|
<script type="text/javascript" src="../spectrum.js"></script>
|
||||||
|
<script type="text/javascript" src="../i18n/jquery.spectrum-fi.js"></script>
|
||||||
|
<script type='text/javascript' src='example.js'></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.example-container {
|
||||||
|
margin-top: 10px;
|
||||||
|
text-align: center;
|
||||||
|
background: #333;
|
||||||
|
background: linear-gradient(to bottom, #eee, #ccc);
|
||||||
|
padding: 3px;
|
||||||
|
padding-top: 0;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.example-controls {
|
||||||
|
background: #999;
|
||||||
|
margin: 0 -3px;
|
||||||
|
padding: 10px 0;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
#palettes .sp-palette {
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.newGmail .sp-palette-row-0, .newGmail .sp-palette-row-1 {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newGmail .sp-palette .sp-thumb-el {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin: 1px 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newGmail .sp-palette .sp-thumb-el:hover, .newGmail .sp-palette .sp-thumb-el.sp-thumb-active {
|
||||||
|
border-color: #000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='header'>
|
||||||
|
<h1><a href='http://bgrins.github.com/spectrum'>Spectrum</a></h1> <h2><em>The No Hassle jQuery Colorpicker</em></h2>
|
||||||
|
<div id='links'>
|
||||||
|
View the <a href='http://github.com/bgrins/spectrum'>Source code</a>.
|
||||||
|
Spectrum is a project by <a href='http://twitter.com/bgrins'>@bgrins</a>.
|
||||||
|
</div>
|
||||||
|
<br style='clear:both;' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h2>Spectrum Colorpicker Crazy Configurator</h2>
|
||||||
|
<div class='alert'>NOTE: this page is currently in development. Please refer to the <a href='http://github.com/bgrins/spectrum'>Home Page</a> for demos and documentation instead.
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
Spectrum can be customized to show and hide different portions of the colorpicker. Try clicking some of the buttons below to see how it can change.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="example-container">
|
||||||
|
<div class="example-controls">
|
||||||
|
<div class='btn-group'>
|
||||||
|
<button class='btn toggleBtn' data-rule='showPalette'>Show Palette</button>
|
||||||
|
<button class='btn toggleBtn' data-rule='showInput'>Show Input</button>
|
||||||
|
<button class='btn toggleBtn' data-rule='showInitial'>Show Initial</button>
|
||||||
|
<button class='btn toggleBtn' data-rule='showAlpha'>Show Alpha</button>
|
||||||
|
<button class='btn toggleBtn' data-rule='showPaletteOnly'>Show Palette Only</button>
|
||||||
|
<button class='btn toggleBtn' data-rule='togglePaletteOnly'>Show Picker Toggle Button</button>
|
||||||
|
<button class='btn toggleBtn' data-rule='showButtons'>Show Buttons</button>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
<label>Draggable Size <input type='range' value='172' id='size' max='500' min='50' /></label>
|
||||||
|
|
||||||
|
<label>Hue Size <input type='range' value='16' id='huesize' max='90' min='5' /></label>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input id="full">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h2>Spectrum Colorpicker Localization</h2>
|
||||||
|
<div class='alert'>
|
||||||
|
<p>
|
||||||
|
This page has loaded the German localization. Here is a list of all <a href='https://github.com/bgrins/spectrum/tree/master/i18n'>spectrum localizations</a>. <strong>Please help expand our localizations</strong> if you know a language that isn't represented! You can copy and paste one of the files, and update the text for 'cancel' and 'choose', then submit a pull request at: <a href'https://github.com/bgrins/spectrum'>https://github.com/bgrins/spectrum</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input id="langdemo" />
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h2>Spectrum Colorpicker Sample Palettes</h2>
|
||||||
|
<div class='alert'>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
NOTE: these palettes are also a work in progress. Ideally the site will eventually allow you to choose between a few options and download them.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The <code>newGmail</code> palette below is an example of customizing the palette size and layout with CSS.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="palettes" class="example-container">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="../docs/prettify.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var _gaq = _gaq || [];
|
||||||
|
_gaq.push(['_setAccount', 'UA-8259845-4']);
|
||||||
|
_gaq.push(['_trackPageview']);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||||
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
|
})();
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
93
public/assets/spectrum/example/testcase.html
Normal file
93
public/assets/spectrum/example/testcase.html
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Spectrum - The No Hassle jQuery Colorpicker</title>
|
||||||
|
|
||||||
|
<meta name="description" content="Spectrum is a JavaScript colorpicker plugin using the jQuery framework. It is highly customizable, but can also be used as a simple input type=color polyfill">
|
||||||
|
<meta name="author" content="Brian Grinstead and Spectrum contributors">
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="../spectrum.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../docs/bootstrap.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../docs/docs.css">
|
||||||
|
<script type="text/javascript" src="../docs/jquery-1.9.1.js"></script>
|
||||||
|
<script type="text/javascript" src="../spectrum.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='header'>
|
||||||
|
<h1><a href='http://bgrins.github.com/spectrum'>Spectrum</a></h1> <h2><em>The No Hassle jQuery Colorpicker</em></h2>
|
||||||
|
<div id='links'>
|
||||||
|
View the <a href='http://github.com/bgrins/spectrum'>Source code</a>.
|
||||||
|
Spectrum is a project by <a href='http://twitter.com/bgrins'>@bgrins</a>.
|
||||||
|
</div>
|
||||||
|
<br style='clear:both;' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2>Basic Test Case</h2>
|
||||||
|
<p>Also available as a <a href="http://jsfiddle.net/bgrins/ctkY3/">jsfiddle</a></p>
|
||||||
|
|
||||||
|
<button id="update">Update palette</button>
|
||||||
|
<h2>Full Example</h2>
|
||||||
|
<input type='text' id="full"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$("#update").click (function() {
|
||||||
|
console.log($("#full").spectrum("option", "palette"));
|
||||||
|
$("#full").spectrum("option", "palette", [
|
||||||
|
["red", "green", "blue"]
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#full").spectrum({
|
||||||
|
color: "#ECC",
|
||||||
|
flat: true,
|
||||||
|
showInput: true,
|
||||||
|
className: "full-spectrum",
|
||||||
|
showInitial: true,
|
||||||
|
showPalette: true,
|
||||||
|
showSelectionPalette: true,
|
||||||
|
maxPaletteSize: 10,
|
||||||
|
preferredFormat: "hex",
|
||||||
|
localStorageKey: "spectrum.demo",
|
||||||
|
move: function (color) {
|
||||||
|
|
||||||
|
},
|
||||||
|
show: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
hide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
change: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
palette: [
|
||||||
|
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)",
|
||||||
|
"rgb(204, 204, 204)", "rgb(217, 217, 217)","rgb(255, 255, 255)"],
|
||||||
|
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||||
|
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||||
|
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||||
|
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||||
|
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||||
|
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||||
|
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||||
|
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||||
|
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||||
|
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||||
|
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||||
|
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
17
public/assets/spectrum/i18n/jquery.spectrum-ar.js
Normal file
17
public/assets/spectrum/i18n/jquery.spectrum-ar.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Arabic (ar) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["ar"] = {
|
||||||
|
cancelText: "إلغاء",
|
||||||
|
chooseText: "إختار",
|
||||||
|
clearText: "إرجاع الألوان على ما كانت",
|
||||||
|
noColorSelectedText: "لم تختار أي لون",
|
||||||
|
togglePaletteMoreText: "أكثر",
|
||||||
|
togglePaletteLessText: "أقل"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-ca.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-ca.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Catalan (ca) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["ca"] = {
|
||||||
|
cancelText: "Cancel·lar",
|
||||||
|
chooseText: "Escollir",
|
||||||
|
clearText: "Esborrar color seleccionat",
|
||||||
|
noColorSelectedText: "Cap color seleccionat",
|
||||||
|
togglePaletteMoreText: "Més",
|
||||||
|
togglePaletteLessText: "Menys"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
19
public/assets/spectrum/i18n/jquery.spectrum-cs.js
Normal file
19
public/assets/spectrum/i18n/jquery.spectrum-cs.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Czech (cs) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
// author localization cs Pavel Laupe Dvorak pavel@pavel-dvorak.cz
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["cs"] = {
|
||||||
|
cancelText: "zrušit",
|
||||||
|
chooseText: "vybrat",
|
||||||
|
clearText: "Resetovat výměr barev",
|
||||||
|
noColorSelectedText: "Žádná barva nebyla vybrána",
|
||||||
|
togglePaletteMoreText: "více",
|
||||||
|
togglePaletteLessText: "méně"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-de.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-de.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// German (de) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["de"] = {
|
||||||
|
cancelText: "Abbrechen",
|
||||||
|
chooseText: "Wählen",
|
||||||
|
clearText: "Farbauswahl zurücksetzen",
|
||||||
|
noColorSelectedText: "Keine Farbe ausgewählt",
|
||||||
|
togglePaletteMoreText: "Mehr",
|
||||||
|
togglePaletteLessText: "Weniger"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
14
public/assets/spectrum/i18n/jquery.spectrum-dk.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-dk.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Danish (dk) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["dk"] = {
|
||||||
|
cancelText: "annuller",
|
||||||
|
chooseText: "Vælg"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-es.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-es.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Spanish (es) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["es"] = {
|
||||||
|
cancelText: "Cancelar",
|
||||||
|
chooseText: "Elegir",
|
||||||
|
clearText: "Borrar color seleccionado",
|
||||||
|
noColorSelectedText: "Ningún color seleccionado",
|
||||||
|
togglePaletteMoreText: "Más",
|
||||||
|
togglePaletteLessText: "Menos"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-fa.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-fa.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Persian (fa) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["fa"] = {
|
||||||
|
cancelText: "لغو",
|
||||||
|
chooseText: "انتخاب",
|
||||||
|
clearText: "تنظیم مجدد رنگ",
|
||||||
|
noColorSelectedText: "هیچ رنگی انتخاب نشده است!",
|
||||||
|
togglePaletteMoreText: "بیشتر",
|
||||||
|
togglePaletteLessText: "کمتر"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
14
public/assets/spectrum/i18n/jquery.spectrum-fi.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-fi.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Finnish (fi) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["fi"] = {
|
||||||
|
cancelText: "Kumoa",
|
||||||
|
chooseText: "Valitse"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-fr.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-fr.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// French (fr) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["fr"] = {
|
||||||
|
cancelText: "Annuler",
|
||||||
|
chooseText: "Valider",
|
||||||
|
clearText: "Effacer couleur sélectionnée",
|
||||||
|
noColorSelectedText: "Aucune couleur sélectionnée",
|
||||||
|
togglePaletteMoreText: "Plus",
|
||||||
|
togglePaletteLessText: "Moins"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-gr.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-gr.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Greek (gr) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["gr"] = {
|
||||||
|
cancelText: "Ακύρωση",
|
||||||
|
chooseText: "Επιλογή",
|
||||||
|
clearText: "Καθαρισμός επιλεγμένου χρώματος",
|
||||||
|
noColorSelectedText: "Δεν έχει επιλεχθεί κάποιο χρώμα",
|
||||||
|
togglePaletteMoreText: "Περισσότερα",
|
||||||
|
togglePaletteLessText: "Λιγότερα"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.gr.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-he.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-he.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Hebrew (he) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["he"] = {
|
||||||
|
cancelText: "בטל בחירה",
|
||||||
|
chooseText: "בחר צבע",
|
||||||
|
clearText: "אפס בחירה",
|
||||||
|
noColorSelectedText: "לא נבחר צבע",
|
||||||
|
togglePaletteMoreText: "עוד צבעים",
|
||||||
|
togglePaletteLessText: "פחות צבעים"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-hr.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-hr.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Croatian (hr) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["hr"] = {
|
||||||
|
cancelText: "Odustani",
|
||||||
|
chooseText: "Odaberi",
|
||||||
|
clearText: "Poništi odabir",
|
||||||
|
noColorSelectedText: "Niti jedna boja nije odabrana",
|
||||||
|
togglePaletteMoreText: "Više",
|
||||||
|
togglePaletteLessText: "Manje"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-id.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-id.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Indonesia/Bahasa Indonesia (id) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["id"] = {
|
||||||
|
cancelText: "Batal",
|
||||||
|
chooseText: "Pilih",
|
||||||
|
clearText: "Hapus Pilihan Warna",
|
||||||
|
noColorSelectedText: "Warna Tidak Dipilih",
|
||||||
|
togglePaletteMoreText: "tambah",
|
||||||
|
togglePaletteLessText: "kurangi"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
16
public/assets/spectrum/i18n/jquery.spectrum-it.js
Normal file
16
public/assets/spectrum/i18n/jquery.spectrum-it.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Italian (it) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["it"] = {
|
||||||
|
cancelText: "annulla",
|
||||||
|
chooseText: "scegli",
|
||||||
|
clearText: "Annulla selezione colore",
|
||||||
|
noColorSelectedText: "Nessun colore selezionato"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
14
public/assets/spectrum/i18n/jquery.spectrum-ja.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-ja.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Japanese (ja) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["ja"] = {
|
||||||
|
cancelText: "中止",
|
||||||
|
chooseText: "選択"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-ko.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-ko.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Korean (ko) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["ko"] = {
|
||||||
|
cancelText: "취소",
|
||||||
|
chooseText: "선택",
|
||||||
|
clearText: "선택 초기화",
|
||||||
|
noColorSelectedText: "선택된 색상 없음",
|
||||||
|
togglePaletteMoreText: "더보기",
|
||||||
|
togglePaletteLessText: "줄이기"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-lt.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-lt.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Lithuanian (lt) localization
|
||||||
|
// https://github.com/liesislukas
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["lt"] = {
|
||||||
|
cancelText: "Atšaukti",
|
||||||
|
chooseText: "Pasirinkti",
|
||||||
|
clearText: "Išvalyti pasirinkimą",
|
||||||
|
noColorSelectedText: "Spalva nepasirinkta",
|
||||||
|
togglePaletteMoreText: "Daugiau",
|
||||||
|
togglePaletteLessText: "Mažiau"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
17
public/assets/spectrum/i18n/jquery.spectrum-nl.js
Normal file
17
public/assets/spectrum/i18n/jquery.spectrum-nl.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Dutch (nl-nl) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["nl-nl"] = {
|
||||||
|
cancelText: "Annuleer",
|
||||||
|
chooseText: "Kies",
|
||||||
|
clearText: "Wis kleur selectie",
|
||||||
|
togglePaletteMoreText: 'Meer',
|
||||||
|
togglePaletteLessText: 'Minder'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-pl.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-pl.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Polish (pl) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["pl"] = {
|
||||||
|
cancelText: "Anuluj",
|
||||||
|
chooseText: "Wybierz",
|
||||||
|
clearText: "Usuń wybór koloru",
|
||||||
|
noColorSelectedText: "Nie wybrano koloru",
|
||||||
|
togglePaletteMoreText: "Więcej",
|
||||||
|
togglePaletteLessText: "Mniej"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
18
public/assets/spectrum/i18n/jquery.spectrum-pt-br.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-pt-br.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Spectrum Colorpicker
|
||||||
|
// Brazilian (pt-br) localization
|
||||||
|
// https://github.com/bgrins/spectrum
|
||||||
|
|
||||||
|
(function ( $ ) {
|
||||||
|
|
||||||
|
var localization = $.spectrum.localization["pt-br"] = {
|
||||||
|
cancelText: "Cancelar",
|
||||||
|
chooseText: "Escolher",
|
||||||
|
clearText: "Limpar cor selecionada",
|
||||||
|
noColorSelectedText: "Nenhuma cor selecionada",
|
||||||
|
togglePaletteMoreText: "Mais",
|
||||||
|
togglePaletteLessText: "Menos"
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.fn.spectrum.defaults, localization);
|
||||||
|
|
||||||
|
})( jQuery );
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user