Mosaico upgraded to 0.17.5

Work started on confirmation dialogs displayed when one navigates from a page with unsaved changes
This commit is contained in:
Tomas Bures 2019-05-08 19:54:19 +02:00
parent 4f77272042
commit 48dcf2c701
399 changed files with 4032 additions and 77702 deletions

View file

@ -27,6 +27,7 @@
"datatables.net": "^1.10.19",
"datatables.net-bs4": "^1.10.19",
"ellipsize": "^0.1.0",
"fast-deep-equal": "^2.0.1",
"grapesjs": "^0.14.49",
"grapesjs-mjml": "0.0.31",
"grapesjs-preset-newsletter": "^0.2.20",
@ -34,7 +35,7 @@
"i18next": "^13.1.0",
"i18next-browser-languagedetector": "^2.2.4",
"immutable": "^4.0.0-rc.12",
"juice": "^5.1.0",
"juice": "^5.2.0",
"lodash": "^4.17.11",
"mjml4-in-browser": "^1.1.1",
"moment": "^2.23.0",

View file

@ -776,8 +776,8 @@ export default class CUD extends Component {
:
<>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(CUD.AfterSubmitAction.LEAVE)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and go to status')} onClickAsync={async () => this.submitHandler(CUD.AfterSubmitAction.STATUS)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(CUD.AfterSubmitAction.LEAVE)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and go to status')} onClickAsync={async () => await this.submitHandler(CUD.AfterSubmitAction.STATUS)}/>
</>
}
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/campaigns/${this.props.entity.id}/delete`}/> }

View file

@ -263,8 +263,8 @@ export default class CustomContent extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(CustomContent.AfterSubmitAction.LEAVE)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and go to status')} onClickAsync={async () => this.submitHandler(CustomContent.AfterSubmitAction.STATUS)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(CustomContent.AfterSubmitAction.LEAVE)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and go to status')} onClickAsync={async () => await this.submitHandler(CustomContent.AfterSubmitAction.STATUS)}/>
<Button className="btn-success" icon="at" label={t('testSend')} onClickAsync={async () => this.setState({showTestSendModal: true})}/>
</ButtonRow>
</Form>

View file

@ -252,7 +252,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{isEdit && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/campaigns/${this.props.campaign.id}/triggers/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -301,7 +301,7 @@ export class ModalDialog extends Component {
buttons = [];
for (let idx = 0; idx < this.props.buttons.length; idx++) {
const buttonSpec = this.props.buttons[idx];
const button = <Button key={idx} label={buttonSpec.label} className={buttonSpec.className} onClickAsync={async () => this.onButtonClick(idx)} />
const button = <Button key={idx} label={buttonSpec.label} className={buttonSpec.className} onClickAsync={async () => await this.onButtonClick(idx)} />
buttons.push(button);
}
}

View file

@ -12,6 +12,7 @@ import {TreeSelectMode, TreeTable} from './tree';
import {Table, TableSelectMode} from './table';
import {Button} from "./bootstrap-components";
import {SketchPicker} from 'react-color';
import deepEqual from "fast-deep-equal";
import ACEEditorRaw from 'react-ace';
import 'brace/theme/github';
@ -49,11 +50,20 @@ export const FormStateOwnerContext = React.createContext(null);
const withFormStateOwner = createComponentMixin([{context: FormStateOwnerContext, propName: 'formStateOwner'}], [], (TargetClass, InnerClass) => {
InnerClass.prototype.getFormStateOwner = function() {
return this.props.formStateOwner;
}
};
return {};
});
export function withFormErrorHandlers(target, name, descriptor) {
const asyncFn = descriptor.value;
descriptor.value = async function(...args) {
await this.formHandleErrors(async () => await asyncFn.apply(this, args));
};
return descriptor;
}
@withComponentMixins([
withTranslation,
@ -61,6 +71,15 @@ const withFormStateOwner = createComponentMixin([{context: FormStateOwnerContext
withPageHelpers
])
class Form extends Component {
constructor(props) {
super(props);
this.beforeUnloadHandlers = {
handler: () => this.props.stateOwner.isFormChanged(),
handlerAsync: async () => await this.props.stateOwner.isFormChangedAsync()
};
}
static propTypes = {
stateOwner: PropTypes.object.isRequired,
onSubmitAsync: PropTypes.func,
@ -68,6 +87,14 @@ class Form extends Component {
noStatus: PropTypes.bool
}
componentDidMount() {
this.registerBeforeUnloadHandlers(this.beforeUnloadHandlers);
}
componentWillUnmount() {
this.deregisterBeforeUnloadHandlers(this.beforeUnloadHandlers);
}
@withAsyncErrorHandler
async onSubmit(evt) {
const t = this.props.t;
@ -77,7 +104,7 @@ class Form extends Component {
evt.preventDefault();
if (this.props.onSubmitAsync) {
await owner.formHandleChangedError(async () => await this.props.onSubmitAsync());
await this.props.onSubmitAsync();
}
}
@ -952,6 +979,7 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
isDisabled: false,
statusMessageText: '',
data: Immutable.Map(),
savedData: Immutable.Map(),
isServerValidationRunning: false
});
@ -1061,12 +1089,14 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
});
};
proto.getFormValuesFromEntity = function(entity, mutator) {
proto.getFormValuesFromEntity = function(entity) {
const settings = this.state.formSettings;
const data = Object.assign({}, entity);
data.originalHash = data.hash;
delete data.hash;
const mutator = settings.loadMutator;
if (mutator) {
mutator(data);
}
@ -1074,7 +1104,8 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
this.populateFormValues(data);
};
proto.getFormValuesFromURL = async function(url, mutator) {
proto.getFormValuesFromURL = async function(url) {
const settings = this.state.formSettings;
setTimeout(() => {
this.setState(previousState => {
if (previousState.formState.get('state') === FormState.Loading) {
@ -1092,6 +1123,7 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
data.originalHash = data.hash;
delete data.hash;
const mutator = settings.loadMutator;
if (mutator) {
const newData = mutator(data);
@ -1103,12 +1135,26 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
this.populateFormValues(data);
};
proto.validateAndSendFormValuesToURL = async function(method, url, mutator) {
proto.validateAndSendFormValuesToURL = async function(method, url) {
const settings = this.state.formSettings;
await this.waitForFormServerValidated();
if (this.isFormWithoutErrors()) {
if (settings.getPreSubmitUpdater) {
const preSubmitUpdater = await settings.getPreSubmitUpdater();
await new Promise((resolve, reject) => {
this.setState(previousState => ({
formState: previousState.formState.withMutations(mutState => {
mutState.update('data', stateData => stateData.withMutations(preSubmitUpdater));
})
}), resolve);
});
}
let data = this.getFormValues();
const mutator = settings.submitMutator;
if (mutator) {
const newData = mutator(data);
if (newData !== undefined) {
@ -1118,6 +1164,12 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
const response = await axios.method(method, getUrl(url), data);
await new Promise((resolve, reject) => {
this.setState(previousState => ({
formState: previousState.formState.set('savedData', previousState.formState.get('data'))
}), resolve);
});
return response.data || true;
} else {
@ -1140,6 +1192,8 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
}
}));
mutState.set('savedData', mutState.get('data'));
validateFormState(this, mutState);
})
}));
@ -1263,6 +1317,57 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
return this.state.formState.get('state') === FormState.Ready;
};
const _isFormChanged = self => {
const settings = self.state.formSettings;
const mutateData = data => {
if (settings.submitMutator) {
const newData = settings.submitMutator(data);
if (newData !== undefined) {
data = newData;
}
}
return data;
};
const currentData = mutateData(self.state.formState.get('data').map(attr => attr.get('value')).toJS());
const savedData = mutateData(self.state.formState.get('savedData').map(attr => attr.get('value')).toJS());
return !deepEqual(currentData, savedData);
};
proto.isFormChanged = function() {
const settings = this.state.formSettings;
if (settings.getPreSubmitUpdater) {
// getPreSubmitUpdater is an async function. We cannot do anything async here. So to be on the safe side,
// we simply assume that the form has been changed.
return true;
}
return _isFormChanged(this);
};
proto.isFormChangedAsync = async function() {
const settings = this.state.formSettings;
if (settings.getPreSubmitUpdater) {
const preSubmitUpdater = await settings.getPreSubmitUpdater();
await new Promise((resolve, reject) => {
this.setState(previousState => ({
formState: previousState.formState.withMutations(mutState => {
mutState.update('data', stateData => stateData.withMutations(preSubmitUpdater));
})
}), resolve);
});
}
return _isFormChanged(this);
};
proto.isFormValidationShown = function() {
return this.state.formState.get('isValidationShown');
};
@ -1341,7 +1446,7 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
return this.state.formState.get('isDisabled');
};
proto.formHandleChangedError = async function(fn) {
proto.formHandleErrors = async function(fn) {
const t = this.props.t;
try {
await fn();
@ -1386,6 +1491,23 @@ const withForm = createComponentMixin([], [], (TargetClass, InnerClass) => {
return {};
});
function filterData(obj, allowedKeys) {
const result = {};
for (const key in obj) {
if (key === 'originalHash') {
result[key] = obj[key];
} else {
for (const allowedKey of allowedKeys) {
if ((typeof allowedKey === 'function' && allowedKey(key)) || allowedKey === key) {
result[key] = obj[key];
break;
}
}
}
}
return result;
}
export {
withForm,
@ -1407,5 +1529,6 @@ export {
TableSelect,
TableSelectMode,
ACEEditor,
FormSendMethod
FormSendMethod,
filterData
}

View file

@ -90,7 +90,7 @@ export class RestActionModalDialog extends Component {
return (
<ModalDialog hidden={!this.props.visible} title={this.props.title} onCloseAsync={() => this.hideModal(true)} buttons={[
{ label: t('no'), className: 'btn-primary', onClickAsync: async () => this.hideModal(true) },
{ label: t('no'), className: 'btn-primary', onClickAsync: async () => await this.hideModal(true) },
{ label: t('yes'), className: 'btn-danger', onClickAsync: ::this.performAction }
]}>
{this.props.message}

View file

@ -3,7 +3,6 @@
import React, {Component} from "react";
import PropTypes from "prop-types";
import {Redirect, Route, Switch} from "react-router-dom";
import {withRouter} from "react-router";
import {withAsyncErrorHandler, withErrorHandling} from "./error-handling";
import axios from "../lib/axios";
import {getUrl} from "./urls";
@ -362,15 +361,23 @@ export const withPageHelpers = createComponentMixin([{context: SectionContentCon
InnerClass.prototype.navigateTo = function(path) {
return this.props.sectionContent.navigateTo(path);
}
};
InnerClass.prototype.navigateBack = function() {
return this.props.sectionContent.navigateBack();
}
};
InnerClass.prototype.navigateToWithFlashMessage = function(path, severity, text) {
return this.props.sectionContent.navigateToWithFlashMessage(path, severity, text);
}
};
InnerClass.prototype.registerBeforeUnloadHandlers = function(handlers) {
return this.props.sectionContent.registerBeforeUnloadHandlers(handlers);
};
InnerClass.prototype.deregisterBeforeUnloadHandlers = function(handlers) {
return this.props.sectionContent.deregisterBeforeUnloadHandlers(handlers);
};
return {};
});

View file

@ -331,11 +331,41 @@ class PanelRoute extends Component {
}
export class BeforeUnloadListeners {
constructor() {
this.listeners = new Set();
}
register(listener) {
this.listeners.add(listener);
}
deregister(listener) {
this.listeners.delete(listener);
}
shouldUnloadBeCancelled() {
for (const lst of this.listeners) {
if (lst.handler()) return true;
}
return false;
}
async shouldUnloadBeCancelledAsync() {
for (const lst of this.listeners) {
if (await lst.handlerAsync()) return true;
}
return false;
}
}
@withRouter
@withComponentMixins([
withTranslation,
withErrorHandling
])
], ['onNavigationConfirmationDialog'])
export class SectionContent extends Component {
constructor(props) {
super(props);
@ -348,6 +378,10 @@ export class SectionContent extends Component {
// noinspection JSIgnoredPromiseFromCall
this.closeFlashMessage();
});
this.beforeUnloadListeners = new BeforeUnloadListeners();
this.beforeUnloadHandler = ::this.onBeforeUnload;
this.historyUnblock = null;
}
static propTypes = {
@ -355,6 +389,34 @@ export class SectionContent extends Component {
root: PropTypes.string.isRequired
}
onBeforeUnload(event) {
if (this.beforeUnloadListeners.shouldUnloadBeCancelled()) {
event.preventDefault();
event.returnValue = '';
}
}
onNavigationConfirmationDialog(message, callback) {
this.beforeUnloadListeners.shouldUnloadBeCancelledAsync().then(res => {
if (res) {
const allowTransition = window.confirm(message);
callback(allowTransition);
} else {
callback(true);
}
});
}
componentDidMount() {
window.addEventListener('beforeunload', this.beforeUnloadHandler);
this.historyUnblock = this.props.history.block('Changes you made may not be saved. Are you sure you want to leave this page?');
}
componentWillUnmount() {
window.removeEventListener('beforeunload', this.beforeUnloadHandler);
this.historyUnblock();
}
setFlashMessage(severity, text) {
this.setState({
flashMessageText: text,
@ -381,6 +443,14 @@ export class SectionContent extends Component {
}
}
registerBeforeUnloadHandlers(handlers) {
this.beforeUnloadListeners.register(handlers);
}
deregisterBeforeUnloadHandlers(handlers) {
this.beforeUnloadListeners.deregister(handlers);
}
errorHandler(error) {
if (error instanceof interoperableErrors.NotLoggedInError) {
if (window.location.pathname !== '/login') { // There may be multiple async requests failing at the same time. So we take the pathname only from the first one.
@ -440,6 +510,8 @@ export class SectionContent extends Component {
export class Section extends Component {
constructor(props) {
super(props);
this.getUserConfirmationHandler = ::this.onGetUserConfirmation;
this.sectionContent = null;
}
static propTypes = {
@ -447,6 +519,10 @@ export class Section extends Component {
root: PropTypes.string.isRequired
}
onGetUserConfirmation(message, callback) {
this.sectionContent.onNavigationConfirmationDialog(message, callback);
}
render() {
let structure = this.props.structure;
if (typeof structure === 'function') {
@ -454,8 +530,8 @@ export class Section extends Component {
}
return (
<Router basename={getBaseDir()}>
<SectionContent root={this.props.root} structure={structure} />
<Router basename={getBaseDir()} getUserConfirmation={this.getUserConfirmationHandler}>
<SectionContent wrappedComponentRef={node => this.sectionContent = node} root={this.props.root} structure={structure} />
</Router>
);
}

View file

@ -13,6 +13,7 @@ import {base, unbase} from "../../../shared/templates";
import {withComponentMixins} from "./decorator-helpers";
import juice from "juice";
@withComponentMixins([
withTranslation
])
@ -56,7 +57,8 @@ class MosaicoSandbox extends Component {
...
</div>
*/
const html = juice(this.viewModel.exportHTML());
let html = this.viewModel.exportHTML();
html = juice(html);
return {
html: unbase(html, trustedUrlBase, sandboxUrlBase, publicUrlBase, true),
@ -99,7 +101,7 @@ class MosaicoSandbox extends Component {
plugins.unshift(vm => {
// This is an override of the default paths in Mosaico
vm.logoPath = getTrustedUrl('static/mosaico/img/mosaico32.png');
vm.logoPath = getTrustedUrl('static/mosaico/rs/img/mosaico32.png');
vm.logoUrl = '#';
});

View file

@ -15,7 +15,7 @@ import {
Button,
ButtonRow,
CheckBox,
Dropdown,
Dropdown, filterData,
Form,
FormSendMethod,
InputField,
@ -51,7 +51,10 @@ export default class CUD extends Component {
this.state = {};
this.initForm();
this.initForm({
loadMutator: ::this.getFormValuesMutator,
submitMutator: ::this.submitFormValuesMutator
});
this.mailerTypes = getMailerTypes(props.t);
}
@ -66,9 +69,21 @@ export default class CUD extends Component {
data.listunsubscribe_disabled = !!data.listunsubscribe_disabled;
}
submitFormValuesMutator(data) {
if (data.form === 'default') {
data.default_form = null;
}
if (data.fieldWizard === FieldWizard.FIRST_LAST_NAME || data.fieldWizard === FieldWizard.NAME) {
data.to_name = null;
}
return filterData(data, ['name', 'description', 'default_form', 'public_subscribe', 'unsubscription_mode', 'contact_email', 'homepage', 'namespace', 'to_name', 'listunsubscribe_disabled', 'send_configuration']);
}
componentDidMount() {
if (this.props.entity) {
this.getFormValuesFromEntity(this.props.entity, ::this.getFormValuesMutator);
this.getFormValuesFromEntity(this.props.entity);
} else {
this.populateFormValues({
@ -128,23 +143,14 @@ export default class CUD extends Component {
this.disableForm();
this.setFormStatusMessage('info', t('saving'));
const submitResult = await this.validateAndSendFormValuesToURL(sendMethod, url, data => {
if (data.form === 'default') {
data.default_form = null;
}
delete data.form;
if (data.fieldWizard === FieldWizard.FIRST_LAST_NAME || data.fieldWizard === FieldWizard.NAME) {
data.to_name = null;
}
});
const submitResult = await this.validateAndSendFormValuesToURL(sendMethod, url);
if (submitResult) {
if (this.props.entity) {
if (submitAndLeave) {
this.navigateToWithFlashMessage('/lists', 'success', t('List updated'));
} else {
await this.getFormValuesFromURL(`rest/lists/${this.props.entity.id}`, ::this.getFormValuesMutator);
await this.getFormValuesFromURL(`rest/lists/${this.props.entity.id}`);
this.enableForm();
this.setFormStatusMessage('success', t('List updated'));
}
@ -288,7 +294,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/lists/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -525,7 +525,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{isEdit && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/lists/${this.props.list.id}/fields/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -549,7 +549,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/lists/forms/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -404,8 +404,8 @@ export default class CUD extends Component {
<hr/>
<ButtonRow format="wide" className={`col-12 ${styles.toolbar}`}>
<Button type="submit" className="btn-primary" icon="check" label={t('save')} onClickAsync={async () => this.submitHandler(false)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('save')} onClickAsync={async () => await this.submitHandler(false)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{isEdit && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/lists/${this.props.list.id}/segments/${this.props.entity.id}/delete`}/> }
</ButtonRow>

View file

@ -239,7 +239,7 @@ export default class CUD extends Component {
}
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{isEdit && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/lists/${this.props.list.id}/subscriptions/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -222,7 +222,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/namespaces/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -292,7 +292,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete &&
<LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/reports/${this.props.entity.id}/delete`}/>
}

View file

@ -326,7 +326,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete &&
<LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/reports/templates/${this.props.entity.id}/delete`}/>
}

View file

@ -265,7 +265,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete &&
<LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/send-configurations/${this.props.entity.id}/delete`}/>
}

View file

@ -93,9 +93,13 @@ export default class UserShares extends Component {
{renderSharesTable('namespace', t('namespaces'))}
{renderSharesTable('list', t('lists'))}
{renderSharesTable('template', t('Templates'))}
{renderSharesTable('mosaicoTemplate', t('Mosaico Templates'))}
{renderSharesTable('campaign', t('Campaigns'))}
{renderSharesTable('customForm', t('customForms-1'))}
{renderSharesTable('report', t('reports'))}
{renderSharesTable('reportTemplate', t('reportTemplates'))}
{renderSharesTable('sendConfiguration', t('Send Configurations'))}
</div>
);
}

View file

@ -8,14 +8,14 @@ import {
Button,
ButtonRow,
CheckBox,
Dropdown,
Dropdown, filterData,
Form,
FormSendMethod,
InputField,
StaticField,
TableSelect,
TextArea,
withForm
withForm, withFormErrorHandlers
} from '../lib/form';
import {withErrorHandling} from '../lib/error-handling';
import {NamespaceSelect, validateNamespace} from '../lib/namespace';
@ -28,6 +28,7 @@ import {getUrl} from "../lib/urls";
import {TestSendModalDialog} from "./TestSendModalDialog";
import {withComponentMixins} from "../lib/decorator-helpers";
import moment from 'moment';
import {FieldWizard} from "../../../shared/lists";
@withComponentMixins([
@ -53,6 +54,9 @@ export default class CUD extends Component {
};
this.initForm({
loadMutator: ::this.getFormValuesMutator,
submitMutator: ::this.submitFormValuesMutator,
getPreSubmitUpdater: ::this.getPreSubmitFormValuesUpdater,
onChangeBeforeValidation: {
type: ::this.onTypeChanged
}
@ -83,9 +87,28 @@ export default class CUD extends Component {
this.templateTypes[data.type].afterLoad(data);
}
submitFormValuesMutator(data) {
this.templateTypes[data.type].beforeSave(data);
return filterData(data, ['name', 'description', 'type', 'data', 'html', 'text', 'namespace']);
}
async getPreSubmitFormValuesUpdater() {
let exportedData = {};
if (this.props.entity) {
const typeKey = this.getFormValue('type');
exportedData = await this.templateTypes[typeKey].exportHTMLEditorData(this);
}
return mutStateData => {
for (const key in exportedData) {
mutStateData.setIn([key, 'value'], exportedData[key]);
}
};
}
componentDidMount() {
if (this.props.entity) {
this.getFormValuesFromEntity(this.props.entity, ::this.getFormValuesMutator);
this.getFormValuesFromEntity(this.props.entity);
} else {
this.populateFormValues({
@ -138,15 +161,10 @@ export default class CUD extends Component {
await this.submitHandler();
}
@withFormErrorHandlers
async submitHandler(submitAndLeave) {
const t = this.props.t;
let exportedData = {};
if (this.props.entity) {
const typeKey = this.getFormValue('type');
exportedData = await this.templateTypes[typeKey].exportHTMLEditorData(this);
}
let sendMethod, url;
if (this.props.entity) {
sendMethod = FormSendMethod.PUT;
@ -159,17 +177,14 @@ export default class CUD extends Component {
this.disableForm();
this.setFormStatusMessage('info', t('saving'));
const submitResult = await this.validateAndSendFormValuesToURL(sendMethod, url, data => {
Object.assign(data, exportedData);
this.templateTypes[data.type].beforeSave(data);
});
const submitResult = await this.validateAndSendFormValuesToURL(sendMethod, url);
if (submitResult) {
if (this.props.entity) {
if (submitAndLeave) {
this.navigateToWithFlashMessage('/templates', 'success', t('Template updated'));
} else {
await this.getFormValuesFromURL(`rest/templates/${this.props.entity.id}`, ::this.getFormValuesMutator);
await this.getFormValuesFromURL(`rest/templates/${this.props.entity.id}`);
this.enableForm();
this.setFormStatusMessage('success', t('Template updated'));
}
@ -338,7 +353,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
{isEdit && <Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>}
{isEdit && <Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>}
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/templates/${this.props.entity.id}/delete`}/> }
{isEdit && <Button className="btn-success" icon="at" label={t('testSend')} onClickAsync={async () => this.setState({showTestSendModal: true})}/> }
</ButtonRow>

