mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-13 02:37:57 +01:00
Fix public view style
This commit is contained in:
parent
94367c6e5e
commit
246d4ed538
@ -16,7 +16,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import $ from 'jquery';
|
||||
import { Mindmap } from '..';
|
||||
import PersistenceManager from './PersistenceManager';
|
||||
|
||||
class LocalStorageManager extends PersistenceManager {
|
||||
@ -64,7 +63,7 @@ class LocalStorageManager extends PersistenceManager {
|
||||
return $.parseXML(xml);
|
||||
}
|
||||
|
||||
unlockMap(mindmap: Mindmap) {
|
||||
unlockMap(): void {
|
||||
// Ignore, no implementation required ...
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ abstract class PersistenceManager {
|
||||
|
||||
abstract saveMapXml(mapId: string, mapXml: Document, pref?, saveHistory?: boolean, events?);
|
||||
|
||||
abstract unlockMap(mindmap: Mindmap): void;
|
||||
abstract unlockMap(mapId: string): void;
|
||||
|
||||
static init = (instance: PersistenceManager) => {
|
||||
this._instance = instance;
|
||||
|
@ -17,7 +17,6 @@
|
||||
*/
|
||||
import { $assert } from '@wisemapping/core-js';
|
||||
import $ from 'jquery';
|
||||
import { Mindmap } from '..';
|
||||
import { $msg } from './Messages';
|
||||
import PersistenceManager from './PersistenceManager';
|
||||
|
||||
@ -132,8 +131,7 @@ class RESTPersistenceManager extends PersistenceManager {
|
||||
});
|
||||
}
|
||||
|
||||
unlockMap(mindmap: Mindmap) {
|
||||
const mapId = mindmap.getId();
|
||||
unlockMap(mapId: string):void {
|
||||
fetch(
|
||||
this.lockUrl.replace('{id}', mapId),
|
||||
{
|
||||
|
@ -70,7 +70,11 @@ class IMenu {
|
||||
unlockMap(designer: Designer) {
|
||||
const mindmap = designer.getMindmap();
|
||||
const persistenceManager = PersistenceManager.getInstance();
|
||||
persistenceManager.unlockMap(mindmap);
|
||||
|
||||
// If the map could not be loaded, partial map load could happen.
|
||||
if (mindmap) {
|
||||
persistenceManager.unlockMap(mindmap.getId());
|
||||
}
|
||||
}
|
||||
|
||||
save(saveElem: JQuery, designer: Designer, saveHistory: boolean) {
|
||||
|
@ -57,7 +57,7 @@ class Menu extends IMenu {
|
||||
return result;
|
||||
},
|
||||
|
||||
setValue(value) {
|
||||
setValue(value: string) {
|
||||
designer.changeFontFamily(value);
|
||||
},
|
||||
};
|
||||
|
@ -12,12 +12,12 @@ import FormControl from '@mui/material/FormControl';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import TabContext from '@mui/lab/TabContext';
|
||||
import AppBar from '@mui/material/AppBar';
|
||||
import TabList from '@mui/lab/TabList';
|
||||
import Tab from '@mui/material/Tab';
|
||||
import TabPanel from '@mui/lab/TabPanel';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
||||
import Box from '@mui/system/Box';
|
||||
|
||||
const PublishDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement => {
|
||||
const { map } = fetchMapById(mapId);
|
||||
@ -100,25 +100,25 @@ const PublishDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElemen
|
||||
|
||||
<div style={!model ? { visibility: 'hidden' } : {}}>
|
||||
<TabContext value={activeTab}>
|
||||
<AppBar position="static">
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<TabList onChange={handleTabChange}>
|
||||
<Tab
|
||||
label={intl.formatMessage({
|
||||
id: 'publish.embedded',
|
||||
defaultMessage: 'Embedded',
|
||||
})}
|
||||
value="1"
|
||||
/>
|
||||
<Tab
|
||||
label={intl.formatMessage({
|
||||
id: 'publish.public-url',
|
||||
defaultMessage: 'Public URL',
|
||||
})}
|
||||
value="1"
|
||||
/>
|
||||
<Tab
|
||||
label={intl.formatMessage({
|
||||
id: 'publish.embedded',
|
||||
defaultMessage: 'Embedded',
|
||||
})}
|
||||
value="2"
|
||||
/>
|
||||
</TabList>
|
||||
</AppBar>
|
||||
<TabPanel value="1">
|
||||
</Box>
|
||||
<TabPanel value="2">
|
||||
<Typography variant="subtitle2">
|
||||
<FormattedMessage
|
||||
id="publish.embedded-msg"
|
||||
@ -133,7 +133,7 @@ const PublishDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElemen
|
||||
defaultValue={`<iframe style="width:600px;height:400px;border:1px solid black" src="https://app.wisemapping.com/c/maps/${mapId}/embed?zoom=1.0"></iframe>`}
|
||||
/>
|
||||
</TabPanel>
|
||||
<TabPanel value="2">
|
||||
<TabPanel value="1">
|
||||
<Typography variant="subtitle2">
|
||||
<FormattedMessage
|
||||
id="publish.public-url-msg"
|
||||
|
Loading…
Reference in New Issue
Block a user