Skip to content

Commit

Permalink
Visor subfix -> Visor Prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
bertocode committed Nov 17, 2017
1 parent 68217c8 commit 2fa01e4
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 78 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import PluginPlaceholderVisor from './PluginPlaceholderVisor';
import PluginPlaceholderVisor from './VisorPluginPlaceholder';
import { isSortableBox, isAncestorOrSibling } from '../../../common/utils';

export default class BoxVisor extends Component {
export default class VisorBox extends Component {
constructor(props) {
super(props);
this.borderSize = 2;
Expand Down Expand Up @@ -222,7 +222,7 @@ export default class BoxVisor extends Component {
}
}

BoxVisor.propTypes = {
VisorBox.propTypes = {
/**
* Identificador de la caja
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import BoxVisor from './BoxVisor';
import VisorBox from './VisorBox';

export default class BoxSortableVisor extends Component {
export default class VisorBoxSortable extends Component {
render() {
let box = this.props.boxes[this.props.id];
return (
Expand Down Expand Up @@ -30,7 +30,7 @@ export default class BoxSortableVisor extends Component {
style={{ height: row + "%" }}>
{container.children.map((idBox, ind) => {
if (this.props.boxes[idBox].col === i && this.props.boxes[idBox].row === j) {
return (<BoxVisor id={idBox}
return (<VisorBox id={idBox}
key={ind}
boxes={this.props.boxes}
changeCurrentView={(element)=>{this.props.changeCurrentView(element);}}
Expand All @@ -57,7 +57,7 @@ export default class BoxSortableVisor extends Component {
}
}

BoxSortableVisor.propTypes = {
VisorBoxSortable.propTypes = {
/**
* Identificador de la caja
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import CanvasVisorDoc from './CanvasVisorDoc';
import CanvasVisorSli from './CanvasVisorSli';
import VisorCanvasDoc from './VisorCanvasDoc';
import VisorCanvasSli from './VisorCanvasSli';
import { isSlide } from '../../../common/utils';

export default class CanvasVisor extends Component {
export default class VisorCanvas extends Component {

render() {
return (isSlide(this.props.navItems[this.props.currentView].type)) ?
(<CanvasVisorSli {...this.props} />) :
(<CanvasVisorDoc {...this.props} />);
(<VisorCanvasSli {...this.props} />) :
(<VisorCanvasDoc {...this.props} />);

}

Expand All @@ -19,7 +19,7 @@ export default class CanvasVisor extends Component {

}

CanvasVisor.propTypes = {
VisorCanvas.propTypes = {
/**
* Diccionario que contiene todas las cajas
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import BoxVisor from './BoxVisor';
import BoxSortableVisor from './BoxSortableVisor';
import VisorBox from './VisorBox';
import VisorBoxSortable from './VisorBoxSortable';
import { Col, Tooltip, OverlayTrigger } from 'react-bootstrap';
import HeaderVisor from './HeaderVisor';
import VisorHeader from './VisorHeader';
import { isContainedView, isSortableBox, isSection, isView } from '../../../common/utils';
import i18n from 'i18next';

export default class CanvasVisorDoc extends Component {
export default class VisorCanvasDoc extends Component {

render() {
let titles = [];
Expand Down Expand Up @@ -53,7 +53,7 @@ export default class CanvasVisorDoc extends Component {
}.bind(this), 500);
a.stopPropagation();
}}><i className="material-icons">close</i></a></OverlayTrigger>) : (<span />)}
<HeaderVisor titles={titles}
<VisorHeader titles={titles}
onShowTitle={()=>this.setState({ showTitle: true })}
courseTitle={this.props.title}
titleMode={itemSelected.titleMode}
Expand Down Expand Up @@ -91,7 +91,7 @@ export default class CanvasVisorDoc extends Component {
{boxes.map(id => {
let box = this.props.boxes[id];
if (!isSortableBox(box.id)) {
return <BoxVisor key={id}
return <VisorBox key={id}
id={id}
boxes={this.props.boxes}
boxSelected={this.props.boxSelected}
Expand All @@ -101,7 +101,7 @@ export default class CanvasVisorDoc extends Component {
toolbars={this.props.toolbars}
richElementsState={this.props.richElementsState}/>;
}
return <BoxSortableVisor key={id}
return <VisorBoxSortable key={id}
id={id}
boxes={this.props.boxes}
boxSelected={this.props.boxSelected}
Expand Down Expand Up @@ -131,7 +131,7 @@ export default class CanvasVisorDoc extends Component {

}

CanvasVisorDoc.propTypes = {
VisorCanvasDoc.propTypes = {
/**
* Diccionario que contiene todas las cajas
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import BoxVisor from './BoxVisor';
import VisorBox from './VisorBox';
import { Col, Tooltip, OverlayTrigger } from 'react-bootstrap';
import HeaderVisor from './HeaderVisor';
import VisorHeader from './VisorHeader';
import { aspectRatio } from '../../../common/common_tools';
import ReactResizeDetector from 'react-resize-detector';
import { isContainedView, isView } from '../../../common/utils';
import i18n from 'i18next';

export default class CanvasVisorSli extends Component {
export default class VisorCanvasSli extends Component {

render() {

Expand Down Expand Up @@ -65,7 +65,7 @@ export default class CanvasVisorSli extends Component {

a.stopPropagation();
}}><i className="material-icons">close</i></a></OverlayTrigger>) : (<span />)}
<HeaderVisor titles={titles}
<VisorHeader titles={titles}
onShowTitle={()=>this.setState({ showTitle: true })}
courseTitle={this.props.title}
titleMode={itemSelected.titleMode}
Expand Down Expand Up @@ -93,7 +93,7 @@ export default class CanvasVisorSli extends Component {
{boxes.map(id => {
let box = this.props.boxes[id];

return <BoxVisor key={id}
return <VisorBox key={id}
id={id}
boxes={this.props.boxes}
boxSelected={this.props.boxSelected}
Expand Down Expand Up @@ -141,7 +141,7 @@ export default class CanvasVisorSli extends Component {

}

CanvasVisorSli.propTypes = {
VisorCanvasSli.propTypes = {
/**
* Diccionario que contiene todas las cajas
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { isSlide } from '../../../common/utils';
import CanvasVisorDoc from './CanvasVisorDoc';
import CanvasVisorSli from './CanvasVisorSli';
import VisorCanvasDoc from './VisorCanvasDoc';
import VisorCanvasSli from './VisorCanvasSli';
import { CSSTransition } from 'react-transition-group';

export default class ContainedCanvasVisor extends Component {
export default class VisorContainedCanvas extends Component {

componentDidMount() {

}
render() {
let visorContent;
if (isSlide(this.props.containedViews[this.props.currentView].type)) {
visorContent = <CanvasVisorSli {...this.props} />;
visorContent = <VisorCanvasSli {...this.props} />;
}else{
visorContent = <CanvasVisorDoc {...this.props} />;
visorContent = <VisorCanvasDoc {...this.props} />;
}
return (
<CSSTransition
Expand Down Expand Up @@ -47,7 +47,7 @@ export default class ContainedCanvasVisor extends Component {
}
}

ContainedCanvasVisor.propTypes = {
VisorContainedCanvas.propTypes = {
/**
* Diccionario que contiene todas las cajas
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Tooltip, OverlayTrigger, Breadcrumb, BreadcrumbItem, Button } from 'react-bootstrap';
import { Breadcrumb, BreadcrumbItem } from 'react-bootstrap';
import i18n from 'i18next';
import { isView, isContainedView } from '../../../common/utils';

export default class HeaderVisor extends Component {
export default class VisorHeader extends Component {

/*
* This method is used to calculate actual position for title indexes
Expand Down Expand Up @@ -129,7 +129,7 @@ export default class HeaderVisor extends Component {

}

HeaderVisor.propTypes = {
VisorHeader.propTypes = {
/**
* Array que contiene el título desglosado de la página. Ej: `['Sección 1'. 'Página 1']`
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import BoxVisor from './BoxVisor';
import VisorBox from './VisorBox';
import { isAncestorOrSibling } from '../../../common/utils';

export default class PluginPlaceholderVisor extends Component {
export default class VisorPluginPlaceholder extends Component {
render() {
let container = this.props.parentBox.sortableContainers[this.props.pluginContainer];
let className = "drg" + this.props.pluginContainer;
Expand Down Expand Up @@ -36,7 +36,7 @@ export default class PluginPlaceholderVisor extends Component {
>
{container.children.map((idBox, index) => {
if (this.props.boxes[idBox].col === i && this.props.boxes[idBox].row === j) {
return (<BoxVisor id={idBox}
return (<VisorBox id={idBox}
key={index}
boxes={this.props.boxes}
changeCurrentView={this.props.changeCurrentView}
Expand All @@ -62,7 +62,7 @@ export default class PluginPlaceholderVisor extends Component {

}

PluginPlaceholderVisor.propTypes = {
VisorPluginPlaceholder.propTypes = {
/**
* Identificador del contenedor de plugins
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import VisorNavSection from './VisorNavSection';
import { isSlide, isPage, isSection } from '../../../common/utils';

export default class SideNavVisor extends Component {
export default class VisorSideNav extends Component {
constructor(props) {
super(props);
}
Expand Down Expand Up @@ -55,7 +55,7 @@ export default class SideNavVisor extends Component {
}
}

SideNavVisor.propTypes = {
VisorSideNav.propTypes = {
/**
* Cambia la vista actual
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Grid, Row, Col, Button } from 'react-bootstrap';
import CanvasVisor from './../components/canvas/CanvasVisor';
import ContainedCanvasVisor from './../components/canvas/ContainedCanvasVisor';
import SideNavVisor from './../components/navigation/SideNavVisor';
import VisorCanvas from '../components/canvas/VisorCanvas';
import VisorContainedCanvas from '../components/canvas/VisorContainedCanvas';
import VisorSideNav from '../components/navigation/VisorSideNav';
import VisorPlayer from './../components/navigation/VisorPlayer';

import { isContainedView, isView } from '../../common/utils';
Expand Down Expand Up @@ -206,7 +206,7 @@ export default class Visor extends Component {
return (
<div id="app"
className={wrapperClasses} >
<SideNavVisor
<VisorSideNav
changeCurrentView={(page)=> {this.changeCurrentView(page);}}
courseTitle={title}
show={visorNav.sidebar}
Expand Down Expand Up @@ -234,7 +234,7 @@ export default class Visor extends Component {
</Button>) : null}

{ !isContainedView(this.getLastCurrentViewElement()) ?
(<CanvasVisor
(<VisorCanvas
boxes={boxes}
changeCurrentView={(element) => {this.changeCurrentView(element);}}
canvasRatio={ratio}
Expand All @@ -249,7 +249,7 @@ export default class Visor extends Component {
triggeredMarks={this.state.triggeredMarks}
viewsArray={this.state.currentView}
/>) :
(<ContainedCanvasVisor
(<VisorContainedCanvas
boxes={boxes}
changeCurrentView={(element) => {this.changeCurrentView(element);}}
canvasRatio={ratio}
Expand Down
36 changes: 18 additions & 18 deletions doc/importMdFiles.es6
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ export * as GridConfigurator_en from './files/en/GridConfigurator.md';
export * as PluginToolbar_en from './files/en/PluginToolbar.md';
export * as RadioButtonFormGroup_en from './files/en/RadioButtonFormGroup.md';
export * as XMLConfigModal_en from './files/en/XMLConfigModal.md';
export * as BoxSortableVisor_en from './files/en/BoxSortableVisor.md';
export * as BoxVisor_en from './files/en/BoxVisor.md';
export * as CanvasVisor_en from './files/en/CanvasVisor.md';
export * as CanvasVisorDoc_en from './files/en/CanvasVisorDoc.md';
export * as CanvasVisorSli_en from './files/en/CanvasVisorSli.md';
export * as ContainedCanvasVisor_en from './files/en/ContainedCanvasVisor.md';
export * as HeaderVisor_en from './files/en/HeaderVisor.md';
export * as PluginPlaceholderVisor_en from './files/en/PluginPlaceholderVisor.md';
export * as SideNavVisor_en from './files/en/SideNavVisor.md';
export * as VisorBoxSortable_en from './files/en/VisorBoxSortable.md';
export * as VisorBox_en from './files/en/VisorBox.md';
export * as VisorCanvas_en from './files/en/VisorCanvas.md';
export * as VisorCanvasDoc_en from './files/en/VisorCanvasDoc.md';
export * as VisorCanvasSli_en from './files/en/VisorCanvasSli.md';
export * as VisorContainedCanvas_en from './files/en/VisorContainedCanvas.md';
export * as VisorHeader_en from './files/en/VisorHeader.md';
export * as VisorPluginPlaceholder_en from './files/en/VisorPluginPlaceholder.md';
export * as VisorSideNav_en from './files/en/VisorSideNav.md';
export * as VisorNavSection_en from './files/en/VisorNavSection.md';
export * as VisorPlayer_en from './files/en/VisorPlayer.md';
export * as ScormComponent_en from './files/en/ScormComponent.md';
Expand Down Expand Up @@ -84,15 +84,15 @@ export * as GridConfigurator_es from './files/es/GridConfigurator.md';
export * as PluginToolbar_es from './files/es/PluginToolbar.md';
export * as RadioButtonFormGroup_es from './files/es/RadioButtonFormGroup.md';
export * as XMLConfigModal_es from './files/es/XMLConfigModal.md';
export * as BoxSortableVisor_es from './files/es/BoxSortableVisor.md';
export * as BoxVisor_es from './files/es/BoxVisor.md';
export * as CanvasVisor_es from './files/es/CanvasVisor.md';
export * as CanvasVisorDoc_es from './files/es/CanvasVisorDoc.md';
export * as CanvasVisorSli_es from './files/es/CanvasVisorSli.md';
export * as ContainedCanvasVisor_es from './files/es/ContainedCanvasVisor.md';
export * as HeaderVisor_es from './files/es/HeaderVisor.md';
export * as PluginPlaceholderVisor_es from './files/es/PluginPlaceholderVisor.md';
export * as SideNavVisor_es from './files/es/SideNavVisor.md';
export * as VisorBoxSortable_es from './files/es/VisorBoxSortable.md';
export * as VisorBox_es from './files/es/VisorBox.md';
export * as VisorCanvas_es from './files/es/VisorCanvas.md';
export * as VisorCanvasDoc_es from './files/es/VisorCanvasDoc.md';
export * as VisorCanvasSli_es from './files/es/VisorCanvasSli.md';
export * as VisorContainedCanvas_es from './files/es/VisorContainedCanvas.md';
export * as VisorHeader_es from './files/es/VisorHeader.md';
export * as VisorPluginPlaceholder_es from './files/es/VisorPluginPlaceholder.md';
export * as VisorSideNav_es from './files/es/VisorSideNav.md';
export * as VisorNavSection_es from './files/es/VisorNavSection.md';
export * as VisorPlayer_es from './files/es/VisorPlayer.md';
export * as ScormComponent_es from './files/es/ScormComponent.md';
Loading

0 comments on commit 2fa01e4

Please sign in to comment.