- '/home/toolbox/www/storage/app/public/:/application/public/storage/'
- '/home/toolbox/www/.docker/config/php.ini:/etc/php/8.1/fpm/conf.d/99-overrides.ini'
- '/home/toolbox/www/.docker/config/cron/crontab:/etc/crontab'
- - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/protected/fluidbook/docs/'
+ - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/protected/fluidbookpublication/docs/'
+ - '/data/extranet/www/fluidbook/books/working/:/application/protected/fluidbookpublication/working/'
- '/home/extranet:/home/extranet'
- '/data/extranet:/data/extranet'
ports:
- '/home/toolbox/www/storage/app/public/:/application/public/storage/'
- '/home/toolbox/www/.docker/config/php.ini:/etc/php/8.1/fpm/conf.d/99-overrides.ini'
- '/home/toolbox/www/.docker/config/cron/crontab:/etc/crontab'
- - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/protected/fluidbook/docs/'
+ - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/protected/fluidbookpublication/docs/'
+ - '/data/extranet/www/fluidbook/books/working/:/application/protected/fluidbookpublication/working/'
- '/home/extranet:/home/extranet'
- '/data/extranet:/data/extranet'
tmpfs:
foreach ($q->get() as $e) {
$this->line('Import ' . $e->book_id);
- $oldRoot = $this->_oldRoot . 'books/working/' . $e->book_id . '/';
$c = new FluidbookPublication();
$c->setIncrementing(false);
$c->id = $e->book_id;
throw new \Exception('Fluidbook has not be set');
}
$this->setJobName(__('Téléchargement massif d\'assets dans un fluidbook'));
- $this->dest = '/home/extranet/www/fluidbook/books/working/' . $fluidbook . '/';
+ $this->dest = '/application/protected/fluidbookpublication/working/' . $fluidbook . '/';
if ($folder !== 'working') {
$this->dest .= $folder . '/';
}
class FluidbookDocument extends ToolboxModel
{
- public const WS_DOCS = '/application/protected/fluidbook/docs/';
+ public const WS_DOCS = '/application/protected/fluidbookpublication/docs/';
protected $table = 'fluidbook_document';
protected $_options = ['name' => 'fluidbook-document',
'singular' => 'document',
*/
protected function _getFreeFileBaseDirectory()
{
- return '/data/extranet/www/fluidbook/books/working/' . $this->id;
+ return '/application/protected/fluidbookpublication/working/' . $this->id;
}
/**
public function getAssetDir()
{
- return Files::mkdir('/data/extranet/www/fluidbook/books/working/' . $this->id);
+ return Files::mkdir('/application/protected/fluidbookpublication/working/' . $this->id);
}
public function getCompositionUpdate(): int
"codemirror": "^5",
"command-line-args": "^5.2.1",
"jquery-contextmenu": "^2.9.2",
+ "jquery-form": "^4.3.0",
"jquery.scrollto": "^2.1.3",
- "keymaster": "^1.6.2",
"keymaster-reloaded": "^1.7.2",
"lz4js": "^0.2.0",
"noty": "^3.2.0-beta-deprecated",
"puppeteer": "^17.0.0",
"select2": "^4.1.0-rc.0",
"select2-bootstrap-theme": "^0.1.0-beta.10",
+ "spectrum-colorpicker": "^1.8.1",
"tippy.js": "^6.3.7"
},
"devDependencies": {
"jquery": ">=1.8.2"
}
},
+ "node_modules/jquery-form": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz",
+ "integrity": "sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==",
+ "dependencies": {
+ "jquery": ">=1.7.2"
+ }
+ },
"node_modules/jquery.scrollto": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/jquery.scrollto/-/jquery.scrollto-2.1.3.tgz",
"graceful-fs": "^4.1.6"
}
},
- "node_modules/keymaster": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/keymaster/-/keymaster-1.6.2.tgz",
- "integrity": "sha512-OvA/AALN8IDKKkTk2Z+bDrzs/SQao4lo/QPbwSdDvm+frxfiYiYCSn1aHFUypJY3SruAO1y/c771agBmTXqUtg=="
- },
"node_modules/keymaster-reloaded": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/keymaster-reloaded/-/keymaster-reloaded-1.7.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
+ "node_modules/spectrum-colorpicker": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/spectrum-colorpicker/-/spectrum-colorpicker-1.8.1.tgz",
+ "integrity": "sha512-x1picQ5giVso71ESII7jZ3+ZFdit8WthNkzwJqLNdPDPzrltKUQGpTohWyPfSAID+bK1zGdO6bDbSh1S6GoLYA=="
+ },
"node_modules/split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
"jquery": "^3.5.0"
}
},
+ "jquery-form": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz",
+ "integrity": "sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==",
+ "requires": {
+ "jquery": ">=1.7.2"
+ }
+ },
"jquery.scrollto": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/jquery.scrollto/-/jquery.scrollto-2.1.3.tgz",
"graceful-fs": "^4.1.6"
}
},
- "keymaster": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/keymaster/-/keymaster-1.6.2.tgz",
- "integrity": "sha512-OvA/AALN8IDKKkTk2Z+bDrzs/SQao4lo/QPbwSdDvm+frxfiYiYCSn1aHFUypJY3SruAO1y/c771agBmTXqUtg=="
- },
"keymaster-reloaded": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/keymaster-reloaded/-/keymaster-reloaded-1.7.2.tgz",
}
}
},
+ "spectrum-colorpicker": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/spectrum-colorpicker/-/spectrum-colorpicker-1.8.1.tgz",
+ "integrity": "sha512-x1picQ5giVso71ESII7jZ3+ZFdit8WthNkzwJqLNdPDPzrltKUQGpTohWyPfSAID+bK1zGdO6bDbSh1S6GoLYA=="
+ },
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
"codemirror": "^5",
"command-line-args": "^5.2.1",
"jquery-contextmenu": "^2.9.2",
+ "jquery-form": "^4.3.0",
"jquery.scrollto": "^2.1.3",
"keymaster-reloaded": "^1.7.2",
"lz4js": "^0.2.0",
"puppeteer": "^17.0.0",
"select2": "^4.1.0-rc.0",
"select2-bootstrap-theme": "^0.1.0-beta.10",
+ "spectrum-colorpicker": "^1.8.1",
"tippy.js": "^6.3.7"
}
}
--- /dev/null
+<svg version="1.1" id="L5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
+ <circle fill="#111" stroke="none" cx="6" cy="50" r="6">
+ <animateTransform
+ attributeName="transform"
+ dur="1s"
+ type="translate"
+ values="0 15 ; 0 -15; 0 15"
+ repeatCount="indefinite"
+ begin="0.1"/>
+ </circle>
+ <circle fill="#111" stroke="none" cx="30" cy="50" r="6">
+ <animateTransform
+ attributeName="transform"
+ dur="1s"
+ type="translate"
+ values="0 10 ; 0 -10; 0 10"
+ repeatCount="indefinite"
+ begin="0.2"/>
+ </circle>
+ <circle fill="#111" stroke="none" cx="54" cy="50" r="6">
+ <animateTransform
+ attributeName="transform"
+ dur="1s"
+ type="translate"
+ values="0 5 ; 0 -5; 0 5"
+ repeatCount="indefinite"
+ begin="0.3"/>
+ </circle>
+</svg>
--- /dev/null
+<svg version="1.1" id="L5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
+ <circle fill="#eee" stroke="none" cx="6" cy="50" r="6">
+ <animateTransform
+ attributeName="transform"
+ dur="1s"
+ type="translate"
+ values="0 15 ; 0 -15; 0 15"
+ repeatCount="indefinite"
+ begin="0.1"/>
+ </circle>
+ <circle fill="#eee" stroke="none" cx="30" cy="50" r="6">
+ <animateTransform
+ attributeName="transform"
+ dur="1s"
+ type="translate"
+ values="0 10 ; 0 -10; 0 10"
+ repeatCount="indefinite"
+ begin="0.2"/>
+ </circle>
+ <circle fill="#eee" stroke="none" cx="54" cy="50" r="6">
+ <animateTransform
+ attributeName="transform"
+ dur="1s"
+ type="translate"
+ values="0 5 ; 0 -5; 0 5"
+ repeatCount="indefinite"
+ begin="0.3"/>
+ </circle>
+</svg>
--- /dev/null
+<svg version="1.1" id="L5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
+ <circle fill="#eee" stroke="none" cx="6" cy="50" r="6">
+ </circle>
+ <circle fill="#eee" stroke="none" cx="30" cy="50" r="6">
+ </circle>
+ <circle fill="#eee" stroke="none" cx="54" cy="50" r="6">
+ </circle>
+</svg>
--- /dev/null
+<svg version="1.1" id="L5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
+ <circle fill="#111" stroke="none" cx="6" cy="50" r="6">
+ </circle>
+ <circle fill="#111" stroke="none" cx="30" cy="50" r="6">
+ </circle>
+ <circle fill="#111" stroke="none" cx="54" cy="50" r="6">
+ </circle>
+</svg>
+++ /dev/null
-window.$ = window.jQuery = require('jquery');
-window.key = require('keymaster-reloaded');
if ($this._maskChangeEvent) {
return;
}
+
$this.saveFormDataInLink();
});
+
+
+ $(document).on('change', ".freefile-file-input", function () {
+ var form = $('#linkupload').clone();
+
+
+ var id = 'linkupload_' + Math.round(Math.random() * 10000000);
+ $(form).attr('id', id);
+ $(this).attr('form', id);
+ $('body').append(form);
+
+ var parent = $(this).closest('.freefile-file');
+ $(parent).addClass('loading');
+ var f = $(form).ajaxSubmit({dataType: 'json'});
+ var xhr = f.data('jqxhr');
+ xhr.done(function (data) {
+ var tf = $(parent).find('.freefile-text-input');
+ tf.val(data[0]);
+ tf.trigger('change');
+ $(parent).removeClass('loading');
+ });
+ });
+
+
},
saveFormDataInLink: function () {
container.append(form);
this.initSelect2();
+ this.initSpectrum();
},
updateFormData: function (form) {
});
},
+ initSpectrum: function () {
+ $("#linkeditor-panel-form .spectrum:not(.init)").each(function () {
+ var t=$(this);
+ $(this).spectrum({
+ preferredFormat: 'hex3',
+ showAlpha: true,
+ allowEmpty: false,
+ showInput: true,
+ showInitial: true,
+ showButtons:false,
+ flat: true,
+ move:function(color){
+ t.val(color.toString());
+ $(t).trigger('change');
+ },
+ dragend:function(color){
+ t.val(color.toString());
+ $(t).trigger('change');
+ }
+ });
+ $(this).addClass('init');
+ });
+ }
+
};
module.exports = LinkeditorForm;
require('jquery.scrollto');
require('jquery-contextmenu');
+require('jquery-form');
+require('spectrum-colorpicker');
+import 'spectrum-colorpicker/spectrum.css';
require('select2');
import 'select2/dist/css/select2.css';
#linkeditor-form-templates
display: none
-
.linkeditor-linktype
&::before
display: inline-block
.freefile-file
position: relative
+ &.loading
+ &::after
+ background-image: url("/images/linkeditor/dots-animated.svg")
+ @media (prefers-color-scheme: dark)
+ background-image: url("/images/linkeditor/dots-dark-animated.svg")
+ input
+ pointer-events: none
+ cursor: wait
+
&::after
- content: "..."
+ content: ""
position: absolute
display: block
padding: 6px
right: 0
- top: -3px
- width: 34px
- height: 34px
+ top: 6px
+ width: 25px
+ height: 25px
+ background-image: url("/images/linkeditor/dots.svg")
color: var(--field-color)
box-sizing: border-box
pointer-events: none
font-size: 17px
+ @media (prefers-color-scheme: dark)
+ background-image: url("/images/linkeditor/dots-dark.svg")
input[type=file]
position: absolute
height: 100%
cursor: pointer
+
.input-group
position: relative
.input-group-append
const mix = require("laravel-mix");
-
mix.setPublicPath('public/packages/linkeditor').js('resources/linkeditor/js/linkeditor.js', 'js')
.sass('resources/linkeditor/style/style.sass', 'css').options({processCssUrls: false}).version();
];
$rulers=!count($rulers)?'{}':json_encode($rulers);
+
+ if(can('fluidbook-publication:links:edit-animations')){
+ $links=\Fluidbook\Tools\Links\Link::decryptLinks($links);
+ }
$links=!count($links)?'{}':json_encode($links);
/** @var \App\Models\User $user */
$user=backpack_user();
@endphp
@endforeach
</div>
+ <form id="linkupload" class="filesorurlupload" action="{{backpack_url('filesorurlupload')}}" method="post"
+ enctype="multipart/form-data">
+ <input type="hidden" name="entity" value="{{ \App\Models\FluidbookPublication::class}}">
+ <input type="hidden" name="entry_id" value="{{ $id }}">
+ <input type="hidden" name="attribute" value="linksAssets">
+ </form>
@endsection
@push('linkeditor_scripts')
@yield('content')
@yield('linkeditor_scripts')
@stack('linkeditor_scripts')
+
</body>
</html>