Fixed bad css loading on Firefox (#35)
Fixed wrong style for publish/unpublish button
This commit is contained in:
parent
a79ef5c4ed
commit
c1920285e3
7 changed files with 657 additions and 151 deletions
29
composer.lock
generated
29
composer.lock
generated
|
@ -785,7 +785,7 @@
|
|||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "backendtea@gmail.com"
|
||||
"email": "BackEndTea@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
|
@ -1694,16 +1694,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "0.11.5",
|
||||
"version": "0.11.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "24ce5a566a798b81343138ed5d41d6877554cf9a"
|
||||
"reference": "7af8b9d02b3ab36444dbf4e1b9ca1c1bd5044d81"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/24ce5a566a798b81343138ed5d41d6877554cf9a",
|
||||
"reference": "24ce5a566a798b81343138ed5d41d6877554cf9a",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/7af8b9d02b3ab36444dbf4e1b9ca1c1bd5044d81",
|
||||
"reference": "7af8b9d02b3ab36444dbf4e1b9ca1c1bd5044d81",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1763,7 +1763,7 @@
|
|||
"MIT"
|
||||
],
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"time": "2019-03-25T16:40:09+00:00"
|
||||
"time": "2019-05-08T16:33:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
|
@ -1839,16 +1839,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/contracts",
|
||||
"version": "v1.0.2",
|
||||
"version": "v1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/contracts.git",
|
||||
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf"
|
||||
"reference": "d3636025e8253c6144358ec0a62773cae588395b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf",
|
||||
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf",
|
||||
"url": "https://api.github.com/repos/symfony/contracts/zipball/d3636025e8253c6144358ec0a62773cae588395b",
|
||||
"reference": "d3636025e8253c6144358ec0a62773cae588395b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1856,19 +1856,22 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"psr/cache": "^1.0",
|
||||
"psr/container": "^1.0"
|
||||
"psr/container": "^1.0",
|
||||
"symfony/polyfill-intl-idn": "^1.10"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/cache": "When using the Cache contracts",
|
||||
"psr/container": "When using the Service contracts",
|
||||
"symfony/cache-contracts-implementation": "",
|
||||
"symfony/event-dispatcher-implementation": "",
|
||||
"symfony/http-client-contracts-implementation": "",
|
||||
"symfony/service-contracts-implementation": "",
|
||||
"symfony/translation-contracts-implementation": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1903,7 +1906,7 @@
|
|||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2018-12-05T08:06:11+00:00"
|
||||
"time": "2019-04-27T14:29:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
|
|
732
package-lock.json
generated
732
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -27,7 +27,7 @@ return [
|
|||
'owner' => 'Proprietario',
|
||||
'date' => 'Data',
|
||||
'raw' => 'Vedi raw',
|
||||
'download' => 'Download',
|
||||
'download' => 'Scarica',
|
||||
'delete' => 'Elimina',
|
||||
'publish' => 'Pubblica',
|
||||
'hide' => 'Nascondi',
|
||||
|
|
|
@ -7,17 +7,23 @@
|
|||
<meta name="description" content="XBackBone is a simple and lightweight PHP backend for ShareX">
|
||||
<link rel="shortcut icon" href="{{ urlFor('/favicon.ico') }}" type="image/x-icon">
|
||||
<link rel="icon" href="{{ urlFor('/favicon.ico') }}" type="image/x-icon">
|
||||
<link href="{{ urlFor('/static/bootstrap/css/bootstrap.min.css') }}" rel="preload" as="style" onload="this.rel='stylesheet'">
|
||||
<link rel="preload" href="{{ urlFor('/static/bootstrap/css/bootstrap.min.css') }}" as="style">
|
||||
<link rel="preload" href="{{ urlFor('/static/app/app.css') }}" as="style">
|
||||
<link rel="preload" href="{{ urlFor('/static/jquery/jquery.min.js') }}" as="script">
|
||||
<link rel="preload" href="{{ urlFor('/static/bootstrap/js/bootstrap.bundle.min.js') }}" as="script">
|
||||
<link rel="preload" href="{{ urlFor('/static/fontawesome/js/all.min.js') }}" as="script">
|
||||
<link rel="preload" href="{{ urlFor('/static/app/app.js') }}" as="script">
|
||||
<link href="{{ urlFor('/static/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ urlFor('/static/highlightjs/styles/monokai.css') }}" rel="stylesheet">
|
||||
<link href="{{ urlFor('/static/videojs/video-js.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ urlFor('/static/app/app.css') }}" rel="preload" as="style" onload="this.rel='stylesheet'">
|
||||
<script src="{{ urlFor('/static/jquery/jquery.min.js') }}" rel="prefetch"></script>
|
||||
<script src="{{ urlFor('/static/bootstrap/js/bootstrap.bundle.min.js') }}" rel="prefetch"></script>
|
||||
<script src="{{ urlFor('/static/fontawesome/js/all.min.js') }}" rel="prefetch"></script>
|
||||
<link href="{{ urlFor('/static/app/app.css') }}" rel="stylesheet">
|
||||
<script src="{{ urlFor('/static/jquery/jquery.min.js') }}"></script>
|
||||
<script src="{{ urlFor('/static/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
|
||||
<script src="{{ urlFor('/static/fontawesome/js/all.min.js') }}"></script>
|
||||
<script src="{{ urlFor('/static/highlightjs/highlight.pack.min.js') }}"></script>
|
||||
<script src="{{ urlFor('/static/clipboardjs/clipboard.min.js') }}"></script>
|
||||
<script src="{{ urlFor('/static/videojs/video.min.js') }}"></script>
|
||||
<script src="{{ urlFor('/static/app/app.js') }}" rel="prefetch"></script>
|
||||
<script src="{{ urlFor('/static/app/app.js') }}"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
<script>window.AppConfig = {'base_url': '{{ config.base_url }}', 'lang': {'publish': '{{ lang('publish') }}', 'hide': '{{ lang('hide') }}'}}</script>
|
||||
{% block head %}{% endblock %}
|
||||
|
|
|
@ -54,19 +54,18 @@
|
|||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
{% if media.username is not null %}
|
||||
<a href="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension) }}" class="btn btn-outline-dark" data-toggle="tooltip" title="{{ lang('open') }}" target="_blank"><i class="fas fa-external-link-alt"></i></a>
|
||||
<a href="javascript:void(0)" class="btn btn-outline-success btn-clipboard" data-toggle="tooltip" title="{{ lang('copy_link') }}" data-clipboard-text="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension) }}"><i
|
||||
class="fas fa-link"></i></a>
|
||||
<a href="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension) }}" class="btn btn-sm btn-outline-dark" data-toggle="tooltip" title="{{ lang('open') }}" target="_blank"><i class="fas fa-external-link-alt"></i></a>
|
||||
<a href="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension ~ '/download') }}" class="btn btn-sm btn-outline-secondary" data-toggle="tooltip" title="{{ lang('download') }}"><i class="fas fa-cloud-download-alt"></i></a>
|
||||
<a href="javascript:void(0)" class="btn btn-sm btn-outline-success btn-clipboard" data-toggle="tooltip" title="{{ lang('copy_link') }}" data-clipboard-text="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension) }}"><i class="fas fa-link"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ route('upload.raw', {'id': media.id}) }}" class="btn btn-outline-dark" data-toggle="tooltip" title="{{ lang('raw') }}" target="_blank"><i class="fas fa-external-link-alt"></i></a>
|
||||
<a href="{{ route('upload.raw', {'id': media.id}) }}" class="btn btn-sm btn-outline-dark" data-toggle="tooltip" title="{{ lang('raw') }}" target="_blank"><i class="fas fa-external-link-alt"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if media.published %}
|
||||
<a href="javascript:void(0)" class="btn btn-outline-warning publish-toggle" data-toggle="tooltip" title="{{ lang('hide') }}" data-id="{{ media.id }}" data-published="{{ media.published }}"><i class="fas fa-times-circle"></i></a>
|
||||
<a href="javascript:void(0)" class="btn btn-sm btn-outline-warning publish-toggle" data-toggle="tooltip" title="{{ lang('hide') }}" data-id="{{ media.id }}" data-published="{{ media.published }}"><i class="fas fa-times-circle"></i></a>
|
||||
{% else %}
|
||||
<a href="javascript:void(0)" class="btn btn-outline-info publish-toggle" data-toggle="tooltip" title="{{ lang('publish') }}" data-id="{{ media.id }}" data-published="{{ media.published }}"><i class="fas fa-check-circle"></i></a>
|
||||
<a href="javascript:void(0)" class="btn btn-sm btn-outline-info publish-toggle" data-toggle="tooltip" title="{{ lang('publish') }}" data-id="{{ media.id }}" data-published="{{ media.published }}"><i class="fas fa-check-circle"></i></a>
|
||||
{% endif %}
|
||||
<a href="javascript:void(0)" class="btn btn-outline-danger media-delete" data-link="{{ route('upload.delete', {'id': media.id}) }}" data-id="{{ media.id }}" data-toggle="tooltip" title="{{ lang('delete') }}"><i class="fas fa-trash"></i></a>
|
||||
<a href="javascript:void(0)" class="btn btn-sm btn-outline-danger media-delete" data-link="{{ route('upload.delete', {'id': media.id}) }}" data-id="{{ media.id }}" data-toggle="tooltip" title="{{ lang('delete') }}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<button type="button" class="btn btn-sm btn-success btn-clipboard" data-toggle="tooltip" title="{{ lang('copy_link') }}" data-clipboard-text="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension) }}">
|
||||
<i class="fas fa-link"></i>
|
||||
</button>
|
||||
<a href="{{ urlFor('/' ~ media.user_code ~ '/' ~ media.code ~ '.' ~ media.extension ~ '/download') }}" class="btn btn-sm btn-secondary" data-toggle="tooltip" title="{{ lang('download') }}"><i class="fas fa-cloud-download-alt"></i></a>
|
||||
{% if media.published %}
|
||||
<a href="javascript:void(0)" class="btn btn-sm btn-warning publish-toggle" data-toggle="tooltip" title="{{ lang('hide') }}" data-id="{{ media.id }}" data-published="{{ media.published }}"><i class="fas fa-times-circle"></i></a>
|
||||
{% else %}
|
||||
|
|
|
@ -33,27 +33,30 @@ var app = {
|
|||
publishToggle: function () {
|
||||
var id = $(this).data('id');
|
||||
var $callerButton = $(this);
|
||||
var isOutline = false;
|
||||
if ($(this).data('published')) {
|
||||
isOutline = $callerButton.hasClass('btn-outline-warning');
|
||||
$.post(window.AppConfig.base_url + '/upload/' + id + '/unpublish', function () {
|
||||
$callerButton
|
||||
.data('published', false)
|
||||
.tooltip('dispose')
|
||||
.attr('title', window.AppConfig.lang.publish)
|
||||
.tooltip()
|
||||
.removeClass('btn-warning')
|
||||
.addClass('btn-info')
|
||||
.removeClass(isOutline ? 'btn-outline-warning' : 'btn-warning')
|
||||
.addClass(isOutline ? 'btn-outline-info' : 'btn-info')
|
||||
.html('<i class="fas fa-check-circle"></i>');
|
||||
$('#published_' + id).html('<span class="badge badge-danger"><i class="fas fa-times"></i></span>');
|
||||
});
|
||||
} else {
|
||||
isOutline = $callerButton.hasClass('btn-outline-info');
|
||||
$.post(window.AppConfig.base_url + '/upload/' + id + '/publish', function () {
|
||||
$callerButton
|
||||
.data('published', true)
|
||||
.tooltip('dispose')
|
||||
.attr('title', window.AppConfig.lang.hide)
|
||||
.tooltip()
|
||||
.removeClass('btn-info')
|
||||
.addClass('btn-warning')
|
||||
.removeClass(isOutline ? 'btn-outline-info' : 'btn-info')
|
||||
.addClass(isOutline ? 'btn-outline-warning' : 'btn-warning')
|
||||
.html('<i class="fas fa-times-circle"></i>');
|
||||
$('#published_' + id).html('<span class="badge badge-success"><i class="fas fa-check"></i></span>');
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue