From d2d56a3dac11570cf9625761c8affb76165412ed Mon Sep 17 00:00:00 2001 From: megala21 Date: Thu, 14 Sep 2017 14:32:42 +0530 Subject: [PATCH] Refactoring --- .../src/main/resources/publisher/src/App.jsx | 17 +---------------- .../Application/ApplicationCreate.jsx | 17 ----------------- .../Application/ApplicationListing.jsx | 18 ------------------ .../Application/CreateSteps/Step1.jsx | 19 ------------------- .../Application/CreateSteps/Step2.jsx | 17 ----------------- .../Application/CreateSteps/Step3.jsx | 17 ----------------- .../src/components/Base/BaseLayout.jsx | 17 ----------------- .../components/Platform/PlatformCreate.jsx | 17 ----------------- .../components/Platform/PlatformListing.jsx | 17 ----------------- .../src/components/UIComponents/DataTable.jsx | 17 ----------------- .../UIComponents/DataTableHeader.jsx | 17 ----------------- .../components/UIComponents/DataTableRow.jsx | 19 +------------------ .../publisher/src/{themes => }/theme.js | 10 ---------- 13 files changed, 2 insertions(+), 217 deletions(-) rename components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/{themes => }/theme.js (79%) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx index c3b7156eb37..b3cac968699 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/App.jsx @@ -31,26 +31,11 @@ import { PlatformCreate, PlatformListing } from './components'; -import Theme from './themes/theme'; +import Theme from './theme'; const history = createHistory({basename: '/publisher'}); -<<<<<<< HEAD -======= -/** - *Loading the theme files based on the the user-preference. - */ -let muiTheme = null; -let selected = Theme.selectedTheme; -if (Theme.currentTheme === "default") { - let defaultTheme = require("material-ui/styles/baseThemes/" + selected); - muiTheme = getMuiTheme(defaultTheme.default); -} else { - let customTheme = require("./themes/" + selected + "/theme.js"); - muiTheme = getMuiTheme(customTheme.default); -} ->>>>>>> parent of 8f3d11f... refactoring theming support /** * This component defines the layout and the routes for the app. diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx index 0924c15a39b..6e0d91f93e3 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationCreate.jsx @@ -24,11 +24,7 @@ import {Step1, Step2, Step3} from './CreateSteps'; import RaisedButton from 'material-ui/RaisedButton'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import {Step, StepLabel, Stepper,} from 'material-ui/Stepper'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The App Create Component. @@ -56,7 +52,6 @@ class ApplicationCreate extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -94,18 +89,6 @@ class ApplicationCreate extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/application-create.css"); - } else { - try { - require("../../themes/" + selected + "/application-create.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../themes/default/application-create.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx index 6a3e7676034..f5825bb6350 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/ApplicationListing.jsx @@ -21,11 +21,7 @@ import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import DataTable from '../UIComponents/DataTable'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The App Create Component. @@ -117,7 +113,6 @@ class ApplicationListing extends Component { componentWillMount() { //Fetch all the applications from backend and create application objects. this.setState({data: this.data}); -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -154,19 +149,6 @@ class ApplicationListing extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/application-listing.css"); - } else { - try { - require("../../themes/" + selected + "/application-listing.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/application-listing.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx index 3e73c038907..1bb540ac0cd 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step1.jsx @@ -21,13 +21,7 @@ import React, {Component} from 'react'; import MenuItem from 'material-ui/MenuItem'; import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; -<<<<<<< HEAD import Theme from '../../../theme'; -======= -import Theme from '../../../themes/theme'; - - ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The first step of the application creation wizard. @@ -57,7 +51,6 @@ class Step1 extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -94,18 +87,6 @@ class Step1 extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../../themes/default/application-create-step1.css"); - } else { - try { - require("../../../themes/" + selected + "/application-create-step1.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../../themes/default/application-create-step1.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx index 2440534c00e..8c047853c11 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step2.jsx @@ -28,11 +28,7 @@ import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; import Clear from 'material-ui/svg-icons/content/clear'; import {GridList, GridTile} from 'material-ui/GridList'; -<<<<<<< HEAD import Theme from '../../../theme'; -======= -import Theme from '../../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The Second step of application create wizard. @@ -74,7 +70,6 @@ class Step2 extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -112,18 +107,6 @@ class Step2 extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../../themes/default/application-create-step2.css"); - } else { - try { - require("../../../themes/" + selected + "/application-create-step2.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../../themes/default/application-create-step2.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx index 57eb37e67a9..c974c890940 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Application/CreateSteps/Step3.jsx @@ -24,11 +24,7 @@ import TextField from 'material-ui/TextField'; import FlatButton from 'material-ui/FlatButton'; import SelectField from 'material-ui/SelectField'; import RaisedButton from 'material-ui/RaisedButton'; -<<<<<<< HEAD import Theme from '../../../theme'; -======= -import Theme from '../../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The Third step of application create wizard. {Application Release Step} @@ -63,7 +59,6 @@ class Step3 extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -101,18 +96,6 @@ class Step3 extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../../themes/default/application-create-step3.css"); - } else { - try { - require("../../../themes/" + selected + "/application-create-step3.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../../themes/default/application-create-step3.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx index 9289559459c..8e772a8c633 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Base/BaseLayout.jsx @@ -30,11 +30,7 @@ import Feedback from 'material-ui/svg-icons/action/feedback'; import DevicesOther from 'material-ui/svg-icons/hardware/devices-other'; import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** @@ -54,7 +50,6 @@ class BaseLayout extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -94,18 +89,6 @@ class BaseLayout extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/basic-layout.css"); - } else { - try { - require("../../themes/" + selected + "/basic-layout.css"); - } catch (ex){ - // If the particular customized file does not exist, use the default one. - require("../../themes/default/basic-layout.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx index d7b22474acd..5d26b067d98 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformCreate.jsx @@ -31,11 +31,7 @@ import {GridList, GridTile} from 'material-ui/GridList'; import Close from 'material-ui/svg-icons/navigation/close'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; import AddCircleOutline from 'material-ui/svg-icons/content/add-circle-outline'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * Platform Create component. @@ -70,7 +66,6 @@ class PlatformCreate extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -108,18 +103,6 @@ class PlatformCreate extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/platform-create.css"); - } else { - try { - require("../../themes/" + selected + "/platform-create.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/platform-create.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx index b7e368f168c..8cd4eb358a2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/Platform/PlatformListing.jsx @@ -21,11 +21,7 @@ import {withRouter} from 'react-router-dom'; import TextField from 'material-ui/TextField'; import DataTable from '../UIComponents/DataTable'; import {Card, CardActions, CardTitle} from 'material-ui/Card'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The App Create Component. @@ -45,7 +41,6 @@ class PlatformListing extends Component { } componentWillMount() { -<<<<<<< HEAD console.log(Theme.currentThemeType); /** *Loading the theme files based on the the user-preference. @@ -84,18 +79,6 @@ class PlatformListing extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/platform-listing.css"); - } else { - try { - require("../../themes/" + selected + "/platform-listing.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/platform-listing.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx index 75f5610887e..f3eb9a065c6 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTable.jsx @@ -22,11 +22,7 @@ import DataTableRow from './DataTableRow'; import DataTableHeader from './DataTableHeader'; import RaisedButton from 'material-ui/RaisedButton'; import {Table, TableBody, TableHeader, TableRow} from 'material-ui/Table'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * The Custom Table Component. @@ -66,7 +62,6 @@ class DataTable extends Component { componentWillMount() { this.setState({data: this.props.data, headers: this.props.headers}); -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -102,18 +97,6 @@ class DataTable extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/data-table.css"); - } else { - try { - require("../../themes/" + selected + "/data-table.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/data-table.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx index 5fad36b717a..bacd63d5d98 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableHeader.jsx @@ -20,11 +20,7 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import FlatButton from 'material-ui/FlatButton'; import {TableHeaderColumn} from 'material-ui/Table'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * Data Table header component. @@ -37,7 +33,6 @@ class DataTableHeader extends Component { } componentWillMount() { -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ @@ -76,18 +71,6 @@ class DataTableHeader extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/data-table.css"); - } else { - try { - require("../../themes/" + selected + "/data-table.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/data-table.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx index dc5e2de8329..98c680789af 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/UIComponents/DataTableRow.jsx @@ -19,11 +19,7 @@ import PropTypes from 'prop-types'; import React, {Component} from 'react'; import {TableRow, TableRowColumn} from 'material-ui/Table'; -<<<<<<< HEAD import Theme from '../../theme'; -======= -import Theme from '../../themes/theme'; ->>>>>>> parent of 8f3d11f... refactoring theming support /** * Data table row component. @@ -40,13 +36,12 @@ class DataTableRow extends Component { componentWillMount() { this.setState({dataItem: this.props.dataItem}); -<<<<<<< HEAD /** *Loading the theme files based on the the user-preference. */ const selected = - (Theme.currentThemeType === Theme.defaultThemeType) ? Theme.defaultThemeType : Theme.currentTheme; + (Theme.currentThemeType === Theme.defaultThemeType) ? Theme.defaultThemeType : Theme.currentThemeType; const dataTableCss = "data-table.css"; const dataTableId = "data-table"; let themePath = "/" + Theme.themeFolder + "/" + selected + "/" + dataTableCss; @@ -78,18 +73,6 @@ class DataTableRow extends Component { if (styleSheet !== null) { styleSheet.disabled = true; styleSheet.parentNode.removeChild(styleSheet); -======= - let selected = Theme.selectedTheme; - if (Theme.currentTheme === "default") { - require("../../themes/default/data-table.css"); - } else { - try { - require("../../themes/" + selected + "/data-table.css"); - } catch (ex) { - // If the particular customized file does not exist, use the default one. - require("../../themes/default/data-table.css"); - } ->>>>>>> parent of 8f3d11f... refactoring theming support } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js similarity index 79% rename from components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js rename to components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js index 014957cf65c..492a623be25 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js @@ -24,7 +24,6 @@ import axios from 'axios'; */ class Theme { constructor() { -<<<<<<< HEAD:components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/theme.js this.defaultThemeType = "default"; this.currentThemeType = this.defaultThemeType; this.currentTheme = "lightBaseTheme"; @@ -37,15 +36,6 @@ class Theme { this.appContext = window.location.pathname.split("/")[1]; this.loadThemeProperties.bind(this); this.loadThemeFiles.bind(this); -======= - const theme = require("../config.json").theme; - this.currentTheme = theme.type; - if (this.currentTheme === "default") { - this.selectedTheme = theme.value; - } else { - this.selectedTheme = theme.value; - } ->>>>>>> parent of 8f3d11f... refactoring theming support:components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/themes/theme.js } loadThemeProperties () {