View file

@ -199,7 +199,7 @@ export function getTemplateTypes(t, prefix = '', entityTypeId = ResourceType.TEM
entity={owner.props.entity}
initialModel={owner.getFormValue(prefix + 'mosaicoData').model}
initialMetadata={owner.getFormValue(prefix + 'mosaicoData').metadata}
templatePath={getSandboxUrl(`static/mosaico/templates/${owner.getFormValue(prefix + 'mosaicoFsTemplate')}/index.html`)}
templatePath={getSandboxUrl(`static/mosaico/templates/${owner.getFormValue(prefix + 'mosaicoFsTemplate')}/template-${owner.getFormValue(prefix + 'mosaicoFsTemplate')}.html`)}
entityTypeId={entityTypeId}
title={t('mosaicoTemplateDesigner')}
onSave={::owner.save}

View file

@ -205,7 +205,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('delete')} to={`/templates/mosaico/${this.props.entity.id}/delete`}/>}
{isEdit && typeKey && this.templateTypes[typeKey].getButtons(this)}
</ButtonRow>

View file

@ -265,7 +265,7 @@ export default class CUD extends Component {
<ButtonRow>
<Button type="submit" className="btn-primary" icon="check" label={t('Save')}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => this.submitHandler(true)}/>
<Button type="submit" className="btn-primary" icon="check" label={t('Save and leave')} onClickAsync={async () => await this.submitHandler(true)}/>
{canDelete && <LinkButton className="btn-danger" icon="trash-alt" label={t('deleteUser')} to={`/users/${this.props.entity.id}/delete`}/>}
</ButtonRow>
</Form>

View file

@ -0,0 +1,680 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
ADDITIONAL LICENSES
This product may include third party code/libraries, see NOTICE.txt for details
on their licensing and copyright.

View file

