*/
public static function _handleFiles($theme, $data)
{
- // $oldRoot = '/home/extranet/www/fluidbook/themes/' . $theme->getAttribute('id') . '/';
+ // $oldRoot = '/home/extranet/www/fluidbook/themes/' . $theme->getAttribute('id') . '/';
foreach ($theme->getFields() as $field) {
if (!($field instanceof Files)) {
continue;
*/
public function updatefromws2(Request $request, $id)
{
+ FluidbookTheme::$updateWS2SyncViewOnChange = true;
$theme = FluidbookTheme::find($id);
self::_prepareData($theme, $request->get('data'));
$theme->save();
public function clonefromws2(Request $request, $id)
{
+ FluidbookTheme::$updateWS2SyncViewOnChange = true;
$theme = FluidbookTheme::find($id);
$newtheme = $theme->replicate();
$newtheme->name .= ' (copy)';
public function renamefromws2(Request $request, $id)
{
+ FluidbookTheme::$updateWS2SyncViewOnChange = true;
$theme = FluidbookTheme::find($id);
$theme->name = $request->get('newname');
$theme->save();
public function deletefromws2(Request $request, $id)
{
+ FluidbookTheme::$updateWS2SyncViewOnChange = true;
/** @var FluidbookTheme $theme */
$theme = FluidbookTheme::find($id);
$theme->delete();
public function uploadfile(Request $request, $id, $fieldname)
{
+ FluidbookTheme::$updateWS2SyncViewOnChange = true;
/** @var FluidbookTheme $theme */
$theme = FluidbookTheme::find($id);
$theme->addMediaToField($fieldname, $request->get('path'), true);
protected $_enableTrackNonDefaultValues = true;
public static $updateWS2ViewOnChange = true;
+ public static $updateWS2SyncViewOnChange = false;
public function setFields()
{
{
if (self::$updateWS2ViewOnChange) {
if (null !== $id) {
- start_measure('update_theme_table', 'Update ws2 theme');
- dispatch(new UpdateWS2ThemeTable($id))->onConnection('sync');
- stop_measure('update_theme_table');
+ $job = new UpdateWS2ThemeTable($id);
+ if (self::$updateWS2SyncViewOnChange) {
+ dispatch($job);
+ } else {
+ dispatch_sync($job);
+ }
}
dispatch(new UpdateWS2ThemeTable('all'))->onQueue('theme');
}
|
*/
- 'timezone' => 'UTC',
+ 'timezone' => env('TIMEZONE', 'UTC'),
/*
|--------------------------------------------------------------------------
* Copyright 2019, Noël Raoul Bossart (http://www.noelboss.com)
* MIT Licensed.
**/
-html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}}
\ No newline at end of file
+html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:0;border-bottom:0;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}}
}
}
-.featherlight .featherlight-content {
- @media only screen and (max-width: 1024px) {
- border: 0;
- padding: 0;
- min-width: 100%;
- width: 100%;
- max-width: 100%;
- min-height: 100%;
- height: 100%;
- max-height: 100%;
- }
-
- .featherlight-inner {
- @media only screen and (max-width: 1024px) {
- width: 100%;
- height: 100%;
- }
- }
-}
+//.featherlight .featherlight-content {
+// @media only screen and (max-width: 1024px) {
+// border: 0;
+// padding: 0;
+// min-width: 100%;
+// width: 100%;
+// max-width: 100%;
+// min-height: 100%;
+// height: 100%;
+// max-height: 100%;
+// }
+//
+// .featherlight-inner {
+// @media only screen and (max-width: 1024px) {
+// width: 100%;
+// height: 100%;
+// }
+// }
+//}
@import "tools";
// Reload theme viewer after editor has been closed
var iframe = $('.themeSelector #themePreviewIframe');
iframe.get(0).contentWindow.location = $(iframe).attr('src');
- console.log('reload preview theme');
+ updateThemeSelector();
}
return;
}
function updateThemeSelector() {
var themeID = $(selector).val();
+ if (null === themeID || themeID === undefined) {
+ setTimeout(updateThemeSelector, 500);
+ return;
+ }
var iframe = $('.themeSelector .preview iframe');
$(iframe).attr('src', $(iframe).data('url').replace(/\$id/, themeID));
$(".themeSelector .actions a").each(function () {
$(".themeSelector .actions .owner").html(htmlDecode(data.columns.owner));
$(".themeSelector .actions .created_at").html(data.columns.created_at);
$(".themeSelector .actions .updated_at").html(data.columns.updated_at);
+ $('.themeSelector options[value="' + themeID + '"]').each(function () {
+ $(this).text(data.name + ' (#' + themeID + ')');
+ });
}
});
}