Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.

Commit cfd4787

Browse files
committed
migrate to createReactClass
1 parent ea73378 commit cfd4787

File tree

85 files changed

+283
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+283
-198
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"body-parser": "^1.14.0",
2222
"bower": "^1.7.7",
2323
"consolidate": "^0.15.0",
24+
"create-react-class": "^15.6.3",
2425
"express": "^4.16.2",
2526
"handlebars": "^4.0.3",
2627
"jquery": "^3.1.1",

reactjsAdminlte.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjsAdminlte.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/chat-box/chat-box.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
define(
22
[
33
'react',
4+
'create-react-class',
45
'react-dom',
56
'../../services/common-functions'
67
],
7-
function (React, ReactDOM, commonFunctions) {
8-
var ChatBox = React.createClass({
8+
function (React, createReactClass, ReactDOM, commonFunctions) {
9+
var ChatBox = createReactClass({
910
getDefaultProps: function() {
1011
return {
1112
headerTheme: 'box-primary',

src/components/chat-box/contacts.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
define(
22
[
3-
'react'
3+
'react',
4+
'create-react-class',
45
],
5-
function (React) {
6-
var Contacts = React.createClass({
6+
function (React, createReactClass) {
7+
var Contacts = createReactClass({
78
render: function() {
89

910
var contacts = this.props.contacts.map(function(contactDetails, iterator){

src/components/chat-box/conversations.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
define(
22
[
3-
'react'
3+
'react',
4+
'create-react-class',
45
],
5-
function (React) {
6-
var Conversations = React.createClass({
6+
function (React, createReactClass) {
7+
var Conversations = createReactClass({
78
render: function() {
89

910
var conversations = this.props.conversations.map(function(messageDetails, iterator){

src/components/controls-menu.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
define(
22
[
33
'react',
4+
'create-react-class',
45
'jquery',
56
],
6-
function(React,$){
7-
var ControlsMenu = React.createClass({
7+
function (React, createReactClass, $){
8+
var ControlsMenu = createReactClass({
89
componentDidMount:function(){
910

1011
},

src/components/custom-box/box-tool.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
define(
22
[
33
'react',
4+
'create-react-class',
45
'react-dom',
56
'./box-functions'
67
],
7-
function (React, ReactDOM, boxFunctions) {
8-
var BoxTool = React.createClass({
8+
function (React, createReactClass, ReactDOM, boxFunctions) {
9+
var BoxTool = createReactClass({
910
toggleCollapse: function(event){
1011
var box = boxFunctions.findClosestElement(event.currentTarget, this.props.containerClass),
1112
boxBody = box.children[1],

src/components/custom-box/box.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
define(
22
[
33
'react',
4+
'create-react-class',
45
'react-dom',
56
],
6-
function (React, ReactDOM) {
7-
var Box = React.createClass({
7+
function (React, createReactClass, ReactDOM) {
8+
var Box = createReactClass({
89
getDefaultProps: function() {
910
return {
1011
collapsed: false,

src/components/header-bar/header-bar.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
define(
22
[
33
'react',
4+
'create-react-class',
45
'jquery',
56
'./header-messages/header-messages',
67
'./header-notifications/header-notifications',
78
'./header-tasks/header-tasks'
89
],
9-
function (React, $, HeaderMessages, HeaderNotifications, HeaderTasks) {
10-
var HeaderBar = React.createClass({
10+
function (React, createReactClass, $, HeaderMessages, HeaderNotifications, HeaderTasks) {
11+
var HeaderBar = createReactClass({
1112
pushMenu: function () {
1213
var body = document.body;
1314
if(body.clientWidth > 768){

0 commit comments

Comments
 (0)