@ -0,0 +1,100 @@
---------------------
Built-in Dependencies
---------------------
These dependencies are included in the distributed Mosaico library
dist/mosaico.min.js and dist/mosaico.min.css
by an aggregator process named "Browserify"
Browserify (Library "Assembler" targeting the browser):
- MIT License, Copyright Joyent, Inc. and other Node contributors.
> os-browserify:
- MIT License, Copyright (c) 2014 Drew Young
> assert:
- MIT License, Copyright (c) shtylman <shtylman@gmail.com>
> util:
- MIT License, Copyright (c) Joyent (http://www.joyent.com)
> inherit:
- ISC License, Copyright (c) Isaac Z. Schlueter
> process:
- MIT License, Copyright (c) 2013 Roman Shtylman <shtylman@gmail.com>
> console-browserify:
- MIT License, Copyright (c) 2012 Raynos <raynos2@gmail.com>
Knockout-Sortable (Knockout Bindings to jQueryUI Sortable):
- MIT License, Copyright (c) 2015 Ryan Niemeyer
Knockout-UndoManager (Undo Library):
- MIT License, Copyright (c) 2015 Stefano Bagnara
Knockout-Reactor (Knockout value tracking used by Knockout-UndoManager):
- MIT License, Copyright (c) Ziad Jeeroburkhan
TinyColor (Color manipulation library):
- MIT License, Copyright (c) Brian Grinstead <briangrinstead@gmail.com>
(http://briangrinstead.com)",
Toastr (Toast notifications):
- MIT License, Copyright (c) 2012-2015 John Papa, Hans Fjällemark, and Tim Ferrell
Evol-Colorpicker (Color picker):
- MIT License, Copyright (c) 2015 Olivier Giulieri
Juice (CSS Inliner):
- MIT License, Copyright (c) Guillermo Rauch, Arian Stolwijk, Pawel Marzec,
Andrew Kelley, Francois-Guillaume Ribreau
Slick (selector parser used by Juice):
- MIT License, Copyright (c) Shashank Mehta <me@shashankmehta.in>
(http://shashankmehta.in)
JSEP (expression engine):
- MIT License, Copyright (c) Stephen Oney <swloney@gmail.com> (http://from.so/)
Mensch (CSS parser used by Mosaico and Juice):
- MIT License, Copyright (c) Brett Stimmerman <brettstimmerman@gmail.com>
----------------------------
Runtime Bundled Dependencies
----------------------------
res/lang (Language Files):
- CC-BY-4.0 License, Copyright (c) Translation contributors listed at res/lang/README.md
res/vendor/skins (Custom TinyMCE Skin):
- GPL v2.1 License
res/img (Proprietary image resources):
- GPLv3 License
-----------------------------
Runtime External Dependencies
-----------------------------
These dependencies are not included in Mosaico but are used at runtime and are
expected to be found in the running environment (browser)
jQuery, jQueryUI:
- MIT License
Knockout:
- MIT License
Knockout-jQueryUI:
- MIT License
jQuery-File-Upload:
- MIT License
--------------------------------------
Runtime External Optional Dependencies
--------------------------------------
Font NotoSans (in order to enable "Material style" font face):
- Apache License, version 2.0
jQuery UI Touch Punch (to support touch events in addition to mouse events):
- MIT License
TinyMCE v4.x (to support WYSIWYG contextual editing of text):
- LGPL v2.1

View file

@ -0,0 +1,72 @@
# Mosaico - Responsive Email Template Editor
Mosaico is a JavaScript library (or maybe a single page application) supporting the editing of email templates.
The great thing is that Mosaico itself does not define what you can edit or what styles you can change: this is defined by the template. This makes Mosaico very flexible.
![Mosaico Screenshot](res/img/screenshot.png)
At this time we provide a single "production ready" template to illustrate some best practice examples: more templates will come soon! Have a look at [Template Language](https://github.com/voidlabs/mosaico/wiki/Template-language) and get in touch with us if you want to make your email html template "Mosaico ready".
### Live demo
On https://mosaico.io you can see a live demo of Mosaico: the live deploy has a custom backend (you don't see it) and some customization (custom Moxiemanager integration for image editing, customized onboarding slideshow, contextual menu, and some other small bits), but 95% of what you see is provided by this opensource library. You will also see a second working template there (versafluid) that is not part of the opensource distribution.
#### News
Subscribe to our newsletter to get updates: https://mosaico.voxmail.it/user/register
### More Docs from the Wiki
[Mosaico Basics](https://github.com/voidlabs/mosaico/wiki)
[Developer Notes](https://github.com/voidlabs/mosaico/wiki/Developers)
### Build/Run with the development backend [![Build Status](https://travis-ci.org/voidlabs/mosaico.svg)](https://travis-ci.org/voidlabs/mosaico)
You need NodeJS v6.0 or higher + ImageMagick
Download/install the dependencies (run again if you get an error, as it probably is a race issues in npm)
```
npm install
```
if you don't have it, install grunt-cli globally
```
npm install -g grunt-cli
```
compile and run a local webserver (http://127.0.0.1:9006) with incremental build and livereload
```
grunt
```
*IMPORTANT* in order to use image uploading/processing feature in Node you need imageMagick installed in your environment.
e.g. running "convert" and "identify" on the command line should output imageMagick command line help (if you are on Windows and install imageMagick 7.x then make sure to install ["legacy utilities"](https://github.com/aheckmann/gm/issues/559)).
*NOTE* we have reports that default Ubuntu node package have issues with building Mosaico via Grunt. If you see a ```Fatal error: watch ENOSPC``` then have a look at https://github.com/voidlabs/mosaico/issues/82
### Docker
We bundle a Dockerfile based on Alpine linux and another based on Centos 7 to test mosaico with no need to install dependencies.
```
docker build -t mosaico/mosaico .
docker run -p 9006:9006 mosaico/mosaico
```
then open a browser to point to the port 9006 of your docker machine IP.
### Deploying Mosaico via Apache PHP or Django or something else?
First you have to build it using grunt, then you MUST read [Serving Mosaico](https://github.com/voidlabs/mosaico/wiki/Serving-Mosaico).
### OpenSource projects including/using Mosaico
[MailTrain](https://github.com/Mailtrain-org/mailtrain) is a full featured newsletter web application written in Node and support email editing via Mosaico since their 1.23.0 release.
[GoodEnough's Mosaico](https://github.com/goodenough/mosaico-backend) born as a Mosaico fork, now have become a full web application product built around Mosaico editing targeting agencies.
### Are you having issues with Mosaico?
See the [CONTRIBUTING file](https://github.com/voidlabs/mosaico/blob/master/CONTRIBUTING.md)
### Contact Us
Please contact us if you have ideas, suggestions or, even better, you want to collaborate on this project ( feedback at mosaico.io ) or you need COMMERCIAL support ( sales at mosaico.io ) . Please DON'T write to this email to get free support: use Git issues for that, start the issue subject with "[help] " prefix, and write something to let us know you already read the CONTRIBUTING file.

View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=1024, initial-scale=1">
<link rel="canonical" href="http://mosaico.io" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<script src="rs/mosaico-libs-and-tinymce.min.js?v=0.17.5"></script>
<script src="rs/mosaico.min.js?v=0.17.5"></script>
<script>
$(function() {
if (!Mosaico.isCompatible()) {
alert('Update your browser!');
return;
}
// var basePath = window.location.href.substr(0, window.location.href.lastIndexOf('/')).substr(window.location.href.indexOf('/','https://'.length));
var basePath = window.location.href;
if (basePath.lastIndexOf('#') > 0) basePath = basePath.substr(0, basePath.lastIndexOf('#'));
if (basePath.lastIndexOf('?') > 0) basePath = basePath.substr(0, basePath.lastIndexOf('?'));
if (basePath.lastIndexOf('/') > 0) basePath = basePath.substr(0, basePath.lastIndexOf('/'));
var plugins;
// A basic plugin that expose the "viewModel" object as a global variable.
// plugins = [function(vm) {window.viewModel = vm;}];
var ok = Mosaico.init({
imgProcessorBackend: basePath+'/img/',
emailProcessorBackend: basePath+'/dl/',
titleToken: "MOSAICO Responsive Email Designer",
fileuploadConfig: {
url: basePath+'/upload/',
// messages??
}
}, plugins);
if (!ok) {
console.log("Missing initialization hash, redirecting to main entrypoint");
document.location = ".";
}
});
</script>
<link rel="stylesheet" href="rs/mosaico-libs-and-tinymce.min.css?v=0.17.5" />
<link rel="stylesheet" href="rs/mosaico-material.min.css?v=0.17.5" />
</head>
<body class="mo-standalone">
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -0,0 +1,198 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=480, initial-scale=1">
<title>Free responsive email template editor | Mosaico</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="rs/mosaico-libs-and-tinymce.min.css?v=0.17.5" />
<link rel="stylesheet" href="rs/mosaico-material.min.css?v=0.17.5" />
<script src="rs/mosaico-libs-and-tinymce.min.js?v=0.17.5"></script>
<script>
var initialEdits = [];
if (localStorage.getItem('edits')) {
var editKeys = JSON.parse(localStorage.getItem('edits'));
var md;
for (var i = 0; i < editKeys.length; i++) {
md = localStorage.getItem('metadata-'+editKeys[i]);
if (typeof md == 'string') {
initialEdits.push(JSON.parse(md));
} else {
console.log("Ignoring saved key", editKeys[i], "type", typeof md, md);
}
}
initialEdits.sort(function(a, b) {
var lastA = a.changed ? a.changed : a.created;
var lastB = b.changed ? b.changed : b.created;
if (lastA < lastB) return 1;
if (lastA > lastB) return -1;
return 0;
});
}
var viewModel = {
showSaved: ko.observable(false),
edits: ko.observableArray(initialEdits),
templates: [{
name: 'versafix-1', desc: 'The versatile template'
},{
name: 'tedc15', desc: 'The TEDC15 template'
},{
name: 'tutorial', desc: 'The Tutorial'
}]
};
viewModel.edits.subscribe(function(newEdits) {
var keys = [];
for (var i = 0; i < newEdits.length; i++) {
keys.push(newEdits[i].key);
localStorage.setItem('metadata-'+newEdits[i].key, ko.toJSON(newEdits[i]));
}
localStorage.setItem('edits', ko.toJSON(keys));
});
viewModel.dateFormat = function(unixdate) {
if (typeof unixdate == 'undefined') return 'DD-MM-YYYY';
var d = new Date();
d.setTime(ko.utils.unwrapObservable(unixdate));
var m = ""+(d.getMonth()+1);
var h = ""+(d.getHours());
var i = ""+(d.getMinutes());
return d.getDate()+"/"+(m.length == 1 ? '0' : '')+m+"/"+d.getFullYear()+" "+(h.length == 1 ? '0' : '')+h+":"+(i.length == 1 ? '0' : '')+i;
};
viewModel.newEdit = function(shorttmplname) {
console.log("new", this, template);
var d = new Date();
var rnd = Math.random().toString(36).substr(2, 7);
var template = 'templates/'+shorttmplname+'/template-'+shorttmplname+'.html';
viewModel.edits.unshift({ created: Date.now(), key: rnd, name: shorttmplname, template: template });
document.location = 'editor.html?0.17.5#'+rnd;
// { data: 'AAAA-MM-GG', key: 'ABCDE' }
// viewModel.edits.push(template);
};
viewModel.renameEdit = function(index) {
var newName = window.prompt("Modifica nome", viewModel.edits()[index].name);
if (newName) {
var newItem = JSON.parse(ko.toJSON(viewModel.edits()[index]));
newItem.name = newName;
viewModel.edits.splice(index, 1, newItem);
}
return false;
};
viewModel.deleteEdit = function(index) {
var confirm = window.confirm("Are you sure you want to delete this content?");
if (confirm) {
var res = viewModel.edits.splice(index, 1);
console.log("removing template ", res);
localStorage.removeItem('template-'+res[0].key);
}
return false;
};
viewModel.list = function(clean) {
for (var i = localStorage.length - 1; i >= 0; i--) {
var key = localStorage.key(i);
if (clean) {
console.log("removing ", key, localStorage.getItem(key));
localStorage.removeItem(key);
} else {
console.log("ls ", key, localStorage.getItem(key));
}
}
};
document.addEventListener('DOMContentLoaded',function(){
ko.applyBindings(viewModel);
});
</script>
<style>
body {
font-family: "trebuchet ms",arial,sans-serif;
font-size: 13.6px;
}
a, a:link, a:visited {
color: #A00000;
text-decoration: none;
}
.template {
margin: 10px;
display: inline-block;
vertical-align: top;
}
.template a {
display: block;
outline: 2px solid #333332;
padding: 2px;
width: 340px;
height: 500px;
overflow-y: auto;
}
.template a:hover {
outline: 5px solid #900000;
transition: outline .2s;
}
#savedTable tbody tr:nth-child(odd) td {
background-color: white;
}
#savedTable td {
padding: 2px 5px ;
}
.operationButton, .resumeButton {
background-color: #333332;
color: white !important;
padding: 5px 8px;
border-radius: 5px;
display: inline-block;
}
.operationButton i {
color: white;
}
</style>
</head>
<body style="overflow: auto; text-align: center; background-color: #3f3d33; padding: 0; margin: 0; display: none;" data-bind="visible: true">
<div style="background-color: #d2cbb1; padding: 10px;">
<table class="logoWrapper" valign="bottom" align="center"><tr><td valign="bottom"><img class="logoImage" alt="Mosaico" style="display: block;" src="rs/img/mosaicologo.png" /><div class="logoContainer"></div></td></tr></table>
</div>
<!-- ko if: edits().length -->
<div style="overflow-y: auto; max-height: 200px; z-index: 10; position: relative; padding: 1em; background-color: #f1eee6;">
<!-- ko ifnot: $root.showSaved --><span>You have saved contents in this browser! <a class="resumeButton" href="#" data-bind="click: $root.showSaved.bind(undefined, true);"><i class="fa fa-plus-square"></i> Show</a></span><!-- /ko -->
<!-- ko if: $root.showSaved -->
<table id="savedTable" align="center" cellspacing="0" cellpadding="8" style="padding: 5px; ">
<caption>Email contents saved in your browser <a href="#" class="resumeButton" data-bind="click: $root.showSaved.bind(undefined, false);"><i class="fa fa-minus-square"></i> Hide</a></caption>
<thead><tr>
<th>Id</th><th>Name</th><th>Created</th><th>Last changed</th><th>Operations</th>
</tr></thead>
<tbody data-bind="foreach: edits">
<tr>
<td align="left"><a href="#" data-bind="attr: { href: 'editor.html?0.17.5#'+key }"><code>#<span data-bind="text: key">key</span></code></a></td>
<td style="font-weight: bold" align="left"><a href="#" data-bind="attr: { href: 'editor.html?0.17.5#'+key }"><span data-bind="text: name">versamix</span></a></td>
<td><span data-bind="text: typeof created !== 'undefined' ? $root.dateFormat(created) : '-'">YYYY-MM-DD</span></td>
<td><span style="font-weight: bold" data-bind="text: typeof changed !== 'undefined' ? $root.dateFormat(changed) : '-'">YYYY-MM-DD</span></td>
<td>
<a class="operationButton" href="#" data-bind="attr: { href: 'editor.html?0.17.5#'+key }" title="edit"><i class="fa fa-pencil"></i></a>
<!--(<a href="#" data-bind="click: $root.renameEdit.bind(undefined, $index())" title="rinomina"><i class="fa fa-trash-o"></i></a>)-->
<a class="operationButton" href="#" data-bind="click: $root.deleteEdit.bind(undefined, $index())" title="delete"><i class="fa fa-trash-o"></i></a>
</td>
</tr>
</tbody>
</table>
<!-- /ko -->
</div>
<!-- /ko -->
<div class="content" style="background-color: white; margin-top: -20px; padding-top: 15px; background-origin: border; padding-bottom: 2em">
<h3>Choose a master template</h3>
<div data-bind="foreach: templates">
<div class="template template-xx" style="" data-bind="attr: { class: 'template template-'+name }">
<div class="description" style="padding-bottom:5px"><b data-bind="text: name">xx</b>: <span data-bind="text: desc">xx</span></div>
<a href="#" data-bind="click: $root.newEdit.bind(undefined, name), attr: { href: 'editor.html?0.17.5#templates/'+name+'/template-'+name+'.html' }">
<img src width="100%" alt="xx" data-bind="attr: { src: 'templates/'+name+'/edres/_full.png' }">
</a>
</div>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 965 B

After

Width:  |  Height:  |  Size: 965 B

View file

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View file

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View file

@ -25,6 +25,7 @@ Thanks to translators:
- sv (Swedish): P-H Westman
- sr_RS (Serbian): Đorđe Kolaković
- ru (Russian): Andrey ANM
- tr (Turkish): Andriya Uçar
Sign-up to POEditor if you want to collaborate or suggest changes to the current languages, or provide PR for full new complete languages.

View file

@ -84,5 +84,7 @@
"File upload aborted": "Hochladen der Datei abgebrochen",
"Failed to resize image": "Fehler beim anpassen der Bildgröße",
"Unexpected upload error": "Unerwarteter Fehler beim Hochladen",
"Unexpected error listing files": "Unerwarteter Fehler beim auflisten der Dateien"
"Unexpected error listing files": "Unerwarteter Fehler beim auflisten der Dateien",
"__current__ of __total__": "__current__ von __total__",
"Select from gallery": "Wählen Sie aus der Galerie"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "File upload aborted",
"Failed to resize image": "Failed to resize image",
"Unexpected upload error": "Unexpected upload error",
"Unexpected error listing files": "Unexpected error listing files"
"Unexpected error listing files": "Unexpected error listing files",
"__current__ of __total__": "__current__ of __total__",
"Select from gallery": "Select from gallery"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "Subida de archivo abortada",
"Failed to resize image": "Falló el cambio de tamaño de la imagen",
"Unexpected upload error": "Error inesperado en la subida",
"Unexpected error listing files": "Error inesperado al listar los archivos"
"Unexpected error listing files": "Error inesperado al listar los archivos",
"__current__ of __total__": "__current__ de __total__",
"Select from gallery": "Seleccionar de la galería"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "L'upload de l'image a échoué",
"Failed to resize image": "Impossible de redimensionner l'image",
"Unexpected upload error": "Erreur d'upload inattendue",
"Unexpected error listing files": "Impossible de lister les fichiers"
"Unexpected error listing files": "Impossible de lister les fichiers",
"__current__ of __total__": "__current__ sur __total__",
"Select from gallery": "Sélectionnez dans la galerie"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "Caricamento del file annullato",
"Failed to resize image": "Impossibile ridimensionare l'immagine",
"Unexpected upload error": "Errore inaspettato durante il caricamento",
"Unexpected error listing files": "Errore inaspettato caricando la lista dei file"
"Unexpected error listing files": "Errore inaspettato caricando la lista dei file",
"__current__ of __total__": "__current__ di __total__",
"Select from gallery": "Seleziona dalla galleria"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "Bestandsupload is afgebroken",
"Failed to resize image": "Kon de grootte van het plaatje niet aanpassen",
"Unexpected upload error": "Onverwachte fout bij upload",
"Unexpected error listing files": "Onverwachte fout bij tonen van de plaatjes"
"Unexpected error listing files": "Onverwachte fout bij tonen van de plaatjes",
"__current__ of __total__": "__current__ van __total__",
"Select from gallery": "Selecteer uit galerij"
}

View file

@ -0,0 +1,90 @@
{
"Download": "Baixar",
"Test": "Testar",
"Save": "Salvar",
"Downloading...": "Baixando...",
"Invalid email address": "Endereço de email inválido",
"Test email sent...": "Email de teste enviado",
"Unexpected error talking to server: contact us!": "Erro inesperado ao contactar ao servidor: Informe-nos!",
"Insert here the recipient email address": "Insira aqui o endereço de email de destino",
"Test email address": "Endereço de email para teste",
"Block removed: use undo button to restore it...": "Bloco removido: use o botão Desfazer para restaurá-lo...",
"New block added after the selected one (__pos__)": "Novo bloco adicionado após o selecionado (__pos__)",
"New block added at the model bottom (__pos__)": "Novo bloco adicionado ao final do template (__pos__)",
"Undo (#COUNT#)": "Desfazer (#COUNT#)",
"Redo": "Refazer",
"Selected element has no editable properties": "O elemento selecionado não tem propriedades editáveis",
"This style is specific for this block: click here to remove the custom style and revert to the theme value": "Este estilo é específico para este bloco: clique aqui para eliminar o estilo personalizado e restaurar o valor do tema.",
"Switch between global and block level styles editing": "Trocar entre edição de estilos a nível global ou a nível de bloco",
"Undo last operation": "Desfazer a última operação",
"Redo last operation": "Refazer a última operação",
"Show image gallery": "Mostrar a galeria de imagens",
"Gallery": "Galeria",
"Preview": "Pré-visualizar",
"Show live preview": "Mostrar prévia ao vivo",
"Large screen": "Desktop",
"Tablet": "Tablet",
"Smartphone": "Mobile",
"Show preview and send test": "Mostrar prévia e enviar teste",
"Download template": "Baixar template",
"Save template": "Salvar template",
"Saved model is obsolete": "O modelo salvo é obsoleto",
"<p>The saved model has been created with a previous, non completely compatible version, of the template</p><p>Some content or style in the model <b>COULD BE LOST</b> if you will <b>save</b></p><p>Contact us for more informations!</p>": "<p>O modelo foi salvo em uma versão antiga e não totalmente compatível com o template</p><p>Alguns conteúdos ou estilos no modelo <b>PODEM SE PERDER</b> se for <b>salvo</b></p><p>Entre em contato para mais informações!</p>",
"Blocks": "Blocos",
"Blocks ready to be added to the template": "Blocos prontos para serem adicionados ao template",
"Content": "Conteúdo",
"Edit content options": "Editar opções do conteúdo",
"Style": "Estilo",
"Edit style options": "Editar opções de estilo",
"Block __name__": "Bloco __name__",
"Click or drag to add this block to the template": "Clique ou arraste e solte para adicionar este bloco ao template",
"Add": "Adicionar",
"By clicking on message parts you will select a block and content options, if any, will show here": "Ao clicar em partes da mensagem, você selecionará um bloco. As opções de conteúdo, se houverem, serão exibidas aqui ",
"By clicking on message parts you will select a block and style options, if available, will show here": "Ao clicar em partes da mensagem, você selecionará um bloco. As opções de estilo, se houverem, serão exibidas aqui ",
"Click or drag files here": "Clique ou arraste arquivos aqui",
"No images uploaded, yet": "Nenhuma imagem adicionada, ainda",
"Show images from the gallery": "Mostrar imagens da galeria",
"Loading...": "Carregando...",
"Load gallery": "Carregar galeria",
"Loading gallery...": "Carregando galeria...",
"The gallery is empty": "A galeria está vazia",
"Remove image": "Remover imagem",
"Open the image editing tool": "Abrir a ferramenta de edição de imagem",
"Upload a new image": "Carregar uma nova imagem",
"Drop an image here": "Arraste uma imagem aqui",
"Drop an image here or click the upload button": "Arraste uma imagem aqui ou clique no botão carregar",
"Drag this image and drop it on any template image placeholder": "Arraste esta imagem e solte-a sobre qualquer placeholder de imagem",
"Gallery:": "Galeria:",
"Session images": "Sessão de imagens",
"Recents": "Recentes",
"Remote gallery": "Galeria remota",
"Customized block.<ul><li>In this status changes to properties will be specific to the current block (instead of being global to all blocks in the same section)</li><li>A <span class=\"customStyled\"><span>\"small cube\" </span></span> icon beside the property will mark the customization. By clicking this icon the property value will be reverted to the value defined for the section.</li></ul>": "Bloco personalizado.<ul><li>Neste estado, as modificações das propiedades serão específicas ao bloco atual (não serão aplicados aos blocos da mesma seção)</li><li>O <span class=\"customStyled\">ícone <span>\"small cube\" </span></span>, da propriedade, marcará a personalização. Se clicar neste ícone o valor da propiedade será revertido ao valor padrão.</li></ul>",
"Drop here blocks from the \"Blocks\" tab": "Arraste aqui os blocos a partir do menu \"Blocos\"",
"Drag this handle to move the block": "Arraste para mover o bloco",
"Move this block upside": "Mover este bloco para cima",
"Move this block downside": "Mover este bloco para baixo",
"Delete block": "Eliminar bloco",
"Duplicate block": "Duplicar bloco",
"Switch block variant": "Alternar variante do bloco",
"Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet.": "Cores do tema,Cores padrão,Cores Web,Cores do Tema,Voltar a paleta,Historico,Nenhum histórico ainda",
"Drop here": "Soltar aqui",
"Unknown error": "Erro desconhecido",
"Uploaded bytes exceed file size": "Os dados excedem o tamanho do arquivo",
"File type not allowed": "Tipo de arquivo não permitido",
"File is too large": "Arquivo muito grande",
"The uploaded file exceeds the post_max_size directive in php.ini": "O upload excede o valor da diretiva post_max_size do php.ini",
"File is too big": "Arquivo demasiadamente grande",
"File is too small": "Arquivo demasiadamente pequeno",
"Filetype not allowed": "Tipo de arquivo não permitido",
"Maximum number of files exceeded": "Número máximo de arquivos excedido",
"Image exceeds maximum width": "Imagem excede a largura máxima",
"Image requires a minimum width": "Largura mínima de imagem requirida",
"Image exceeds maximum height": "Imagem excede a altura máxima",
"Image requires a minimum height": "Altura mínima de imagem requirida",
"File upload aborted": "Upload abortado",
"Failed to resize image": "Falha ao redimensionar imagem",
"Unexpected upload error": "Erro inesperado em upload",
"Unexpected error listing files": "Erro inesperado ao listar arquivos",
"__current__ of __total__": "__current__ de __total__",
"Select from gallery": "Selecione a partir da galeria"
}

View file

@ -66,7 +66,7 @@
"Delete block": "Удалить блок",
"Duplicate block": "Дублировать блок",
"Switch block variant": "Переключение варианта блока",
"Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet.": "Тематические цвета, Стандартные цвета, Цветовая гамма, Цвет темы, Назад в палитру, История, История еще не существует.",
"Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet.": "Тематические цвета,Стандартные цвета,Цветовая гамма,Цвет темы,Назад в палитру,История,История еще не существует.",
"Drop here": "Бросьте сюда",
"Unknown error": "Неизвестная ошибка",
"Uploaded bytes exceed file size": "Загруженные байты превышают размер файла",
@ -84,5 +84,7 @@
"File upload aborted": "Выгрузка файла прервана",
"Failed to resize image": "Не удалось изменить размер изображения.",
"Unexpected upload error": "Неожиданная ошибка загрузки",
"Unexpected error listing files": "Неожиданная ошибка при просмотре файлов"
"Unexpected error listing files": "Неожиданная ошибка при просмотре файлов",
"__current__ of __total__": "__current__ из __total__",
"Select from gallery": "Выберите из галереи"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "Postavljanje fajla prekinuto",
"Failed to resize image": "Izmena dimenzija slike nije uspela",
"Unexpected upload error": "Neočekivana greška pri postavljanju",
"Unexpected error listing files": "Neočekivana greška pri listingu fajlova"
"Unexpected error listing files": "Neočekivana greška pri listingu fajlova",
"__current__ of __total__": "__current__ од __total__",
"Select from gallery": "Изаберите из галерије"
}

View file

@ -84,5 +84,7 @@
"File upload aborted": "Uppladdning avbruten",
"Failed to resize image": "Det gick inte att ändra storlek på bild",
"Unexpected upload error": "Oväntat uppladdningsfel",
"Unexpected error listing files": "Oväntat fel vid inläsning av fillista"
"Unexpected error listing files": "Oväntat fel vid inläsning av fillista",
"__current__ of __total__": "__current__ av __total__",
"Select from gallery": "Välj från galleri"
}

View file

@ -0,0 +1,90 @@
{
"Download": "İndir",
"Test": "Test",
"Save": "Kaydet",
"Downloading...": "İndiriliyor...",
"Invalid email address": "Geçersiz e-posta adresi!",
"Test email sent...": "E-posta gönderme test ediliyor...",
"Unexpected error talking to server: contact us!": "Sunucu ile iletişim kurulamıyor: bizimle iletişime geçin!",
"Insert here the recipient email address": "Alıcının e-posta adresini buraya ekleyin",
"Test email address": "E-posta adresini test et",
"Block removed: use undo button to restore it...": "Blok kaldırıldı: geri yüklemek için geri al butonunu kullanın...",
"New block added after the selected one (__pos__)": "Blok seçilerek yeni blok eklendi (__pos__)",
"New block added at the model bottom (__pos__)": "Modelin alt kısmına yeni blok eklendi (__pos__)",
"Undo (#COUNT#)": "Geri Al (#COUNT#)",
"Redo": "Yinele",
"Selected element has no editable properties": "Seçilen öğenin düzenlenebilir nitelikleri yok",
"This style is specific for this block: click here to remove the custom style and revert to the theme value": "Bu stil bu bloğa özgüdür: özel stili kaldırmak ve tema değerine dönmek için burayı tıklayın",
"Switch between global and block level styles editing": "Genel ve blok stilleri düzenleme arasında geçiş yap",
"Undo last operation": "Son işlemi geri al",
"Redo last operation": "Son işlemi yinele",
"Show image gallery": "Resim galerisini görüntüle",
"Gallery": "Galeri",
"Preview": "Önizle",
"Show live preview": "Canlı önizlemeyi göster",
"Large screen": "Geniş ekran",
"Tablet": "Tablet",
"Smartphone": "Akıllı Telefon",
"Show preview and send test": "Önizlemeyi göster ve test et",
"Download template": "Şablonu indir",
"Save template": "Şablonu kaydet",
"Saved model is obsolete": "Kaydedilen model kullanılmıyor",
"<p>The saved model has been created with a previous, non completely compatible version, of the template</p><p>Some content or style in the model <b>COULD BE LOST</b> if you will <b>save</b></p><p>Contact us for more informations!</p>": "<p>Kaydedilen şablonun versiyonu önceki haliyle tamamen uyumlu değil.</p><p>Şablondaki bazı içerik veya stiller şablonu kaydettiğin durumda <b>KAYBOLABİLİR</b></p><p>Daha fazla bilgi için bizimle iletişime geçin!</p>",
"Blocks": "Bloklar",
"Blocks ready to be added to the template": "Bloklar şablona eklenmeye hazır",
"Content": "İçerik",
"Edit content options": "İçerik seçeneklerini düzenle",
"Style": "Stil",
"Edit style options": "Stil seçeneklerini düzenle",
"Block __name__": "Blok __name__",
"Click or drag to add this block to the template": "Bu bloğu şablona eklemek için tıkla veya sürükle",
"Add": "Ekle",
"By clicking on message parts you will select a block and content options, if any, will show here": "Mesaj parçalarına tıklayarak blok ve içerik seçenekleri seçeceksiniz, eğer varsa burada gösterilecektir",
"By clicking on message parts you will select a block and style options, if available, will show here": "Mesaj parçalarına tıklayarak blok ve stil seçenekleri seçeceksiniz, eğer uygunsa burada gösterilecektir",
"Click or drag files here": "Tıkla veya dosyaları buraya sürükle",
"No images uploaded, yet": "Henüz hiç resim yüklenmedi",
"Show images from the gallery": "Galerideki resimleri görüntüle",
"Loading...": "Yükleniyor...",
"Load gallery": "Galeri yükle",
"Loading gallery...": "Galeri yükleniyor...",
"The gallery is empty": "Galeri boş",
"Remove image": "Resmi kaldır",
"Open the image editing tool": "Resim düzenleme aracını aç",
"Upload a new image": "Yeni bir resim yükle",
"Drop an image here": "Buraya resim bırak",
"Drop an image here or click the upload button": "Buraya bir resim bırak veya yükle butonuna tıkla",
"Drag this image and drop it on any template image placeholder": "Bu resmi herhangi bir şablonun üzerine sürükleyip bırak",
"Gallery:": "Galeri:",
"Session images": "Geçerli oturum resimleri",
"Recents": "Son kullanılanlar",
"Remote gallery": "Galeriyi uzaktan yönet",
"Customized block.<ul><li>In this status changes to properties will be specific to the current block (instead of being global to all blocks in the same section)</li><li>A <span class=\"customStyled\"><span>\"small cube\" </span></span> icon beside the property will mark the customization. By clicking this icon the property value will be reverted to the value defined for the section.</li></ul>": "Özelleştirilmiş blok.<ul><li>Bu durumda, değişiklikler geçerli bloğa özeldir (aynı bölümdeki tüm bloklarda global olmak yerine)</li><li>A <span class=\\\"customStyled\\\"><span>\\\"small cube\\\" </span></span> ikon özelleştirme gösterilecektir. Bu ikona tıklayarak, bölüm için tanımlanan değere geri dönülür.</li></ul>",
"Drop here blocks from the \"Blocks\" tab": "Buraya \"Bloklar\" sekmesinden blok ekle",
"Drag this handle to move the block": "Bloğu taşımak için buradan sürükle",
"Move this block upside": "Bu bloğu yukarıya taşı",
"Move this block downside": "Bu bloğu aşağıya taşı",
"Delete block": "Bloğu sil",
"Duplicate block": "Bloğu kopyala",
"Switch block variant": "Block içerisindeki alan yerlerini değiştir",
"Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet.": "Tema Renkleri,Standart Renkler,Web Renkleri,Tema Renkleri,Palet Sayfasına Geri Dön,Geçmiş,Henüz bir geçmiş kaydı yok.",
"Drop here": "Buraya bırak",
"Unknown error": "Bilinmeyen hata!",
"Uploaded bytes exceed file size": "Yüklenen bayt dosya boyutunu aşıyor!",
"File type not allowed": "Dosya türüne izin verilmiyor!",
"File is too large": "Dosya çok büyük!",
"The uploaded file exceeds the post_max_size directive in php.ini": "Yüklenen dosya, php.ini dosyasındaki post_max_size değerini aşıyor!",
"File is too big": "Dosya çok büyük!",
"File is too small": "Dosya çok küçük!",
"Filetype not allowed": "Dosya türüne izin verilmiyor!",
"Maximum number of files exceeded": "Maksimum dosya sayısııldı!",
"Image exceeds maximum width": "Resim maksimum genişliği aşıyor!",
"Image requires a minimum width": "Resim minimum genişliğe ulaşmadı!",
"Image exceeds maximum height": "Resim maksimum yüksekliği aşıyor!",
"Image requires a minimum height": "Resim minimum yüksekliğe ulaşmadı!",
"File upload aborted": "Dosya yükleme iptal edildi!",
"Failed to resize image": "Resim yeniden boyutlandırılamadı!",
"Unexpected upload error": "Bilinmeyen yükleme hatası!",
"Unexpected error listing files": "Dosya yüklemede bilinmeyen hata listesi!",
"__current__ of __total__": "__current__ ile ilgili __total__",
"Select from gallery": "Galeriden seç"
}

View file

@ -0,0 +1 @@
@font-face{font-family:'Noto Sans';font-style:normal;font-weight:400;src:url(./notoregular/noto-sans-400-normal.eot);src:local('Noto Sans'),local('NotoSans'),url(./notoregular/noto-sans-400-normal.eot#iefix) format('embedded-opentype'),url(./notoregular/noto-sans-400-normal.woff) format('woff'),url(./notoregular/noto-sans-400-normal.ttf) format('truetype')}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

348
client/static/mosaico/rs/mosaico.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,196 @@
// Variables
// Syntax: <control>-(<sub control>)-<bg|border|text>-(<state>)-(<extra>);
// Example: @btn-primary-bg-hover-hlight;
@prefix: mce;
// Default font
@font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-size: 14px;
@line-height: 20px;
@has-gradients: false;
@has-radius: true;
@has-boxshadow: false;
@has-button-borders: true;
// Text colors
@text: #333333;
@text-inverse: #ffffff;
@text-disabled: #aaaaaa;
@text-shadow: 0 1px 1px hsla(hue(@text-inverse), saturation(@text-inverse), lightness(@text-inverse), 0.75);
@text-error: #aa0000;
// Button
@btn-text: #ffffff;
@btn-text-shadow: #333332;
@btn-border-top: rgba(0,0,0,0.1);
@btn-border-right: rgba(0,0,0,0.1);
@btn-border-bottom: rgba(0,0,0,0.25);
@btn-border-left: rgba(0,0,0,0.25);
@btn-caret-border: @btn-text;
@btn-text-disabled: @text-disabled;
@btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
@btn-box-shadow-active: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
@btn-box-disabled-opacity: 0.4;
@btn-bg: #333332;
@btn-bg-hlight: #333332;
@btn-bg-hover: darken(@btn-bg, 5%);
@btn-bg-hlight-hover: darken(@btn-bg-hlight, 5%);
@btn-border-hover: darken(@btn-bg, 20%);
@btn-border-active: darken(@btn-bg, 20%);
@btn-padding: 4px 8px;
@btn-primary-bg: #333332;
@btn-primary-bg-hlight: #333332;
@btn-primary-bg-hover: darken(@btn-primary-bg, 5%);
@btn-primary-bg-hover-hlight: darken(@btn-primary-bg-hlight, 5%);
@btn-primary-text: #ffffff;
@btn-primary-text-shadow: #333333;
@btn-primary-border-top: mix(@btn-border-top, @btn-primary-bg, 50%);
@btn-primary-border-right: mix(@btn-border-right, @btn-primary-bg, 50%);
@btn-primary-border-bottom: mix(@btn-border-bottom, @btn-primary-bg, 50%);
@btn-primary-border-left: mix(@btn-border-left, @btn-primary-bg, 50%);
@btn-primary-border: transparent;
@btn-primary-border-hover: transparent;
// Button group
@btn-group-border-width: 1px;
// Menu
@menuitem-text: #333333;
@menu-bg: #ffffff;
@menu-margin: -1px 0 0;
@menu-border: rgba(0,0,0,0.2);
@menubar-border: mix(@panel-border, @panel-bg, 60%);
@menuitem-text-inverse: #ffffff;
@menubar-bg-active: darken(@btn-bg, 10%);
@menuitem-bg-hover: #0081C2;
@menuitem-bg-selected: #333332;
@menuitem-bg-selected-hlight: #333332;
@menuitem-bg-disabled: #CCC;
@menuitem-caret: @menuitem-text;
@menuitem-caret-selected: @menuitem-text-inverse;
@menuitem-separator-top: #cbcbcb;
@menuitem-separator-bottom: #ffffff;
@menuitem-bg-active: #666666;
@menuitem-text-active: #ffffff;
@menuitem-preview-border-active: #aaaaaa;
@menubar-menubtn-text: ;
// Panel
@panel-border: #9e9e9e;
@panel-bg: #f1eee6;
@panel-bg-hlight: #f1eee6;
// Tabs
@tab-border: #c5c5c5;
@tab-bg: #e3e3e3;
@tab-bg-hover: #fdfdfd;
@tab-bg-active: #fdfdfd;
@tabs-bg: #ffffff;
// Tooltip
@tooltip-bg: #000;
@tooltip-text: white;
@tooltip-font-size: 11px;
// Notification
@notification-font-size: 14px;
@notification-bg: #f0f0f0;
@notification-border: #cccccc;
@notification-text: #333333;
@notification-success-bg: #dff0d8;
@notification-success-border: #d6e9c6;
@notification-success-text: #3c763d;
@notification-info-bg: #d9edf7;
@notification-info-border: #779ecb;
@notification-info-text: #31708f;
@notification-warning-bg: #fcf8e3;
@notification-warning-border: #faebcc;
@notification-warning-text: #8a6d3b;
@notification-error-bg: #f2dede;
@notification-error-border: #ebccd1;
@notification-error-text: #a94442;
// Window
@window-border: #c4c4c4;
@window-head-border: @window-border;
@window-head-close: mix(@text, @window-bg, 60%);
@window-head-close-hover: mix(@text, @window-bg, 40%);
@window-foot-border: @window-border;
@window-foot-bg: @window-bg;
@window-fullscreen-bg: #FFF;
@window-modalblock-bg: #000;
@window-modalblock-opacity: 0.3;
@window-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
@window-bg: #ffffff;
@window-title-font-size: 20px;
// Popover
@popover-bg: @window-bg;
@popover-arrow-width: 10px;
@popover-arrow: @window-bg;
@popover-arrow-outer-width: @popover-arrow-width + 1;
@popover-arrow-outer: rgba(0, 0, 0, 0.25);
// Floatpanel
@floatpanel-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
// Checkbox
@checkbox-bg: @btn-bg;
@checkbox-bg-hlight: @btn-bg-hlight;
@checkbox-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
@checkbox-border: #c5c5c5;
@checkbox-border-focus: #59a5e1;
// Path
@path-text: @text;
@path-bg-focus: #666;
@path-text-focus: #fff;
// Textbox
@textbox-text-placeholder: #aaa;
@textbox-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
@textbox-bg: #ffffff;
@textbox-border: #c5c5c5;
@textbox-border-focus: #59a5e1;
// Selectbox
@selectbox-bg: @textbox-bg;
@selectbox-border: @textbox-border;
// Throbber
@throbber-bg: #fff url('img/loader.gif') no-repeat center center;
// Combobox
@combobox-border: @textbox-border;
// Colorpicker
@colorpicker-border: @textbox-border;
@colorpicker-hue-bg: #fff;
@colorpicker-hue-border: #333;
// Grid
@grid-bg-active: @menuitem-bg-active;
@grid-border-active: #a1a1a1;
@grid-border: #d6d6d6;
// Misc
@colorbtn-backcolor-bg: #bbbbbb;
@iframe-border: @panel-border;
// Slider
@slider-border: #aaaaaa;
@slider-bg: #eeeeee;
@slider-handle-border: #bbbbbb;
@slider-handle-bg: #dddddd;
// Progress
@progress-border: #cccccc;
@progress-bar-bg: #dfdfdf;
@progress-bar-bg-hlight: #cccccc;
@progress-text: #333333;
@progress-text-shadow: #ffffff;
// Flow layout
@flow-layout-spacing: 2px;

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 53 B

After

Width:  |  Height:  |  Size: 53 B

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View file

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 198 B

Some files were not shown because too many files have changed in this diff Show more