folder support
This commit is contained in:
parent
4e37176436
commit
98b831bc22
32 changed files with 5533 additions and 37 deletions
|
@ -18,8 +18,8 @@ class ItemController extends Controller
|
|||
*/
|
||||
public function dash()
|
||||
{
|
||||
$data['apps'] = Item::pinned()->orderBy('order', 'asc')->get();
|
||||
$data['all_apps'] = Item::all();
|
||||
$data['apps'] = Item::doesntHave('parents')->pinned()->orderBy('order', 'asc')->get();
|
||||
$data['all_apps'] = Item::doesntHave('parents')->get();
|
||||
return view('welcome', $data);
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,8 @@ class ItemController extends Controller
|
|||
{
|
||||
$trash = (bool)$request->input('trash');
|
||||
|
||||
$data['apps'] = Item::orderBy('title', 'asc')->get();
|
||||
$data['trash'] = Item::onlyTrashed()->get();
|
||||
$data['apps'] = Item::ofType('item')->orderBy('title', 'asc')->get();
|
||||
$data['trash'] = Item::ofType('item')->onlyTrashed()->get();
|
||||
if($trash) {
|
||||
return view('items.trash', $data);
|
||||
} else {
|
||||
|
@ -113,7 +113,8 @@ class ItemController extends Controller
|
|||
public function create()
|
||||
{
|
||||
//
|
||||
$data = [];
|
||||
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
|
||||
$data['current_tags'] = [];
|
||||
return view('items.create', $data);
|
||||
|
||||
}
|
||||
|
@ -146,7 +147,9 @@ class ItemController extends Controller
|
|||
|
||||
//die(print_r($request->input('config')));
|
||||
|
||||
Item::create($request->all());
|
||||
$item = Item::create($request->all());
|
||||
|
||||
$item->parents()->sync($request->tags);
|
||||
|
||||
return redirect()->route('dash')
|
||||
->with('success', __('app.alert.success.item_created'));
|
||||
|
@ -172,11 +175,12 @@ class ItemController extends Controller
|
|||
public function edit($id)
|
||||
{
|
||||
// Get the item
|
||||
$item = Item::find($id);
|
||||
$data['item'] = Item::find($id);
|
||||
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
|
||||
$data['current_tags'] = $data['item']->parents;
|
||||
|
||||
// show the edit form and pass the nerd
|
||||
return view('items.edit')
|
||||
->with('item', $item);
|
||||
return view('items.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,7 +209,10 @@ class ItemController extends Controller
|
|||
'description' => $config
|
||||
]);
|
||||
|
||||
Item::find($id)->update($request->all());
|
||||
$item = Item::find($id);
|
||||
$item->update($request->all());
|
||||
|
||||
$item->parents()->sync($request->tags);
|
||||
|
||||
return redirect()->route('dash')
|
||||
->with('success',__('app.alert.success.item_updated'));
|
||||
|
|
189
app/Http/Controllers/TagController.php
Normal file
189
app/Http/Controllers/TagController.php
Normal file
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Item;
|
||||
use DB;
|
||||
|
||||
class TagController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$trash = (bool)$request->input('trash');
|
||||
|
||||
$data['apps'] = Item::ofType('tag')->orderBy('title', 'asc')->get();
|
||||
$data['trash'] = Item::ofType('tag')->onlyTrashed()->get();
|
||||
if($trash) {
|
||||
return view('tags.trash', $data);
|
||||
} else {
|
||||
return view('tags.list', $data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$data = [];
|
||||
return view('tags.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$validatedData = $request->validate([
|
||||
'title' => 'required|max:255',
|
||||
]);
|
||||
|
||||
if($request->hasFile('file')) {
|
||||
$path = $request->file('file')->store('icons');
|
||||
$request->merge([
|
||||
'icon' => $path
|
||||
]);
|
||||
}
|
||||
|
||||
$slug = str_slug($request->title, '-');
|
||||
|
||||
// set item type to tag
|
||||
$request->merge([
|
||||
'type' => '1',
|
||||
'url' => $slug
|
||||
]);
|
||||
//die(print_r($request->all()));
|
||||
Item::create($request->all());
|
||||
|
||||
return redirect()->route('dash')
|
||||
->with('success', __('app.alert.success.tag_created'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($slug)
|
||||
{
|
||||
$item = Item::whereUrl($slug)->first();
|
||||
//print_r($item);
|
||||
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
|
||||
$data['all_apps'] = $item->children;
|
||||
return view('welcome', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
// Get the item
|
||||
$item = Item::find($id);
|
||||
|
||||
// show the edit form and pass the nerd
|
||||
return view('tags.edit')
|
||||
->with('item', $item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$validatedData = $request->validate([
|
||||
'title' => 'required|max:255',
|
||||
]);
|
||||
|
||||
if($request->hasFile('file')) {
|
||||
$path = $request->file('file')->store('icons');
|
||||
$request->merge([
|
||||
'icon' => $path
|
||||
]);
|
||||
}
|
||||
|
||||
$slug = str_slug($request->title, '-');
|
||||
// set item type to tag
|
||||
$request->merge([
|
||||
'url' => $slug
|
||||
]);
|
||||
|
||||
Item::find($id)->update($request->all());
|
||||
|
||||
return redirect()->route('dash')
|
||||
->with('success',__('app.alert.success.tag_updated'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$force = (bool)$request->input('force');
|
||||
if($force) {
|
||||
Item::withTrashed()
|
||||
->where('id', $id)
|
||||
->forceDelete();
|
||||
} else {
|
||||
Item::find($id)->delete();
|
||||
}
|
||||
|
||||
return redirect()->route('tags.index')
|
||||
->with('success',__('app.alert.success.item_deleted'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the specified resource from soft deletion.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function restore($id)
|
||||
{
|
||||
//
|
||||
Item::withTrashed()
|
||||
->where('id', $id)
|
||||
->restore();
|
||||
return redirect()->route('tags.index')
|
||||
->with('success',__('app.alert.success.item_restored'));
|
||||
}
|
||||
|
||||
public function add($tag, $item)
|
||||
{
|
||||
$output = 0;
|
||||
$tag = Item::find($tag);
|
||||
$item = Item::find($item);
|
||||
if($tag && $item) {
|
||||
// only add items, not cats
|
||||
if((int)$item->type === 0) {
|
||||
$tag->children()->attach($item);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
54
app/Item.php
54
app/Item.php
|
@ -13,7 +13,7 @@ class Item extends Model
|
|||
|
||||
//
|
||||
protected $fillable = [
|
||||
'title', 'url', 'colour', 'icon', 'description', 'pinned', 'order'
|
||||
'title', 'url', 'colour', 'icon', 'description', 'pinned', 'order', 'type'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -114,4 +114,56 @@ class Item extends Model
|
|||
return $config;
|
||||
|
||||
}
|
||||
|
||||
public function parents()
|
||||
{
|
||||
return $this->belongsToMany('App\Item', 'item_tag', 'item_id', 'tag_id');
|
||||
}
|
||||
public function children()
|
||||
{
|
||||
return $this->belongsToMany('App\Item', 'item_tag', 'tag_id', 'item_id');
|
||||
}
|
||||
|
||||
public function getLinkAttribute()
|
||||
{
|
||||
if((int)$this->type === 1) {
|
||||
return '/tag/'.$this->url;
|
||||
} else {
|
||||
return $this->url;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDroppableAttribute()
|
||||
{
|
||||
if((int)$this->type === 1) {
|
||||
return ' droppable';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public function getTargetAttribute()
|
||||
{
|
||||
if((int)$this->type === 1) {
|
||||
return '';
|
||||
} else {
|
||||
return ' target="_blank"';
|
||||
}
|
||||
}
|
||||
|
||||
public function scopeOfType($query, $type)
|
||||
{
|
||||
switch($type) {
|
||||
case 'item':
|
||||
$typeid = 0;
|
||||
break;
|
||||
case 'tag':
|
||||
$typeid = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
return $query->where('type', $typeid);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
if(is_file(database_path('app.sqlite'))) {
|
||||
if(Schema::hasTable('settings')) {
|
||||
if($bg_image = Setting::fetch('background_image')) {
|
||||
$alt_bg = ' style="background-image: url('.asset('storage/'.$bg_image).')"';
|
||||
$alt_bg = ' style="background-image: url(/storage/'.$bg_image.')"';
|
||||
}
|
||||
|
||||
// check version to see if an upgrade is needed
|
||||
|
|
3698
css/app.css
vendored
Normal file
3698
css/app.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddColumnsToItemsForGroups extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('items', function (Blueprint $table) {
|
||||
$table->integer('type')->default(0)->index(); // 0 = item, 1 = category
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('items', function (Blueprint $table) {
|
||||
$table->dropColumn(['type']);
|
||||
});
|
||||
}
|
||||
}
|
35
database/migrations/2018_02_16_193703_item_tag.php
Normal file
35
database/migrations/2018_02_16_193703_item_tag.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ItemTag extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('item_tag', function (Blueprint $table) {
|
||||
$table->integer('item_id')->unsigned()->index();
|
||||
$table->foreign('item_id')->references('id')->on('items')->onDelete('cascade');
|
||||
|
||||
$table->integer('tag_id')->unsigned()->index();
|
||||
$table->foreign('tag_id')->references('id')->on('items')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('item_tag');
|
||||
}
|
||||
}
|
3
mix-manifest.json
Normal file
3
mix-manifest.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"/css/app.css": "/css/app.css"
|
||||
}
|
19
package-lock.json
generated
19
package-lock.json
generated
|
@ -115,6 +115,11 @@
|
|||
"repeat-string": "1.6.1"
|
||||
}
|
||||
},
|
||||
"almond": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/almond/-/almond-0.3.3.tgz",
|
||||
"integrity": "sha1-oOfJWsdiTWQXtElLHmi/9pMWiiA="
|
||||
},
|
||||
"alphanum-sort": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
|
||||
|
@ -6237,6 +6242,11 @@
|
|||
"integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==",
|
||||
"dev": true
|
||||
},
|
||||
"jquery-mousewheel": {
|
||||
"version": "3.1.13",
|
||||
"resolved": "https://registry.npmjs.org/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz",
|
||||
"integrity": "sha1-BvAzXxbjU6aV5yBr9QUDy1I6buU="
|
||||
},
|
||||
"js-base64": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.2.tgz",
|
||||
|
@ -10696,6 +10706,15 @@
|
|||
"integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=",
|
||||
"dev": true
|
||||
},
|
||||
"select2": {
|
||||
"version": "4.0.6-rc.1",
|
||||
"resolved": "https://registry.npmjs.org/select2/-/select2-4.0.6-rc.1.tgz",
|
||||
"integrity": "sha1-qmwwOKfw8ukf+t448KIcFeGBMnY=",
|
||||
"requires": {
|
||||
"almond": "0.3.3",
|
||||
"jquery-mousewheel": "3.1.13"
|
||||
}
|
||||
},
|
||||
"selfsigned": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.1.tgz",
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"vue": "^2.5.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-sass": "^4.7.2"
|
||||
"node-sass": "^4.7.2",
|
||||
"select2": "^4.0.6-rc.1"
|
||||
}
|
||||
}
|
||||
|
|
649
public/css/app.css
vendored
649
public/css/app.css
vendored
|
@ -5312,3 +5312,652 @@ readers do not read off random characters that represent icons */
|
|||
font-weight: 900;
|
||||
}
|
||||
|
||||
.select2-container {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--multiple {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 39px;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2-container .select2-search--inline {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051;
|
||||
}
|
||||
|
||||
.select2-results {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
-webkit-clip-path: inset(50%) !important;
|
||||
clip-path: inset(50%) !important;
|
||||
height: 1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #dedfe2;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: #999;
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid #dedfe2 1px;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(50%, white), to(#eeeeee));
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eeeeee), to(#cccccc));
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0);
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, #eeeeee));
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(50%, #eeeeee), to(white));
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0);
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb;
|
||||
}
|
||||
|
||||
|
|
17
public/js/app.js
vendored
17
public/js/app.js
vendored
|
@ -76,13 +76,20 @@ $.when( $.ready ).then(function() {
|
|||
});
|
||||
$("#sortable").sortable("disable");
|
||||
|
||||
$(".item-container").droppable({
|
||||
$(".droppable").droppable({
|
||||
tolerance: "pointer",
|
||||
greedy: true,
|
||||
drop: function( event, ui ) {
|
||||
alert($( this ).data('id'));
|
||||
alert($( ui.draggable ).data('id'));
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
var tag = $( this ).data('id');
|
||||
var item = $( ui.draggable ).data('id');
|
||||
|
||||
$.get('tag/add/'+tag+'/'+item, function(data) {
|
||||
if(data == 1) {
|
||||
$( ui.draggable ).remove();
|
||||
} else {
|
||||
//alert('not added');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
|
1
public/js/select2.min.js
vendored
Normal file
1
public/js/select2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/css/app.css": "/css/app.css?id=8ecb24c3817ea7885f13",
|
||||
"/js/app.js": "/js/app.js?id=8dfc323d4d8919d6f3bf"
|
||||
"/css/app.css": "/css/app.css?id=098a3a1a2e45b2715547",
|
||||
"/js/app.js": "/js/app.js?id=aca509074429685069a4"
|
||||
}
|
17
resources/assets/js/app.js
vendored
17
resources/assets/js/app.js
vendored
|
@ -67,13 +67,20 @@ $.when( $.ready ).then(function() {
|
|||
});
|
||||
$("#sortable").sortable("disable");
|
||||
|
||||
$(".item-container").droppable({
|
||||
$(".droppable").droppable({
|
||||
tolerance: "pointer",
|
||||
greedy: true,
|
||||
drop: function( event, ui ) {
|
||||
alert($( this ).data('id'));
|
||||
alert($( ui.draggable ).data('id'));
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
var tag = $( this ).data('id');
|
||||
var item = $( ui.draggable ).data('id');
|
||||
|
||||
$.get('tag/add/'+tag+'/'+item, function(data) {
|
||||
if(data == 1) {
|
||||
$( ui.draggable ).remove();
|
||||
} else {
|
||||
//alert('not added');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
|
484
resources/assets/sass/_select2.scss
vendored
Normal file
484
resources/assets/sass/_select2.scss
vendored
Normal file
|
@ -0,0 +1,484 @@
|
|||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 39px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
-webkit-clip-path: inset(50%) !important;
|
||||
clip-path: inset(50%) !important;
|
||||
height: 1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
white-space: nowrap !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #dedfe2;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: #999;
|
||||
margin-top: 5px;
|
||||
float: left; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid #dedfe2 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
5
resources/assets/sass/app.scss
vendored
5
resources/assets/sass/app.scss
vendored
|
@ -16,4 +16,7 @@
|
|||
|
||||
// fontawesome
|
||||
@import "fontawesome/fontawesome";
|
||||
@import "fontawesome/fa-solid";
|
||||
@import "fontawesome/fa-solid";
|
||||
|
||||
@import "select2";
|
||||
|
||||
|
|
|
@ -61,6 +61,10 @@ return [
|
|||
'apps.config' => 'Config',
|
||||
'apps.apikey' => 'Api Key',
|
||||
'apps.enable' => 'Enable',
|
||||
'apps.tag_list' => 'Tags list',
|
||||
'apps.add_tag' => 'Add tag',
|
||||
'apps.tag_name' => 'Tag name',
|
||||
'apps.tags' => 'Tags',
|
||||
|
||||
'url' => 'Url',
|
||||
'title' => 'Title',
|
||||
|
@ -73,6 +77,11 @@ return [
|
|||
'alert.success.item_deleted' => 'Item deleted successfully',
|
||||
'alert.success.item_restored' => 'Item restored successfully',
|
||||
|
||||
'alert.success.tag_created' => 'Tag created successfully',
|
||||
'alert.success.tag_updated' => 'Tag updated successfully',
|
||||
'alert.success.tag_deleted' => 'Tag deleted successfully',
|
||||
'alert.success.tag_restored' => 'Tag restored successfully',
|
||||
|
||||
'alert.success.setting_updated' => 'You have successfully edited this Setting',
|
||||
'alert.error.not_exist' => 'This Setting does not exist.',
|
||||
|
||||
|
|
|
@ -72,12 +72,13 @@
|
|||
|
||||
@yield('content')
|
||||
<div id="config-buttons">
|
||||
@if(Route::is('dash'))
|
||||
@if(Route::is('dash') || Route::is('tags.show'))
|
||||
<a id="config-button" class="config" href=""><i class="fas fa-exchange"></i></a>
|
||||
@endif
|
||||
|
||||
<a id="dash" class="config" href="{{ route('dash') }}"><i class="fas fa-th"></i></a>
|
||||
<a id="items" class="config" href="{{ route('items.index') }}"><i class="fas fa-list"></i></a>
|
||||
<a id="folder" class="config" href="{{ route('tags.index') }}"><i class="fas fa-tag"></i></a>
|
||||
<a id="settings" class="config" href="{{ route('settings.index') }}"><i class="fas fa-cogs"></i></a>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<section class="item-container" data-id="{{ $app->id }}">
|
||||
<section class="item-container{{ $app->droppable }}" data-id="{{ $app->id }}">
|
||||
<div class="item" style="background-color: {{ $app->colour }}">
|
||||
@if($app->icon)
|
||||
<img class="app-icon" src="{{ asset('storage/'.$app->icon) }}" />
|
||||
<img class="app-icon" src="/storage/{{ $app->icon }}" />
|
||||
@else
|
||||
<img class="app-icon" src="{{ asset('img/heimdall-icon-small.png') }}" />
|
||||
<img class="app-icon" src="/img/heimdall-icon-small.png" />
|
||||
@endif
|
||||
<div class="details">
|
||||
<div class="title">{{ $app->title }}</div>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<div data-id="{{ $app->id }}" data-dataonly="{{ $app->config->dataonly or '0' }}" class="livestats-container"></div>
|
||||
@endif
|
||||
</div>
|
||||
<a class="link" target="_blank" href="{{ $app->url }}"><i class="fas fa-arrow-alt-to-right"></i></a>
|
||||
<a class="link"{{ $app->target }} href="{{ $app->link }}"><i class="fas fa-arrow-alt-to-right"></i></a>
|
||||
</div>
|
||||
<a class="item-edit" href="{{ route('items.edit', $app->id) }}"><i class="fas fa-pencil"></i></a>
|
||||
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
<hr />
|
||||
<label>{{ strtoupper(__('app.url')) }}</label>
|
||||
{!! Form::text('url', null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!}
|
||||
</div>
|
||||
<div class="input">
|
||||
<label>{{ __('app.apps.colour') }} *</label>
|
||||
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
|
||||
<hr />
|
||||
<label>{{ __('app.apps.pinned') }}</label>
|
||||
{!! Form::hidden('pinned', '0') !!}
|
||||
|
@ -31,6 +27,14 @@
|
|||
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<div class="input">
|
||||
<label>{{ __('app.apps.colour') }} *</label>
|
||||
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
|
||||
<hr />
|
||||
<label>{{ __('app.apps.tags') }}</label>
|
||||
{!! Form::select('tags', $tags, $current_tags, ['class' => 'tags', 'multiple']) !!}
|
||||
</div>
|
||||
<div class="input">
|
||||
<label>{{ __('app.apps.icon') }}</label>
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
@foreach($apps as $app)
|
||||
<tr>
|
||||
<td>{{ $app->title }}</td>
|
||||
<td><a href="{{ $app->url }}">{{ $app->url }}</a></td>
|
||||
<td class="text-center"><a href="{!! route('items.edit', $app->id) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
|
||||
<td><a href="{{ $app->url }}">{{ $app->link }}</a></td>
|
||||
<td class="text-center"><a{{ $app->target }} href="{!! route('items.edit', $app->id) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
|
||||
<td class="text-center">
|
||||
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
|
||||
<button class="link" type="submit"><i class="fa fa-trash-alt"></i></button>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<script src="/js/select2.min.js"></script>
|
||||
<script>
|
||||
$( function() {
|
||||
|
||||
|
@ -30,5 +31,8 @@
|
|||
}, "json");
|
||||
}
|
||||
});
|
||||
|
||||
$('.tags').select2();
|
||||
|
||||
});
|
||||
</script>
|
12
resources/views/tags/create.blade.php
Normal file
12
resources/views/tags/create.blade.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
@extends('app')
|
||||
|
||||
@section('content')
|
||||
|
||||
{!! Form::open(array('route' => 'tags.store', 'id' => 'itemform', 'files' => true, 'method'=>'POST')) !!}
|
||||
@include('tags.form')
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
@section('scripts')
|
||||
@include('tags.scripts')
|
||||
@endsection
|
12
resources/views/tags/edit.blade.php
Normal file
12
resources/views/tags/edit.blade.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
@extends('app')
|
||||
|
||||
@section('content')
|
||||
|
||||
{!! Form::model($item, ['method' => 'PATCH', 'id' => 'itemform', 'files' => true, 'route' => ['tags.update', $item->id]]) !!}
|
||||
@include('tags.form')
|
||||
{!! Form::close() !!}
|
||||
|
||||
@endsection
|
||||
@section('scripts')
|
||||
@include('tags.scripts')
|
||||
@endsection
|
76
resources/views/tags/form.blade.php
Normal file
76
resources/views/tags/form.blade.php
Normal file
|
@ -0,0 +1,76 @@
|
|||
<section class="module-container">
|
||||
<header>
|
||||
<div class="section-title">{{ __('app.apps.add_tag') }}</div>
|
||||
<div class="module-actions">
|
||||
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
|
||||
<a href="{{ route('tags.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
|
||||
</div>
|
||||
</header>
|
||||
<div id="create" class="create">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="input">
|
||||
<label>{{ __('app.apps.tag_name') }} *</label>
|
||||
{!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'id' => 'appname', 'class' => 'form-control')) !!}
|
||||
<hr />
|
||||
<label>{{ __('app.apps.pinned') }}</label>
|
||||
{!! Form::hidden('pinned', '0') !!}
|
||||
<label class="switch">
|
||||
<?php
|
||||
$checked = false;
|
||||
if(isset($item->pinned) && (bool)$item->pinned === true) $checked = true;
|
||||
$set_checked = ($checked) ? ' checked="checked"' : '';
|
||||
?>
|
||||
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<label>{{ __('app.apps.colour') }} *</label>
|
||||
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
|
||||
<hr />
|
||||
</div>
|
||||
<div class="input">
|
||||
<label>{{ __('app.apps.icon') }}</label>
|
||||
<div class="icon-container">
|
||||
<div id="appimage">
|
||||
@if(isset($item->icon) && !empty($item->icon) || old('icon'))
|
||||
<?php
|
||||
if(isset($item->icon)) $icon = $item->icon;
|
||||
else $icon = old('icon');
|
||||
?>
|
||||
<img src="{{ asset('storage/'.$icon) }}" />
|
||||
{!! Form::hidden('icon', $icon, ['class' => 'form-control']) !!}
|
||||
@else
|
||||
<img src="/img/heimdall-icon-small.png" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="upload-btn-wrapper">
|
||||
<button class="btn">{{ __('app.buttons.upload')}} </button>
|
||||
<input type="file" id="upload" name="file" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(isset($item) && isset($item->config->view))
|
||||
<div id="sapconfig" style="display: block;">
|
||||
@if(isset($item))
|
||||
@include('supportedapps.'.$item->config->view)
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div id="sapconfig"></div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
<div class="section-title"> </div>
|
||||
<div class="module-actions">
|
||||
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
|
||||
<a href="{{ route('tags.index') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</section>
|
||||
|
||||
|
55
resources/views/tags/list.blade.php
Normal file
55
resources/views/tags/list.blade.php
Normal file
|
@ -0,0 +1,55 @@
|
|||
@extends('app')
|
||||
|
||||
@section('content')
|
||||
<section class="module-container">
|
||||
<header>
|
||||
<div class="section-title">
|
||||
{{ __('app.apps.tag_list') }}
|
||||
@if( isset($trash) && $trash->count() > 0 )
|
||||
<a class="trashed" href="{{ route('tags.index', ['trash' => true]) }}">{{ __('app.apps.view_trash') }} ({{ $trash->count() }})</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="module-actions">
|
||||
<a href="{{ route('tags.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('app.title') }}</th>
|
||||
<th>{{ __('app.url') }}</th>
|
||||
<th class="text-center" width="100">{{ __('app.settings.edit') }}</th>
|
||||
<th class="text-center" width="100">{{ __('app.delete') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($apps->first())
|
||||
@foreach($apps as $app)
|
||||
<tr>
|
||||
<td>{{ $app->title }}</td>
|
||||
<td><a{{ $app->target }} href="{{ $app->url }}">{{ $app->link }}</a></td>
|
||||
<td class="text-center"><a href="{!! route('tags.edit', $app->id) !!}" title="{{ __('app.settings.edit') }} {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
|
||||
<td class="text-center">
|
||||
{!! Form::open(['method' => 'DELETE','route' => ['tags.destroy', $app->id],'style'=>'display:inline']) !!}
|
||||
<button class="link" type="submit"><i class="fa fa-trash-alt"></i></button>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4" class="form-error text-center">
|
||||
<strong>{{ __('app.settings.no_items') }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
@endsection
|
34
resources/views/tags/scripts.blade.php
Normal file
34
resources/views/tags/scripts.blade.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script>
|
||||
$( function() {
|
||||
|
||||
var elem = $('.color-picker')[0];
|
||||
var hueb = new Huebee( elem, {
|
||||
// options
|
||||
});
|
||||
|
||||
var availableTags = [
|
||||
<?php
|
||||
$supported = App\Item::supportedOptions();
|
||||
foreach($supported as $sapp) {
|
||||
echo '"'.$sapp.'",';
|
||||
}
|
||||
?>
|
||||
];
|
||||
$( "#appname" ).autocomplete({
|
||||
source: availableTags,
|
||||
select: function( event, ui ) {
|
||||
$.post('/appload', { app: ui.item.value }, function(data) {
|
||||
$('#appimage').html("<img src='/storage/"+data.icon+"' /><input type='hidden' name='icon' value='"+data.icon+"' />");
|
||||
$('input[name=colour]').val(data.colour);
|
||||
hueb.setColor( data.colour );
|
||||
$('input[name=pinned]').prop('checked', true);
|
||||
if(data.config != null) {
|
||||
$.get('/view/'+data.config, function(getdata) {
|
||||
$('#sapconfig').html(getdata).show();
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
52
resources/views/tags/trash.blade.php
Normal file
52
resources/views/tags/trash.blade.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
@extends('app')
|
||||
|
||||
@section('content')
|
||||
<section class="module-container">
|
||||
<header>
|
||||
<div class="section-title">
|
||||
Showing Deleted Applications
|
||||
</div>
|
||||
<div class="module-actions">
|
||||
<a href="{{ route('tags.index') }}" title="" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('app.title') }}</th>
|
||||
<th>Url</th>
|
||||
<th class="text-center" width="100">{{ __('app.restore') }}</th>
|
||||
<th class="text-center" width="100">{{ __('app.delete') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($trash->first())
|
||||
@foreach($trash as $app)
|
||||
<tr>
|
||||
<td>{{ $app->title }}</td>
|
||||
<td>{{ __('app.url') }}</td>
|
||||
<td class="text-center"><a href="{!! route('tags.restore', $app->id) !!}" title="{{ __('app.restore') }} {!! $app->title !!}"><i class="fas fa-undo"></i></a></td>
|
||||
<td class="text-center">
|
||||
{!! Form::open(['method' => 'DELETE','route' => ['tags.destroy', $app->id],'style'=>'display:inline']) !!}
|
||||
<input type="hidden" name="force" value="1" />
|
||||
<button type="submit"><i class="fa fa-trash-alt"></i></button>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="5" class="form-error text-center">
|
||||
<strong>{{ __('app.settings.no_items') }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
@endsection
|
|
@ -15,7 +15,13 @@ Route::get('/', 'ItemController@dash')->name('dash');
|
|||
|
||||
Route::resources([
|
||||
'items' => 'ItemController',
|
||||
'tags' => 'TagController',
|
||||
]);
|
||||
|
||||
Route::get('tag/{slug}', 'TagController@show')->name('tags.show');
|
||||
Route::get('tag/add/{tag}/{item}', 'TagController@add')->name('tags.add');
|
||||
|
||||
|
||||
Route::get('items/pin/{id}', 'ItemController@pin')->name('items.pin');
|
||||
Route::get('items/restore/{id}', 'ItemController@restore')->name('items.restore');
|
||||
Route::get('items/unpin/{id}', 'ItemController@unpin')->name('items.unpin');
|
||||
|
|
22
vendor/composer/autoload_classmap.php
vendored
22
vendor/composer/autoload_classmap.php
vendored
|
@ -15,6 +15,7 @@ return array(
|
|||
'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php',
|
||||
'App\\Http\\Controllers\\ItemController' => $baseDir . '/app/Http/Controllers/ItemController.php',
|
||||
'App\\Http\\Controllers\\SettingsController' => $baseDir . '/app/Http/Controllers/SettingsController.php',
|
||||
'App\\Http\\Controllers\\TagController' => $baseDir . '/app/Http/Controllers/TagController.php',
|
||||
'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php',
|
||||
'App\\Http\\Middleware\\EncryptCookies' => $baseDir . '/app/Http/Middleware/EncryptCookies.php',
|
||||
'App\\Http\\Middleware\\RedirectIfAuthenticated' => $baseDir . '/app/Http/Middleware/RedirectIfAuthenticated.php',
|
||||
|
@ -31,14 +32,35 @@ return array(
|
|||
'App\\SettingGroup' => $baseDir . '/app/SettingGroup.php',
|
||||
'App\\SupportedApps\\Contracts\\Applications' => $baseDir . '/app/SupportedApps/Contracts/Applications.php',
|
||||
'App\\SupportedApps\\Contracts\\Livestats' => $baseDir . '/app/SupportedApps/Contracts/Livestats.php',
|
||||
'App\\SupportedApps\\Deluge' => $baseDir . '/app/SupportedApps/Deluge.php',
|
||||
'App\\SupportedApps\\Duplicati' => $baseDir . '/app/SupportedApps/Duplicati.php',
|
||||
'App\\SupportedApps\\Emby' => $baseDir . '/app/SupportedApps/Emby.php',
|
||||
'App\\SupportedApps\\HomeAssistant' => $baseDir . '/app/SupportedApps/HomeAssistant.php',
|
||||
'App\\SupportedApps\\Jackett' => $baseDir . '/app/SupportedApps/Jackett.php',
|
||||
'App\\SupportedApps\\Jdownloader' => $baseDir . '/app/SupportedApps/Jdownloader.php',
|
||||
'App\\SupportedApps\\Lidarr' => $baseDir . '/app/SupportedApps/Lidarr.php',
|
||||
'App\\SupportedApps\\Mcmyadmin' => $baseDir . '/app/SupportedApps/Mcmyadmin.php',
|
||||
'App\\SupportedApps\\Medusa' => $baseDir . '/app/SupportedApps/Medusa.php',
|
||||
'App\\SupportedApps\\Netdata' => $baseDir . '/app/SupportedApps/Netdata.php',
|
||||
'App\\SupportedApps\\Nextcloud' => $baseDir . '/app/SupportedApps/Nextcloud.php',
|
||||
'App\\SupportedApps\\Nzbget' => $baseDir . '/app/SupportedApps/Nzbget.php',
|
||||
'App\\SupportedApps\\Nzbhydra' => $baseDir . '/app/SupportedApps/Nzbhydra.php',
|
||||
'App\\SupportedApps\\Openhab' => $baseDir . '/app/SupportedApps/Openhab.php',
|
||||
'App\\SupportedApps\\Opnsense' => $baseDir . '/app/SupportedApps/Opnsense.php',
|
||||
'App\\SupportedApps\\Pfsense' => $baseDir . '/app/SupportedApps/Pfsense.php',
|
||||
'App\\SupportedApps\\Pihole' => $baseDir . '/app/SupportedApps/Pihole.php',
|
||||
'App\\SupportedApps\\Plex' => $baseDir . '/app/SupportedApps/Plex.php',
|
||||
'App\\SupportedApps\\Plexpy' => $baseDir . '/app/SupportedApps/Plexpy.php',
|
||||
'App\\SupportedApps\\Plexrequests' => $baseDir . '/app/SupportedApps/Plexrequests.php',
|
||||
'App\\SupportedApps\\Portainer' => $baseDir . '/app/SupportedApps/Portainer.php',
|
||||
'App\\SupportedApps\\Proxmox' => $baseDir . '/app/SupportedApps/Proxmox.php',
|
||||
'App\\SupportedApps\\Radarr' => $baseDir . '/app/SupportedApps/Radarr.php',
|
||||
'App\\SupportedApps\\Sabnzbd' => $baseDir . '/app/SupportedApps/Sabnzbd.php',
|
||||
'App\\SupportedApps\\Sonarr' => $baseDir . '/app/SupportedApps/Sonarr.php',
|
||||
'App\\SupportedApps\\Traefik' => $baseDir . '/app/SupportedApps/Traefik.php',
|
||||
'App\\SupportedApps\\Ttrss' => $baseDir . '/app/SupportedApps/Ttrss.php',
|
||||
'App\\SupportedApps\\Unifi' => $baseDir . '/app/SupportedApps/Unifi.php',
|
||||
'App\\SupportedApps\\ruTorrent' => $baseDir . '/app/SupportedApps/ruTorrent.php',
|
||||
'App\\User' => $baseDir . '/app/User.php',
|
||||
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
|
||||
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
|
||||
|
|
22
vendor/composer/autoload_static.php
vendored
22
vendor/composer/autoload_static.php
vendored
|
@ -353,6 +353,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf
|
|||
'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php',
|
||||
'App\\Http\\Controllers\\ItemController' => __DIR__ . '/../..' . '/app/Http/Controllers/ItemController.php',
|
||||
'App\\Http\\Controllers\\SettingsController' => __DIR__ . '/../..' . '/app/Http/Controllers/SettingsController.php',
|
||||
'App\\Http\\Controllers\\TagController' => __DIR__ . '/../..' . '/app/Http/Controllers/TagController.php',
|
||||
'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php',
|
||||
'App\\Http\\Middleware\\EncryptCookies' => __DIR__ . '/../..' . '/app/Http/Middleware/EncryptCookies.php',
|
||||
'App\\Http\\Middleware\\RedirectIfAuthenticated' => __DIR__ . '/../..' . '/app/Http/Middleware/RedirectIfAuthenticated.php',
|
||||
|
@ -369,14 +370,35 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf
|
|||
'App\\SettingGroup' => __DIR__ . '/../..' . '/app/SettingGroup.php',
|
||||
'App\\SupportedApps\\Contracts\\Applications' => __DIR__ . '/../..' . '/app/SupportedApps/Contracts/Applications.php',
|
||||
'App\\SupportedApps\\Contracts\\Livestats' => __DIR__ . '/../..' . '/app/SupportedApps/Contracts/Livestats.php',
|
||||
'App\\SupportedApps\\Deluge' => __DIR__ . '/../..' . '/app/SupportedApps/Deluge.php',
|
||||
'App\\SupportedApps\\Duplicati' => __DIR__ . '/../..' . '/app/SupportedApps/Duplicati.php',
|
||||
'App\\SupportedApps\\Emby' => __DIR__ . '/../..' . '/app/SupportedApps/Emby.php',
|
||||
'App\\SupportedApps\\HomeAssistant' => __DIR__ . '/../..' . '/app/SupportedApps/HomeAssistant.php',
|
||||
'App\\SupportedApps\\Jackett' => __DIR__ . '/../..' . '/app/SupportedApps/Jackett.php',
|
||||
'App\\SupportedApps\\Jdownloader' => __DIR__ . '/../..' . '/app/SupportedApps/Jdownloader.php',
|
||||
'App\\SupportedApps\\Lidarr' => __DIR__ . '/../..' . '/app/SupportedApps/Lidarr.php',
|
||||
'App\\SupportedApps\\Mcmyadmin' => __DIR__ . '/../..' . '/app/SupportedApps/Mcmyadmin.php',
|
||||
'App\\SupportedApps\\Medusa' => __DIR__ . '/../..' . '/app/SupportedApps/Medusa.php',
|
||||
'App\\SupportedApps\\Netdata' => __DIR__ . '/../..' . '/app/SupportedApps/Netdata.php',
|
||||
'App\\SupportedApps\\Nextcloud' => __DIR__ . '/../..' . '/app/SupportedApps/Nextcloud.php',
|
||||
'App\\SupportedApps\\Nzbget' => __DIR__ . '/../..' . '/app/SupportedApps/Nzbget.php',
|
||||
'App\\SupportedApps\\Nzbhydra' => __DIR__ . '/../..' . '/app/SupportedApps/Nzbhydra.php',
|
||||
'App\\SupportedApps\\Openhab' => __DIR__ . '/../..' . '/app/SupportedApps/Openhab.php',
|
||||
'App\\SupportedApps\\Opnsense' => __DIR__ . '/../..' . '/app/SupportedApps/Opnsense.php',
|
||||
'App\\SupportedApps\\Pfsense' => __DIR__ . '/../..' . '/app/SupportedApps/Pfsense.php',
|
||||
'App\\SupportedApps\\Pihole' => __DIR__ . '/../..' . '/app/SupportedApps/Pihole.php',
|
||||
'App\\SupportedApps\\Plex' => __DIR__ . '/../..' . '/app/SupportedApps/Plex.php',
|
||||
'App\\SupportedApps\\Plexpy' => __DIR__ . '/../..' . '/app/SupportedApps/Plexpy.php',
|
||||
'App\\SupportedApps\\Plexrequests' => __DIR__ . '/../..' . '/app/SupportedApps/Plexrequests.php',
|
||||
'App\\SupportedApps\\Portainer' => __DIR__ . '/../..' . '/app/SupportedApps/Portainer.php',
|
||||
'App\\SupportedApps\\Proxmox' => __DIR__ . '/../..' . '/app/SupportedApps/Proxmox.php',
|
||||
'App\\SupportedApps\\Radarr' => __DIR__ . '/../..' . '/app/SupportedApps/Radarr.php',
|
||||
'App\\SupportedApps\\Sabnzbd' => __DIR__ . '/../..' . '/app/SupportedApps/Sabnzbd.php',
|
||||
'App\\SupportedApps\\Sonarr' => __DIR__ . '/../..' . '/app/SupportedApps/Sonarr.php',
|
||||
'App\\SupportedApps\\Traefik' => __DIR__ . '/../..' . '/app/SupportedApps/Traefik.php',
|
||||
'App\\SupportedApps\\Ttrss' => __DIR__ . '/../..' . '/app/SupportedApps/Ttrss.php',
|
||||
'App\\SupportedApps\\Unifi' => __DIR__ . '/../..' . '/app/SupportedApps/Unifi.php',
|
||||
'App\\SupportedApps\\ruTorrent' => __DIR__ . '/../..' . '/app/SupportedApps/ruTorrent.php',
|
||||
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
|
||||
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
|
||||
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
|
||||
|
|
Loading…
Reference in a new issue